# Making UART between ATmega32A and the PC :

I used PL2303hx to connect my PC to the chip and I did the correct connections and installed the driver of the IC and the program I wrote was simulated succesfully on proteus:
But when I do it on the reality the blue LED in PL2303hx blinks every time I send data from the chip to my PC (e.g. if I make the delay time 1 second it blinks each 1 second )but data is displayed is just <0>

the code to just make sure that it works fine :

#define F_CPU 16000000
#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
uint16_t UBRR_Value = 103;

UBRRL = (uint8_t) UBRR_Value;
UBRRH = (uint8_t) (UBRR_Value >>8);
UCSRB |= (1<<RXEN) | (1<<TXEN);
UCSRC |= (3<<UCSZ0);

while (1)
{
while (! (UCSRA & (1<<UDRE)));
UDR = 'B';
_delay_ms(1000);
}
return(0);
}


and the fuse bits CKSEL and CKPOT are set to fit with 16MHz external crystal just like written in the code.

• Is there H/W loopback to enable DTR etc? – Tony Stewart Sunnyskyguy EE75 Jul 7 at 17:25
• Try verifying the USB interface separately from the AVR. Without the AVR connected to the PL2303, connect RX to TX directly at the PL2303. Use a simple terminal program, like Putty, to send characters to the PL2303...are they sent back to you? – Elliot Alderson Jul 7 at 17:30
• @ Elliot Alderson thanks for your comment The problem got solved .. yet Putty is a very powerful software I liked it – Mohamed Atef Jul 7 at 20:44