Squirrels have fuzzy tails.
0 Members and 1 Guest are viewing this topic.
Every atmega has different fuses!!
atmega8 doesnt have a ckdiv8 fusedoes baud really have anything to do with clock speed?
Can you even do UART at 1MHz on the atmega8?
oh ok pomprockerI have it flash an LED OK @ 8mhz but the UART just doesnt work! I followed the tutorial perfectly but I just cant get the ATmega8 to transmit or receive over UART ! Everything is set up exactly how Admin said to do it in the tutorialDid anyone have the same problems with their UART on the ATmega8? Thanks,Eric
// compatibility with most newer processors#ifdef UCSRB #define UCR UCSRB#endif// compatibility with old Mega processors#if defined(UBRR) && !defined(UBRRL) #define UBRRL UBRR#endif// compatibility with megaXX8 processors#if defined(__AVR_ATmega88__) || \ defined(__AVR_ATmega168__) || \ defined(__AVR_ATmega644__) #define UDR UDR0 #define UCR UCSR0B #define RXCIE RXCIE0 #define TXCIE TXCIE0 #define RXC RXC0 #define TXC TXC0 #define RXEN RXEN0 #define TXEN TXEN0 #define UBRRL UBRR0L #define UBRRH UBRR0H #define SIG_UART_TRANS SIG_USART_TRANS #define SIG_UART_RECV SIG_USART_RECV #define SIG_UART_DATA SIG_USART_DATA#endif// compatibility with mega169 processors#if defined(__AVR_ATmega169__) #define SIG_UART_TRANS SIG_USART_TRANS #define SIG_UART_RECV SIG_USART_RECV #define SIG_UART_DATA SIG_USART_DATA#endif// compatibility with dual-uart processors// (if you need to use both uarts, please use the uart2 library)#if defined(__AVR_ATmega161__) #define UDR UDR0 #define UCR UCSR0B #define UBRRL UBRR0 #define SIG_UART_TRANS SIG_UART0_TRANS #define SIG_UART_RECV SIG_UART0_RECV #define SIG_UART_DATA SIG_UART0_DATA#endif#if defined(__AVR_ATmega128__)#ifdef UART_USE_UART1 #define UDR UDR1 #define UCR UCSR1B #define UBRRL UBRR1L #define UBRRH UBRR1H #define SIG_UART_TRANS SIG_UART1_TRANS #define SIG_UART_RECV SIG_UART1_RECV #define SIG_UART_DATA SIG_UART1_DATA#else #define UDR UDR0 #define UCR UCSR0B #define UBRRL UBRR0L #define UBRRH UBRR0H #define SIG_UART_TRANS SIG_UART0_TRANS #define SIG_UART_RECV SIG_UART0_RECV #define SIG_UART_DATA SIG_UART0_DATA#endif#endif
I wonder how then I had UART working on my atmega8 for many months before upgrading to the mega168....
Did anyone have the same problems with their UART on the ATmega8?
Was this ever resolved?