suraksha s
Newbie level 5
- Joined
- Jan 18, 2013
- Messages
- 8
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,330
sir actually this is my serial program to send a letter 'a' on hyper terminal but when i try to load the program to controller ATMEGA 32 and try to display on hyperterminal i am unable to get the data. please help me out as soon as possible
#include <avr/io.h>
int main(void)
{
UCSRC |= (1<<UMSEL); // select asynchronous mode
UCSRC |= (1<<USBS);
UBRRH = 51>>8; // higher 8 bits of 51
UBRRL = 51; // lower 8 bits of 51
UCSRB |= (1<<RXEN)|(1<<TXEN); // enable transmitter and receiver both
UCSRC |= (1<<UCSZ0)|(1<<UCSZ1); // number of data bits is 8
unsigned int send='a';
while((UCSRA & (1<<UDRE))==0) {};
UDR=send;
}
#include <avr/io.h>
int main(void)
{
UCSRC |= (1<<UMSEL); // select asynchronous mode
UCSRC |= (1<<USBS);
UBRRH = 51>>8; // higher 8 bits of 51
UBRRL = 51; // lower 8 bits of 51
UCSRB |= (1<<RXEN)|(1<<TXEN); // enable transmitter and receiver both
UCSRC |= (1<<UCSZ0)|(1<<UCSZ1); // number of data bits is 8
unsigned int send='a';
while((UCSRA & (1<<UDRE))==0) {};
UDR=send;
}