Re: Using 74xx574 D FF to expand PIC outputs



On Mon, 16 Jul 2007 14:28:30 -0400, Peter S. May wrote:

Greetings. I'm having a problem that reaches beyond my basic knowledge
of digital logic and electronics, and so I'm hoping an expert eye can
spot the mistake. (Also, please suggest a more appropriate group if I'm
in the wrong place.)

I'm working on a seemingly straightforward means of expanding the
limited outputs of a PIC 16F88 to 32 pins by way of four 74ABT574 octal
D-type flip-flops and a 2-to-4 decoder. The way the trivial design is
supposed to work is that each RBn pin of the PIC is attached to a
corresponding Dn pin on each of the four 574s. The program would assign
their data round-robin style, assigning one word to PORTB and then
clocking the destination DFFs using the demuxer. The outputs in this
experiment are LEDs run via 1K resistors (3 or 4mA).

....
bsf PORTA,4
....
bcf PORTA,4
....

Aren't these instructions read-modify-write? When the pin goes
high-impedance to do the read, there could be a glitch. I'd just use
the right byte, like for example (pseudocode):

lda 00000001b ; for bit 0
output A, portA
lda 00000000b ; to make the strobe go away
output A, portA

Of course, you've already written your data to port B.

If you're using port A for other stuff, keep a shadow copy in RAM.

Good Luck!
Rich

.



Relevant Pages

  • Re: PIC16F88, PORTA strange behaviour
    ... >> Setting an output low on PORTA, ... >> on PORTA to go low too. ... Try using a pin on port A and a pin on another port, ...
    (comp.arch.embedded)
  • 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: 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)