Schematic...... Not some wild a** guess... Definitive schematic Please...
Schematic...... Not some wild a** guess... Definitive schematic Please...
Dave Purola,
N8NTA
EN82fn
Schematic of what?
Here is simple counter code I've made. It just counts from 0 to 99. But it is far from perfection.
Code:marcato: tato=0 FOR KAKO=0 TO 99 XAXO=KAKO DIG 0 high latch 'enable write ones low latch2 'disable write tens gosub decoder 'display ones if xaxo=0 and kako dig 1<>0 then 'if count is above 10 low latch 'disable ones high latch2 'enable tens 'tato=tato+1 xaxo=kako dig 1 gosub decoder xaxo=0 endif if xaxo=0 and kako dig 1=0 then 'reset leading 0 low latch high latch2 xaxo=0 gosub decoder endif PAUSE 300 NEXT goto marcato END decoder: IF XAXO=0 THEN GOSUB ZERO IF XAXO=1 THEN GOSUB ONE IF XAXO=2 THEN GOSUB TWO IF XAXO=3 THEN GOSUB THREE IF XAXO=4 THEN GOSUB FOUR IF XAXO=5 THEN GOSUB FIVE IF XAXO=6 THEN GOSUB SIX IF XAXO=7 THEN GOSUB SEVEN IF XAXO=8 THEN GOSUB EIGHT IF XAXO=9 THEN GOSUB NINE return ZERO: LOW A: LOW B: LOW C: LOW D RETURN ONE: HIGH A: LOW B: LOW C: LOW D RETURN TWO: LOW A: HIGH B: LOW C: LOW D RETURN THREE: HIGH A: HIGH B: LOW C: LOW D RETURN FOUR: HIGH C: LOW A: LOW B: LOW D RETURN FIVE: HIGH C: HIGH A: LOW B: LOW D RETURN SIX: HIGH C: HIGH B: LOW A: LOW D RETURN SEVEN: HIGH A: HIGH B: HIGH C: LOW D RETURN EIGHT: HIGH D: LOW A: LOW B: LOW C RETURN NINE: HIGH D: HIGH A: LOW B: LOW C RETURN
Choose a port (A,B, or C). Connect the low 4 pins of the port to carry the number you want to display and connect those to the data pins of the CD4543BE. Then connect the 4 pins of the high byte to the latches. to write "2" to the first digit, send "12" to the port. to write 9 to the second digit send "29" to the port. Write 6 to the 3rd port with "46" and so on.
Excellent, thank you! will give it a try
So as I understand, this should display "2" in 1st digit from left?
PORTC=%10000010
or
PORTC=52
?
The binary code you displayed is correct, however that is 82, not 52,
52 would put "2" on the 4th digit AND the first digit as well. (the numbers are hex, by the way - not decimal)
Last edited by Charlie; - 7th March 2020 at 12:52.
Yes I see, is there a number to directly use decimal variable, or I need to convert it to hex?
And by the way, since I will have 16 total of such modules, to save number of MCU pins used, I come up with idea of using CD4514BE - 4 to 16 decoder, this should allow me to by using only 5 pins from MCU, drive up to 16 modules.
![]()
Last edited by CuriousOne; - 8th March 2020 at 05:19.
Bookmarks