07 November 2008

ATtiny2313, bascom-avr and serialin interrupts

Since I am apparently not able to receive data from the FT817 with an unbuffered input on the ATtiny2313 HW USART, I decided to try the buffered way.

Remembering my assembler courses, I was prepared to deal with interrupts (URXC, "receive complete", on the ATtiny2313) and ISR (interrupt service routine).

So I went on and modified my code:

Enable Interrupts
Enable Urxc
On URXC My_isr


But on compile, bascom-avr complained that:
"Error : 249 Line : xy ISR already defined [My_isr] , in File ..."

What? The answer is in the help file, under "CONFIG SERIALIN", "ASM" paragraph. Basically bascom owns the URXC interrupt, so you need to use ISCHARWAITING to peek into the buffer.