Go Down

Topic: Arduino Without FTDI chip using V-USB (Virtual USB) (Read 14201 times) previous topic - next topic


Nov 07, 2012, 01:03 pm Last Edit: Nov 07, 2012, 01:24 pm by RashedKoutayni Reason: 1
Hello everybody :)
Few weeks ago, I made a USB supported Arduino based on ATMega8 and I didn't use FTDI FT232 chip ... I used V-USB (Virtual USB) method instead ... Actually it works properly :D
here is the board:
But I have a problem, V-USB protocol doesn't support real time serial monitoring, so I can't use serial.begin() , serial.read() or serial.print() functions :(
In other words, Any program could work properly unless it uses Serial functions.
Even though when I open the Serial Monitor, nothing shows up.
What can I do to solve this problem ?

P.S: Please do not suggest to use any AVR microcontroller other than ATMega8 because we don't have ATMega168 or ATMega 328 in market ... and shipping is off to my country :\
Although Metaboard above uses Atmega168, I could make it using Atmega8 ;)
Thanks in advance



As decsribed in Metalab site "AVR's UART lines are not used for USB. This means that they can be used for other purposes, but also that debug output written to the UART cannot be directly received via USB."

Unfortunately Metaboard doesn't support Serial communitication via USB.


However, it should be possible to use a software serial connection through the usb. 

Dr. David Harris
OpenLCB Dev Team


Dec 08, 2012, 05:35 pm Last Edit: Dec 08, 2012, 05:40 pm by mrburnette Reason: 1
IF you are only looking for serial output of quasi-character strings,  this sample code may help.  The String object takes some RAM and code space, but makes it very easy to "print" to any HID application under Windows, Linux, iOS.... I have tried Excel and Notepad for data capture.  It is the most flexible method that I have found to get "stuff" out of the V-USB Arduino environment.


Compiled and tested with Arduino 1.0.1

Sample of polling each analog input every 5 seconds:
(I walked the analog inputs with a 10K resistor to ground.)

ANALOG1  120
ANALOG2  220
ANALOG3  265
ANALOG4  294
ANALOG5  294

ANALOG0  296
ANALOG2  109
ANALOG3  213
ANALOG4  268
ANALOG5  282

ANALOG0  313
ANALOG1  315
ANALOG3  120
ANALOG4  217
ANALOG5  261

ANALOG0  312
ANALOG1  332
ANALOG2  313
ANALOG4  128
ANALOG5  216

ANALOG0  290
ANALOG1  322
ANALOG2  320
ANALOG3  312
ANALOG5  120

ANALOG0  120
ANALOG1  234
ANALOG2  272
ANALOG3  297
ANALOG4  282

- Ray


Dude... you woke up a 1-year old thread!

Seriously, testes88, as a newbie you only get 1 or 2 freepasses on reviving dead threads unless you provide some serious, creative, and overall valuable input - posting a semi-relative link is not one.  Anyway, the OP is using a 328P and you are referencing an ATtiny...

So, be careful or the forum big-boys will get upset and they are not as nice as I am.  When you do something like what you just did, every member who participated in the original exchange gets an 'unread reply' message.  While I cannot vouch for the accuracy of the rumors, some newbies have lost use of one or more of their testicles for such transgressions.



Thanks jjames for the update (the old thread is indeed dead)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up