Go Down

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

RashedKoutayni

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:
https://metalab.at/wiki/Metaboard
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

Nadir

Rashed,

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.

dpharris

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

David
Dr. David Harris
OpenLCB Dev Team

mrburnette

#3
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.

http://arduino.cc/forum/index.php/topic,135623.0.html

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.)
Quote


ANALOG0  0
ANALOG1  120
ANALOG2  220
ANALOG3  265
ANALOG4  294
ANALOG5  294

ANALOG0  296
ANALOG1  0
ANALOG2  109
ANALOG3  213
ANALOG4  268
ANALOG5  282

ANALOG0  313
ANALOG1  315
ANALOG2  0
ANALOG3  120
ANALOG4  217
ANALOG5  261

ANALOG0  312
ANALOG1  332
ANALOG2  313
ANALOG3  0
ANALOG4  128
ANALOG5  216

ANALOG0  290
ANALOG1  322
ANALOG2  320
ANALOG3  312
ANALOG4  0
ANALOG5  120

ANALOG0  120
ANALOG1  234
ANALOG2  272
ANALOG3  297
ANALOG4  282
ANALOG5  0


- Ray

testes88

maybe this link can help..
http://www.recursion.jp/avrcdc/cdc-232.html

mrburnette

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.


Ray

Go Up