taesoon737
New Member
I have made my programming for my picaxe 28x 1 to count up to 7 hours but i realised that picaxe 28x 1 has 7 outputs where the 4511b(which i need to connect the picaxe 28x 1 into so i can display it on the seven segment displays) has only 4 inputs. is there any commands i can use so b0 equals to 4 outputs (ie only 4 outputs controlling the counting part so the other three can be connected to other components like the LED or the buzzer) and not all of them? Or is there any ic which has seven inputs and can covert binary into numbers?
This is my programming. If there is any mistake or any areas to improve on please tell me. This will display the time in hours and minutes.
This is my programming. If there is any mistake or any areas to improve on please tell me. This will display the time in hours and minutes.
Code:
if input5 = 1 then goto sub0
goto main
sub0:
setint %00000001,00000001
for b0 = 0 to 59
let pins = b0
high portc 1
pause 250
high portc 2
pause 250
high portc 3
pause 250
wait 59
pause 250
next b0
goto sub1
sub1:
setint %00000001, %00000001
for b0 = 100 to 159
let pins = b0
high portc 1
pause 250
high portc 2
pause 250
high portc 3
pause 250
wait 59
pause 250
next b0
goto sub2
sub2:
setint %00000001, %00000001
for b0 = 200 to 259
let pins = b0
high portc 1
pause 250
high portc 2
pause 250
high portc 3
pause 250
wait 59
pause 250
next b0
goto sub3
sub3:
setint %00000001, %00000001
for b0 = 300 to 359
let pins = b0
high portc 1
pause 250
high portc 2
pause 250
high portc 3
pause 250
wait 59
pause 250
next b0
goto sub4
sub4:
setint %00000001, %00000001
for b0 = 400 to 459
let pins = b0
high portc 1
pause 250
high portc 2
pause 250
high portc 3
pause 250
wait 59
pause 250
next b0
goto sub5
sub5:
setint %00000001, %00000001
for b0 = 500 to 559
let pins = b0
high portc 1
pause 250
high portc 2
pause 250
high portc 3
pause 250
wait 59
pause 250
next b0
goto sub6
sub6:
setint %00000001, %00000001
for b0 = 600 to 659
let pins = b0
high portc 1
pause 250
high portc 2
pause 250
high portc 3
wait 59
pause 250
next b0
goto sub7
sub7:
setint %00000001, %00000001
b0 = 700
let pins = b0
high portc 1
pause 250
high portc 2
pause 250
high portc 3
pause 250
low portc 1
pause 250
low portc 2
pause 250
low portc 3
pause 250
let pins = 0
goto sub8
sub8:
setint %00000001, %00000001
for b1 = 1 to 60
let pin7 = 1
pause 1000
next b1
goto sub8
interrupt:
let pins = 0
low portc 1
low portc 2
low portc 3
wait 5
goto main
Last edited by a moderator: