Hello!! I'm trying to configure the serial port 1 in a DS89C450 8051-based ucontroller. I want to use it with its associated irq. I configure all, and simulate it. When I force an RI_1 or TI_1 flag, the program jumps to the IRQ, but when finish, the program goes out of memory and doesn't work. I'm not sure, but I thikn I must configure that in the 0x003B memory position there's an interrupt. How can I do this? Thanks very much.
In C. There's the ISR routine. Is the same that I've got for the serial 0 (changing RI_0, TI_0 and SBUF0). The one with the serial 0 works Ok void serial_int1 (void) interrupt 6 using 2 { unsigned char v; if (RI_1) { v = SBUF1; RI_1 = 0; } if (TI_1) { TI_1 = 0; SBUF1 = v; } }
v need be volatile/static or some such thing. Erik
That's the ISR - but what about all the other setup stuff: * Mode; * Baud Rate; * Enable the Interrupts; * Enable the receiver; etc, etc,...