Mail Archives: djgpp/1999/08/18/21:44:39
Mitch Halloran says
>You might then set your MCR to activate the OUT2 line (as DTR and RTS) and
baud after setting the latch in the LCR, then enable interrupts.
Yes, that's it! Thanks a lot! OUT2 is the master interrupt enable for the
UART. Nowhere had I seen this in any documentation until I found the 82C721
data sheet which says OUT2
"is used to enable an interrupt (OUT2 pin of UART). When OUT2 = 0 (default),
the serial interrupt is forced into high impedance. When OUT2 = 1 the serial
interrupt output is enabled. Note OUT2 is an internal chip signal."
(So much for using a scope to see what's going on).
Has OUT2 always been used for this purpose?
>Then just before leaving your ISR, you should do the following:
1. signal the PIC of an end-of-interrupt (EOI)
2. make sure the OUT2 line is set in the MCR
3. finally, create an interrupt edge by setting the IER to zero after
getting
its present value, then re-setting.
I don't find any need to create an edge. The chip interrupts fine at least
for received characters by just leaving IER alone after setting the
interrupts. It might be necessary if you have multiple simultaneous
interrupts on the same chip, though, like simultaneous receive and transmit
interrupts...
\/\/\/*= Martin
- Raw text -