PIC16C84 & PortB interrupt
Without getting into a lot of detail on what is different on 'A'
parts, the PortB is fixed such that it will work as described in the
datasheet. We did think about a interrupt on change that would work
relative to the output port, but that would be a spec change.
The device does a read for any instruction cycle except literals.
This wasn't a problem except on the 74/64 with IBF flag in TRISE.
Here a RETURN (000Dh) instruction would read PORTD and clear the IBF
flag. Oops! There isn't an instruction that can accidentally hit
P.S. also fixed on Rev. A.
______________________________ Reply Separator _________________________________
Subject: Re: Re: PIC16C84 & PortB interrupt
Author: John Payson <MCS.COM> at Internet_Exchange supercat
Date: 12/1/95 10:20 AM
> On Thu, 23 Nov 1995, Andrew Warren wrote:
> > It was bad enough when only instructions that performed an EXPLICIT
> > read or read-modify-write kept the interrupt from happening... This
> > new information makes the change-on-portB interrupt almost
> > COMPLETELY worthless. Does Microchip see this as a bug and plan to
> > correct it in future revs of the chip?
> Actually, we understand this as a bug and it is being fixed in all new
> devices including upcoming 'A' versions of '74, '73, '65, '64 , etc.
> Rgds, Brian.
What precisely is Microchip fixing in the 'A' versions? Most of the quirks
I can see with the PortB behavior (and read-modify-write in general) are
things that a "clever programmer" might exploit in some way.
Also, what is the specific behavior of the register read logic? Does it
do the read for any opcode whose top six bits are not "00 0000", or does
it read regardless? If the latter, does this cause any potential problems
with serial I/O on the '74 [since reading the input latch clears it, and
the output latch shares the input latch's address]?
PS--Personally, my preferred implementation for an "interrupt-on-change"
pin feature would be to have the interrupt triggered if/when the signal on
the port pin does not match the output latch. This could then be easily
cleared either by "movf port,f" or by most read-modify-write operations on
See also: www.piclist.com/techref/microchip/ints.htm?key=interrupt
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the