On 06/04/2014 08:33 PM, Eric Smith wrote:
So for those of us who haven't had the
(mis)fortune to deal with the 8255,
what's so terrible about it?
If you don't change mode after initialization, there's nothing wrong.
On the other hand, if you change direction of of a port (say, from input
to output), the 8255 "forgets" whatever was last written to the output
port. To quote the 8255 data sheet:
"All of the output registers, including the status flip-flops, will be
reset when the mode is changed."
So, if using the 8255, set it up and don't touch the mode register ever
again. This can trip you up if you're not aware of it.
--Chuck