hawkhigh
Newbie level 3
- Joined
- Nov 29, 2012
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,301
Hello,
i hope to assist me in this problem...
i am doing a project by suing 7 segment display and it looks like this one :
this one has 12 pins that are 6 at the bottom and 6 at the top
in my project i want make a digital clock by using PASIC STAMP programming but it didn't show me what i want,
these are my programming, are they correct???
in this i want show the minutes in the first two digits and hours in the second two digits and i want show the middle dismal points as a seconds...
please repeat me:lol:
i hope to assist me in this problem...
i am doing a project by suing 7 segment display and it looks like this one :
this one has 12 pins that are 6 at the bottom and 6 at the top
in my project i want make a digital clock by using PASIC STAMP programming but it didn't show me what i want,
these are my programming, are they correct???
Code:
'{$STAMP BS2}
'{$PBASIC 2.5}
main:
seconds1 VAR Byte
seconds2 VAR Byte
counter VAR Byte
seconds1=0
seconds2=0
OUTL = %00000000 ' OUTH initialized to low.
DIRL = %11111111 ' Set P0-P15 to all output-low.
OUTH = %00000000 ' OUTH initialized to low.
DIRH = %11111111 ' Set P0-P15 to all output-low.
DO
FOR seconds2=0 TO 5 STEP 1
FOR seconds1=0 TO 9 STEP 1
LOOKUP seconds1, [ %11100111, %10000100, %11010011,
%11010110, %10110100, %01110110,
%01110111, %11000100, %11110111, %11110110 ], OUTH
LOOKUP seconds2, [ %11100111, %10000100, %11010011,
%11010110, %10110100, %01110110,
%01110111, %11000100, %11110111, %11110110 ], OUTL
PAUSE 60000 ' for minuts 60000 for seconds 1000 for hours 1200000
NEXT
seconds1=0
NEXT
seconds2=0
LOOP
END
GOSUB ledones
GOSUB ledtens
ledtens:
DEBUG "led 1 from 0 to 9!"
' Digit:
' BAFG.CDE
OUTL = %11100111 ' 0
PAUSE 1000
OUTL = %10000100 ' 1
PAUSE 1000
OUTL = %11010011 ' 2
PAUSE 1000
OUTL = %11010110 ' 3
PAUSE 1000
OUTL = %10110100 ' 4
PAUSE 1000
OUTL = %01110110 ' 5
PAUSE 1000
OUTL = %01110111 ' 6
PAUSE 1000
OUTL = %11000100 ' 7
PAUSE 1000
OUTL = %11110111 ' 8
PAUSE 1000
OUTL = %11110110 ' 9
PAUSE 1000
DIRL = %00000000 ' I/O pins to input,
' segments off.
RETURN
ledones:
DEBUG "led 2 from 0 to 9!"
OUTH = %00000000 ' OUTH initialized to low.
DIRH = %11111111 ' Set P0-P15 to all output-low.
' Digit:
' BAFG.CDE
OUTH = %11100111 ' 0
PAUSE 1000
OUTH = %10000100 ' 1
PAUSE 1000
OUTH = %11010011 ' 2
PAUSE 1000
OUTH = %11010110 ' 3
PAUSE 1000
OUTH = %10110100 ' 4
PAUSE 1000
OUTH = %01110110 ' 5
PAUSE 1000
OUTH = %01110111 ' 6
PAUSE 1000
OUTH = %11000100 ' 7
PAUSE 1000
OUTH = %11110111 ' 8
PAUSE 1000
OUTH = %11110110 ' 9
PAUSE 1000
DIRH = %00000000 ' I/O pins to input,
' segments off.
RETURN
END
in this i want show the minutes in the first two digits and hours in the second two digits and i want show the middle dismal points as a seconds...
please repeat me:lol: