> ----------
> From: Dave Johnson[SMTP:
djohnson
KILLspamSIRIUS.COM]
> Sent: 04 January 1999 02:12
> To:
.....PICLISTKILLspam
.....MITVMA.MIT.EDU
> Subject: porta troubles
>
> I discovered a problem with either my circuit or my PIC code, and I'm
> stumped. Not sure anyone can help "remotely", but on the off chance the
> symptoms ring any bells for anyone, I thought I'd write it up.
>
> One of my porta pins (this is a 16f84) is used to turn on and off power
> to an external device. porta has some input pins and some output pins,
> but none of them change from one to the other, so I don't think it's a
> "read-modify-write" problem.
>
> The pin is directly connected to the input of one gate of a 74HC14 (hex
> schmitt inverter), and the inverter in turn drives the gate of an
> n-channel MOSFET: so when the porta pin is high, the inverter output is
> low, turning the FET "on". And vice versa.
>
> I'm using bsf and bcf to toggle the pin. The problem is that the pin,
> once it's been brought high, doesn't seem to want to go back low. I
> assume it's a software problem, but I've been over the code many, many
> times and can't find it. And in fact the simulator tells me it's working
> fine: under simulation, the pin goes low when it should. But in the
> circuit, once it's on it stays on. Weird. I'm stumped.
>
> I can't for the life of me think of any electrical reason the pin should
> get stuck "on", can anyone else? I've tried several different PICs, and
> the symptoms are the same, so I don't think I blew up that pin. Besides,
> when I reset, it goes low, as it should at startup.
>
> Any ideas or debugging techniques that might be helpful will be greatly
> appreciated.
>
> Dave Johnson
>