Problem in AVR to PC serial Communication

Thread Starter

allahjane

Joined Sep 19, 2012
75
Hi there,

I am trying to achieve communication between my pc and AVR (atmega 8) using UART. For testing a LED must glow for some byte sent

The communication takes place through a usb-vritual com port-uart device (usb to mcu serial link) (basically using the chip pl2303Hx).

But the receiving MCU does not respond to the data being sent as if nothing is being transmitted.

I have all the proper drivers and cables. I tried using hyper-terminal and even my own custom made app in vb.net

However the MCU can talk with other MCU flawlessly over UART but not with the usb serial link.

here are the settings

data size 8bits
stop bits 1
parity none
baud rate 4800 (gives UBBR value 12 for atmega 8)

I've connected the Txd pin from the usb to serial adapter to Rx of the MCU uart with a common ground. Also the adapter takes care of level conversions (if any)
 

kubeek

Joined Sep 20, 2005
5,795
What is your crystal frequency? Does the usb chip work when you connect tx and rx together, do you get an echo in the terminal?
 

Thread Starter

allahjane

Joined Sep 19, 2012
75
What is your crystal frequency? Does the usb chip work when you connect tx and rx together, do you get an echo in the terminal?
Yes, I tried a loopback program. I got Ok when tx and rx were connected and failure when tx and rx were left open.That means chip is working alright. The MCU is operating at 1MHz and the profilic chip at 12Mhz
 

tshuck

Joined Oct 18, 2012
3,534
Have you tried transmitting to the terminal?

There have been numerous times I have caught a simple baud rate error by trying to send a character and received garbled data. Also, done if those chips operate at 9600 baud by default, so you may need to set it to respond at 4800 baud.

I didn't see any questions in your post, do you have one? ;)

Posting your code would also help.
 
Top