Re: PIC16F88, PORTA strange behaviour

From: Frank Bemelman (f.bemelmanx_at_xs4all.invalid.nl)
Date: 12/02/04


Date: Thu, 2 Dec 2004 15:23:17 +0100


"Mark A. Odell" <odellmark@hotmail.com> schreef in bericht
news:Xns95B35A85127CFCopyrightMarkOdell@130.133.1.4...
> "Frank Bemelman" <f.bemelmanx@xs4all.invalid.nl> wrote in
> news:41af158c$0$566$e4fe514c@news.xs4all.nl:
>
> > Strange problem:
> >
> > Setting an output low on PORTA, causes another output
> > on PORTA to go low too.
> >
> > Below is the entire program. It should generate two signals:
> >
> > ---, ,---, ,---, ,---, ,---
> > '---' '---' '---' '---'
> > -, ,---, ,---, ,---, ,---
> > '- -' '---' '---' '---'
> >
> > But instead gives this:
> >
> > -, ,-, ,-, ,-, ,-
> > '-----' '-----' '-----' '-----'
> > -, ,---, ,---, ,---, ,---
> > '- -' '---' '---' '---'
>
> Are you doing this without delays in the inter-port pin state changes?
> That is, fast? If so, you've hit the fun errate of read-modify-write on a
> port. Try using a pin on port A and a pin on another port, the problem
> should go away. Microchip has a good description of this problem in one of
> the PIC documents. I can't find it right now. It may have been in the Q&A
> section of the PIC18 reference. Good luck.

No, it's not that. When I pick two outputs on B there is no problem.
With two outputs on A, presto. Also happens with milisecond delay in
between. The code I included was just to demonstrate this behaviour.
I really start thinking it's a flaw in the F88, on the other hand I can
hardly believe that this has to be discovered on my workbench ;)

I'll try a workaround, updating the entire port instead of single
pins.

-- 
Thanks, Frank.
(remove 'x' and 'invalid' when replying by email)


Relevant Pages

  • Re: PIC16F88, PORTA strange behaviour
    ... > Setting an output low on PORTA, ... > on PORTA to go low too. ... Are you doing this without delays in the inter-port pin state changes? ... Try using a pin on port A and a pin on another port, ...
    (comp.arch.embedded)
  • Re: Using 74xx574 D FF to expand PIC outputs
    ... corresponding Dn pin on each of the four 574s. ... output A, portA ... lda 00000000b; to make the strobe go away ... If you're using port A for other stuff, keep a shadow copy in RAM. ...
    (sci.electronics.design)
  • Re: Accessing general I/O addresses
    ... pins you have to cook it up yourself, ... Generally the methods I've seen store a port address and offset to get to ... PORTA = PORTA or action;, where action is whatever action that I do ... only to the pin desired? ...
    (comp.arch.embedded)
  • Re: [patch -mm 20/20 RFC] chardev: GPIO for SCx200 & PC-8736x: add sysfs-GPIO interf
    ... We need a standard rep for GPIO in sysfs, ... GPIO hardware design appears to have 2 top-level factors; ... change will also exhibit in the port attr too. ... if a pin is output only, it shouldnt have an _output_enabled attr. ...
    (Linux-Kernel)
  • Re: OT: DOS programming EPP
    ... There seems to be *no* specifications or equivalent circuits for the parallel port as implemented on the ASICs used in modern PCs. ... it is completely unknown as to the maximum safe sink current to a logic low pin or the maximum source current from a logic high pin. ... The EPP page assumes you did. ... CONTROL bit 5 defaults low. ...
    (sci.electronics.design)