Gast
#253899
hi,
ich habe meine schaltung jetzt um einen max232n erweiter. Und der
empfang funktioniert auch so weit.
jetzt will ich einen interrupt auslösen wenn ich byte empfange.
quellcode:
#include <90s2313.h>
interrupt [UART_RXC] void empfangen(void)
{
PORTB = UDR;
while(1);
}
void main(void)
{
DDRB = 0xFF;
UCR = 0x98;
USR = 0x00;
UBRR = 0x19;
#asm("sei")
while (1)
{
PORTB = USR;
}
}
Im Inhalt des USR ist 6Ch.
Unter
http://www.mikrocontroller.net/articles/AVR-GCC-Tutorial#Allgemeines_zum_UART
stehen nähere register erleuterungen.
Wo ist mein Fehler.
jeroen