(2)External Interrupt Source
(a)The following must be programmed:
(i)Interrupt source enabled via Interrupt Mode Control Register.
(ii)Mode selected via Interrupt Mode Control Register.
(b)Interrupt generated if ExtIntStat of Interrupt Mode Control Register is '1'.
(c)'1' in ExtIntStatus is reset to '0' if the following two requirements are satisfied:
(i)Interrupt acknowledged by writing ExtIntAck with '1'.
(ii)Condition which caused interrupt is no longer present.
5.9Summary of Input/Output Options
Each of the three ports (Port A, Port B, Port C) may be configured in one of three manners:
(1)PORT USED AS AN OUTPUT
(a)Write a '1' to the appropriate bits of the latch in order to turn 'off' the output module.
(b)Write a '0' to the appropriate bits of the latch in order to turn 'on' the output module.
(2)PORT USED AS AN INPUT
(a)Writing a '1' to all the bits of the latch will allow all the channels of the port to be read as inputs. (Writing a '0' to any bits of the latch will 'mask' those bits. Those bits will always be read as a '0').
(3)PORT USED AS INPUT AND OUTPUT
If a port is to be used so that some channels are inputs and some channels are outputs, it must be insured that the channels to be used as inputs are initialized as inputs. This is done by writing a '1' to the bits of the data port control register representing the I/O channels which are to be used as inputs anytime the port is written.
(a)The channels which are to be inputs should always be written with a '1' and never written with a '0'.
(b)The channels which are to be outputs should be written with the appropriate value ('0' or '1').
(c)The channels which are latched with a '0' will always be '0' when read (they are 'masked' from input).
30 |