sundar-edaboard
Junior Member level 1
- Joined
- Sep 5, 2013
- Messages
- 19
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Location
- Bahrain
- Activity points
- 131
Hi,
I am using ATMEGA16A controller in avr studio 6.1 version and windows 8.1.
The UART register UCSRA value is not able to update in simulation. What is the reason?
#include <avr/io.h>
#include <avr/interrupt.h>
void TransmitByte( unsigned char data )
{
while((UCSRA&(1<<UDRE)) == 0);
UDR = data;
}
int main (void)
{
char data;
UBRRH=0;
UBRRL=103; // 9600 & 16mhz
UCSRB |= (1 << RXEN) | (1 << TXEN) ; // Turn on the transmission and reception circuitry
UCSRC |= (1 << URSEL) | (1 << UCSZ0) | (1 << UCSZ1); // Use 8-bit character sizes
while (1)
TransmitByte(']');
}
I am using ATMEGA16A controller in avr studio 6.1 version and windows 8.1.
The UART register UCSRA value is not able to update in simulation. What is the reason?
#include <avr/io.h>
#include <avr/interrupt.h>
void TransmitByte( unsigned char data )
{
while((UCSRA&(1<<UDRE)) == 0);
UDR = data;
}
int main (void)
{
char data;
UBRRH=0;
UBRRL=103; // 9600 & 16mhz
UCSRB |= (1 << RXEN) | (1 << TXEN) ; // Turn on the transmission and reception circuitry
UCSRC |= (1 << URSEL) | (1 << UCSZ0) | (1 << UCSZ1); // Use 8-bit character sizes
while (1)
TransmitByte(']');
}