On Sun, 6 Dec 2009, Steven Holder wrote: > Jims right, > > these 2 defines do share the same location, when accessing the UCSRC Reg you > set the the ursel bit in the register when writing to the UCSRC else you are > writing to the UBBRH register . All right, if that's the case, I stand corrected. So even though I have something that works right now, it is not the correct way to solve the problem. Of course, then, the next question is: If the datasheets for ATtiny2313 and ATmega8 show identical example code for USART_Init, what else is needed to make this example code work on both ATtiny2313 and ATmega8? I have verified the resulting assembly code for ATtiny2313 and ATmega8, and the only difference was in the way USART_Init was compiled for the previously mentioned registers. When code was compiled for atmega8 AND ran on an atmega8, it simply did not work (until I hacked iom8.h). Suggestions? Best, Marc
Message
RE: [AVR-Chat] avr-gcc ATMega8 USART trouble, was: Compile problem
2009-12-06 by Marc R.J. Brevoort
Attachments
- No local attachments were found for this message.