Professional Documents
Culture Documents
7segment Keypad EEPROM
7segment Keypad EEPROM
7segment Keypad EEPROM
interface
7-segment display
• Used as an output.
• Can display 0-9 and few alphabets also.
• Consist of 7 individual LEDS
• Two types
– Common anode
– Common cathode.
Common Anode
Common Cathode
Interfacing with PIC
• PORTS are used.
• PORTB, PORTC, PORTD are preferred.
– As they all have 8 pins.
– PORT pins should be configured in output mode.
Logic- Common Anode
• Common Anode of 7-segment is connected to
supply (+).
• If the individual cathodes of segments are
connected to ground, the LED/segment will
glow.
• This is achieved by making PORT pin to be at
ground level or logic low.
• Writing ‘0’ to PORT pin will enable the particular
segment/LED.
Logic- Common Cathode
• Common Cathode of 7-segment is connected
to ground.
• If the individual anodes of segments are
connected to supply, the LED/segment will
glow.
• This is achieved by making PORT pin to be at
logic high.
• Writing ‘1’ to PORT pin will enable the particular
segment/LED.
Program logic- common anode
• PORTD is connected to 7-segment display.
a b c d e f g
RD0 RD1 RD2 RD3 RD4 RD5 RD6
* 0 #
EEPROM
• PIC16F877a – EEPROM- 256 X 8
• 8 bits wide, 256 locations 256 bytes
• EEPROM is not directly accessible.
• Indirectly accessed through SFR
Contd…
• EEDATA - Data to be written or read
• EEADR - addresses of EEPROM to be accessed
• EECON1- bits controlling read and write
operation.