[En-Nut-Discussion] 2nd UART
rajan rai
rajan_rai at yahoo.com
Tue Nov 2 17:58:37 CET 2004
Hi Jörg,
I'm trying to program USART of Atmega 128L using STK 501 . I'm using JTAG ICE MKII for programming Atmega128L. I connected Serial Cable between Rs232 Port of Stk501 and my PC and than Run Step by step the below program. ideally it should print character 'R' on hyperterminal . But till now I have got any success. I configured AVR Studio to calibrate Oscillator for 8MHz and Fuse setting is for Int RC Osc 8Mhz startup time 6CK + 0Ms
// Set baud rate for 9600
UBRR0H=0x00;
UBRR0L=0x33;
// Enable receiver and transmitter
UCSR0B = (1<<RXEN0)|(1<<TXEN0)|(0<<RXCIE0)|(0<<UDRIE0);
// Async. mode, 8N1
UCSR0C = (0<<UMSEL0)|(0<<UPM00)|(0<<USBS0)|(3<<UCSZ00)|(0<<UCPOL0);
while (!(UCSR0A & (1<<UDRE0)));
UDR0 = 'R';
Can you please help me. I will really appreciate if you can point me where am I going wrong or tell me settings to make USART of STK501 with Atmega128L work
Regards,
-Rajan
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20041102/aabd7598/attachment-0001.html>
More information about the En-Nut-Discussion
mailing list