Hi
You should use three outputs of micro. Data, Clock, Strobe
Set clock to zero
Wait
Set data (zero or one)
Wait
Set clock to one
Repeat above pseudo code eight times then Set strobe to one
I had the following C code with inline assembly from 10 years ago when I was a student. I used 4094 to extend PC parallel port.
You need to call ON() or OFF() eight times then call latch.
For example, If you want to turn all output on call ON() eight times.
If you want to turn all output off call OFF() eight times.
void ON()
{
asm{mov al,3; mov dx,888; out dx,al}
asm{mov al,0; mov dx,888; out dx,al}
}
void OFF()
{
asm{mov al,1; mov dx,888; out dx,al}
delay ();
asm{mov al,0; mov dx,888; out dx,al}
delay ();
}
void LATCH()
{
asm{mov al,4; mov dx,888; out dx,al}
asm{mov al,0; mov dx,888; out dx,al}
}