Pages: [1]   Go Down
Author Topic: Arduino Without FTDI chip using V-USB (Virtual USB)  (Read 7669 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everybody smiley
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 smiley-grin
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 smiley-sad
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 smiley-wink
Thanks in advance
« Last Edit: November 07, 2012, 07:24:21 am by RashedKoutayni » Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 81
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 63
Arduino rocks / OpenLCB rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

David
Logged

Dr. David Harris
OpenLCB Dev Team

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1793
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 08, 2012, 11:40:01 am by mrburnette » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1793
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: