| Author |
Message |
|
|
Posted: Mar 17, 2010 - 11:40 PM |
|

Joined: Jan 26, 2008
Posts: 5
Location: simi valley
|
|
this is my first post to this forum so please excuse me.
well to start i have a ft232r connected to an atmega8. im trying to send data from a windows app that i created and display it on an lcd connected to my atmega8. all i see on the lcd is gibberish and nothing close to what i sent. Im starting out with just a single letter being sent so i can learn the d2xx api. i have attached the windows app that i compiled using visual c++ express and the code for atmega. any help will be much appreciated.thanx |
|
|
| |
|
|
|
|
|
Posted: Mar 17, 2010 - 11:59 PM |
|


Joined: Feb 23, 2005
Posts: 84
Location: Salt Lake City, Utah
|
|
| Do you need to call FT_SetBaudRate or FT_W32_SetCommState before trying to do any transfers? |
_________________ I have too many hobbies.
TruGolf.com
|
| |
|
|
|
|
|
Posted: Mar 18, 2010 - 12:45 AM |
|

Joined: Jan 26, 2008
Posts: 5
Location: simi valley
|
|
| in the ftdi documentation i didnt see any default settings so i assumed that it had to be done. also i should mention that im using a 12mhz crystal to clock the avr. the more details the better right. |
|
|
| |
|
|
|
|
|
Posted: Mar 18, 2010 - 12:59 AM |
|

Joined: Jan 26, 2008
Posts: 5
Location: simi valley
|
|
| ok so i just ran gtkterm in linux and got gibberish on the lcd also, then i conected txd and rxd on the ft232 and received good data on gtkterm so i know that the 232 is working properly and my fault is on the atmega side. now to find what i did wrong. |
|
|
| |
|
|
|
|
|
Posted: Mar 18, 2010 - 07:41 AM |
|

Joined: Jan 26, 2008
Posts: 5
Location: simi valley
|
|
| ok so after pulling out my hair i solved it. i narrowed it down to the uart and found that i was using to low of a baud rate. i upped it from 9600 to 38400 and i can send data from hyperterm to the avr and display it on the lcd. |
|
|
| |
|
|
|
|
|
Posted: Mar 18, 2010 - 04:37 PM |
|


Joined: Feb 23, 2005
Posts: 84
Location: Salt Lake City, Utah
|
|
|
larcomj wrote:
in the ftdi documentation i didnt see any default settings so i assumed that it had to be done.
I asked because in your sample code (d2xx_example.cpp) neither of those functions are being called. How do you tell the FT232 what baud rate to use with the uC?
On what end did you change the baud rate (uC, hyperterm) to fix the problem? |
_________________ I have too many hobbies.
TruGolf.com
|
| |
|
|
|
|
|
Posted: Mar 19, 2010 - 08:59 AM |
|

Joined: Jan 26, 2008
Posts: 5
Location: simi valley
|
|
i used
FT_SetBaudRate(devHandle,9600); and
FT_SetDataCharacteristics(devHandle,FT_BITS_8,FT_STOP_BITS_1,FT_PARITY_NONE);
to initialise the ft232. and i changed the baud rate in the firmware for the atmega and the windows app. i also changed it in the hyperterminal to match what the atmega was running to test.everything works ass advertised now. i never would have assumed that the baud rate was to low. |
|
|
| |
|
|
|
|
|