tcworld / hid-serial Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rayshobby/hid-serial
HID-class serial communication for AVRs using V-USB
This project forked from rayshobby/hid-serial
HID-class serial communication for AVRs using V-USB
======================================================== This folder contains Arduino code and host software to demonstrate HID-class USB serial communication for AVRs using V-USB. The code and circuit design are based on V-USB http://www.obdev.at/products/vusb/index.html and USnoobie. It is designed to work for ATmega328 but can be adapted to other AVR microcontrollers as well. The software is written by Ray Wang at Rayshobby LLC and published under the Creative Commons Attribution- ShareAlike (CC-SA) 3.0 license. ======================================================== The folders are organized as follows: - 'schematic' contains the circuit schematic and part list. Note that the circuit uses a 12MHz crystal (or resonator). This is the lowest frequency clock supported by V-USB. You need to set the mcu fuse bits accordingly to use external crystal oscillator. See the 'bootloader' folder below. - 'bootloader' contains the modified USnoobie bootloader The bootloader is optional, but once flashed, it allows the mcu to bootload (by pressing the button during power-on or reset) as a usbasp programmer, so you will not need any external programer to flash a program. Check the 'burn.bat' file in the 'bootloader' folder for the recommended fuse bits. - 'arduino code' contains the Arduino library for HIDSerial. To use it: * copy boards.txt (from hardware/arduino folder) to the corresponding folder in your arduino installation directory, and the HIDSerial library to your arduino's libraries directory. * Run Arduino (the recommended version is 1.0.5 or 1.0.4). * Make sure you select 'USnoobie' from Tools -> Boards * If you use the USnoobie bootloader, select 'USBasp' from Tools -> Programmer. If not, select the name of the external ISP programmer you are using to flash the program. * Select any provided example from File -> Examples -> HIDSerial * Upload the example code to ATmega328. - 'host software' contains the standalone applications and Processing source code for HIDSerialMonitor. Please check the README.txt therein. - Using the Arduino HIDSerial library: * The library provides several examples for you to learn how to get started using the API functions. * The HIDSerial class is similar to Arduino's Serial class. To use it, you need to first define a class variable, e.g. HIDSerial serial; Then, in your setup() function, call: serial.begin(); Next, in your loop() function, you can use: serial.print(...); serial.println(...); serial.write(...); to print values to the host. You can also use: serial.available(); to check if there is any incoming data, and serial.read(...); to read the incoming data to a char buffer. Again,these are similar to the Arduino's Serial class. The ***main difference***, though, is that in the loop() you need to call serial.poll(); as often as you can -- since the USB tasks are simulated in software, calling serial.poll() frequently ensures the mcu has ample time to perform USB tasks. This requirement can be relieved in future updates, but for you please cope with the requirement. ========================================================
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.