Maybe add this to your code?
Code:ShiftOut data_pin2,clock,1,[%10000001]![]()
Maybe add this to your code?
Code:ShiftOut data_pin2,clock,1,[%10000001]![]()
Dave
Always wear safety glasses while programming.
Hi mackrackit
Thank's for your thoughts
I tried ShiftOut data_pin2,clock,1,[%11000011] but not working properly U2
I would recomend seperate control pins for the second 4094 (OE and STRB) with common CLK.
Or even better, use the two 4094 in chain and feed data to the second Data in out of the first 4094, using common controls as you do now.
Ten you have to send 16bits of course, before activate outputs.
Ioannis
Hi Ioannis
You're right it works perfectly
View circuit and program to Picbasic
Thank you very much my friend Ioannis
Code:INCLUDE "modedefs.bas" DEFINE SHIFT_PAUSEUS 100 TRISC = %00000000 symbol clock=portc.0 symbol data_pin=portc.1 symbol strb1=PORTc.2 symbol strb2=PORTc.3 alarm var word miso var byte alarm = %1001100111010111 miso = alarm>>8 main: high strb1 ShiftOut data_pin,clock,0,[alarm\8] low strb1 high strb2 ShiftOut data_pin,clock,0,[miso] low strb2 pause 2000 goto main![]()
HI DOVEGROUP.
YOU DONT NEED TO USE EXTRA PINS FOR ANOTHER 4094.YOU CAN USE SAME PORTS.
YOU CAN CONNECT "Qs DATA OUT" TO ANOTHER 4094.
Code:include "modedefs.bas" ADCON1 = 7 STRB VAR PORTC.2 DAT VAR PORTC.1 CLK VAR PORTC.0 OUTPUT STRB OUTPUT DAT OUTPUT CLK DATA_1 VAR BYTE DATA_2 VAR BYTE DATA_1 = %11000011 DATA_2 = %10000001 MAIN : SHIFTOUT DAT , CLK , 1,[DATA_2 , DATA_1] STRB = 1 : PAUSEUS 100 : STRB = 0 GOTO MAIN
Hmm, although I did proposed that too, dovegroup prefered to do the other way. May be it he needs seperate control over the second chip.
If there are free pins then it is OK I guess.
Ioannis
Bookmarks