3x4 keypad and 7 segments.
The_Apprentice
Posts: 15
Hello everybody,
I need some help with my project. I'm planning to use a 3x4 keypad and a display with 2 7segments. The plan is to display in the 7segments the number what is press in the keypad.
If any body have any idea or tip I would really appreciate.
Thanks
I need some help with my project. I'm planning to use a 3x4 keypad and a display with 2 7segments. The plan is to display in the 7segments the number what is press in the keypad.
If any body have any idea or tip I would really appreciate.
Thanks
Comments
' ==============================================================================
'
' File...... Ex08 - SevenSegs.BS2
' Purpose... 7-Segment Display
' Author.... Parallax
' E-mail.... stamptech@parallaxinc.com
' Started...
' Updated... 01 MAY 2002
'
' {$STAMP BS2}
'
' ==============================================================================
'
' Program Description
'
' Displays digits on a 7-segment display.
'
' I/O Definitions
'
Segs VAR OUTL ' 7-segment LEDs
'
' Constants
'
Blank CON %00000000 ' clears the display
'
' Variables
'
counter VAR Nib
'
' EEPROM Data
'
' Segments .abcdefg
'
DecDig DATA %01111110 ' 0
DATA %00110000 ' 1
DATA %01101101 ' 2
DATA %01111001 ' 3
DATA %00110011 ' 4
DATA %01011011 ' 5
DATA %01011111 ' 6
DATA %01110000 ' 7
DATA %01111111 ' 8
DATA %01111011 ' 9
'
' Initialization
'
Initialize:
DIRL = %11111111 ' make segments outputs
'
' Program Code
'
Main:
FOR counter = 0 TO 9 ' count
READ (DecDig + counter), Segs ' put 7-seg pattern on digit
PAUSE 1000 ' show for about one second
NEXT
GOTO Main ' do it all again
END
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D. A. Wreski