SlideShare a Scribd company logo
Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP
Seven segment interfacing with 8051
The name 7 segments imply there are 7 LED segments arranged as shown
Seven segment displays are used to display digits from 0 to 9 and they also
display letters A to F
Working
There are two main constructions of the seven-segment display modules
Common Cathode: In this type of segments all the cathode terminals are
made common and tied to GND. Thus the segments a to g needs a logic
High signal(5v) in order to glow.
Common Anode: In this type of segments all the anodes terminals are
made common and tied to VCC(5v). Thus the segments a to g needs a
logic LOW signal(GND) in order to glow.
Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP
Components required
 8051 Microcontroller
 7-Segment-Display
 2:4 Decoder
 NPN bipolar junction transistor –
 5V Power supply
Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP
We will have two lookup tables that have values that are the
complement of each other depending on whether we are using common
anode/common cathode type seven-segment display.
Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP
Assembly language program to interface seven segment display (0-9)
ORG 4000H
DB: 3FH, 06H, 5BH, 4FH, 66H, 6DH, 7DH, 07H, 7FH, 6FH, 0
; Lookup table for digits 0 to 9
ORG 0000H
main: MOV DPTR, #4000H
Repeat: CLR A
MOVC A, @A+DPTR ; Copy data from external location to accumulator
MOV P1, A ; Move the pattern of the digit into port P2
ACALL delay ; Call a delay to so that the transition is visible
INC DPTR ; Point to the next pattern
CJNE A, 0, Repeat ; Repeat till 0 (Stop bit) is received
SJMP main ; Run this forever till externally stopped
Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP
Mode P3.4 P3.3
Active
Module
1 0 0 1
2 0 1 2
3 1 0 3
4 1 1 4
Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP
Seven segment display – Four Modules
Now to interface more than one module at once with the 8051 microcontroller. Hence, we
connect a 2:4 decoder, whose inputs are given by pin P3.3 and pin P3.4.
Based on the status of these two pins, we come up with four modes that correspond to the
display selected.
Assembly language program to interface quad seven segment displays to 8051
ORG 4000H
DB 06H, 5BH, 4FH, 66H
ORG 0000H
main: MOV DPTR, #4000H
MOV P3, #00H ; clear the port 3 to use it as output port
CLR P3.3 ; Mode 1
CLR P3.4 ; 00
CLR A
MOVC A, @A+DPTR
CPL A
MOV P2, A ; P2 = 00000110b = pattern of digit ‘1’
ACALL delay
INC DPTR
SETB P3.3 ; Mode 2
CLR P3.4 ; 01
CLR A
MOVC A, @A+DPTR
Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP
CPL A
MOV P2, A ; P2 = 01011011b = pattern of digit ‘2’
ACALL delay
INC DPTR
CLR P3.3 ; Mode 3
SETB P3.4 ; 10
CLR A
MOVC A, @A+DPTR
CPL A
MOV P2, A ; P2 = 01001111b = pattern of digit ‘3’
ACALL delay
INC DPTR
SETB P3.3 ; Mode 4
SETB P3.3 ; 11
CLR A
MOVC A, @A+DPTR
CPL A
MOV P2, A ; P2 = 01100110b = pattern of digit ‘4’
ACALL delay
SJMP main ; Run this program forever

More Related Content

What's hot

Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
Aarav Soni
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
KanchanPatil34
 
3.programmable interrupt controller 8259
3.programmable interrupt controller 82593.programmable interrupt controller 8259
3.programmable interrupt controller 8259
MdFazleRabbi18
 
8051 Timer
8051 Timer8051 Timer
8051 Timer
Ramasubbu .P
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
Monica Gunjal
 
8251 USART
8251 USART8251 USART
8251 USART
coolsdhanesh
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
ShivamSood22
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
kamlesh deshmukh
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
UshaRani289
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
Dr.YNM
 
8051 serial communication
8051 serial communication8051 serial communication
8051 serial communicationasteriskbimal
 
8051 serial communication-UART
8051 serial communication-UART8051 serial communication-UART
8051 serial communication-UART
Pantech ProLabs India Pvt Ltd
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
ShivamSood22
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adcPRADEEP
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
Ankur Mahajan
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
Jismy .K.Jose
 
Key board interfacing with 8051
Key board interfacing with 8051Key board interfacing with 8051
Key board interfacing with 8051
DominicHendry
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
Poojith Chowdhary
 
I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
ssuser3a47cb
 

What's hot (20)

Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
3.programmable interrupt controller 8259
3.programmable interrupt controller 82593.programmable interrupt controller 8259
3.programmable interrupt controller 8259
 
8051 Timer
8051 Timer8051 Timer
8051 Timer
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Adc interfacing
Adc interfacingAdc interfacing
Adc interfacing
 
8251 USART
8251 USART8251 USART
8251 USART
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
Microcontroller-8051.ppt
Microcontroller-8051.pptMicrocontroller-8051.ppt
Microcontroller-8051.ppt
 
8051 serial communication
8051 serial communication8051 serial communication
8051 serial communication
 
8051 serial communication-UART
8051 serial communication-UART8051 serial communication-UART
8051 serial communication-UART
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Interfacing adc
Interfacing adcInterfacing adc
Interfacing adc
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
 
Key board interfacing with 8051
Key board interfacing with 8051Key board interfacing with 8051
Key board interfacing with 8051
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
I/O port programming in 8051
I/O port programming in 8051I/O port programming in 8051
I/O port programming in 8051
 

Similar to Seven segment interfacing with 8051.pdf

8051.pdf
8051.pdf8051.pdf
Ppt on interfacing led and 7 segment with 8951
Ppt on interfacing led and 7 segment with 8951 Ppt on interfacing led and 7 segment with 8951
Ppt on interfacing led and 7 segment with 8951 pooja jaiswal
 
Ppt on interfacing led and 7 segmentwith 8951
Ppt on interfacing led  and 7 segmentwith 8951Ppt on interfacing led  and 7 segmentwith 8951
Ppt on interfacing led and 7 segmentwith 8951
pooja jaiswal
 
IRJET - Interfacing Multi-Digit 7-Segment with 8051 Microcontroller
IRJET -  	  Interfacing Multi-Digit 7-Segment with 8051 MicrocontrollerIRJET -  	  Interfacing Multi-Digit 7-Segment with 8051 Microcontroller
IRJET - Interfacing Multi-Digit 7-Segment with 8051 Microcontroller
IRJET Journal
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers final
SARITHA REDDY
 
Electronic code lock device
Electronic code lock deviceElectronic code lock device
Electronic code lock deviceAmitoj Kaur
 
Analog to Digital Converter
Analog to Digital ConverterAnalog to Digital Converter
Analog to Digital Converter
Ariel Tonatiuh Espindola
 
Lcd interfacing
Lcd interfacingLcd interfacing
Lcd interfacing
AshuKaranam
 
Introduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light systemIntroduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light system
Rani Loganathan
 
LCD WITH 8051.docx
LCD WITH 8051.docxLCD WITH 8051.docx
LCD WITH 8051.docx
bhattparthiv23
 
Abstract - Interfacing 5 x7 matrix led display to 8051
Abstract - Interfacing 5 x7 matrix led display to 8051 Abstract - Interfacing 5 x7 matrix led display to 8051
Abstract - Interfacing 5 x7 matrix led display to 8051
Vatsal N Shah
 
Nand gate breadboardtask
Nand gate breadboardtaskNand gate breadboardtask
Nand gate breadboardtask
shankarganesh73
 
Eee iv-microcontrollers [10 es42]-assignment
Eee iv-microcontrollers [10 es42]-assignmentEee iv-microcontrollers [10 es42]-assignment
Eee iv-microcontrollers [10 es42]-assignment
Gopinath.B.L Naidu
 
IMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERIMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETER
Vijay Elavunkal
 
Analog to Digital Converters
Analog to Digital ConvertersAnalog to Digital Converters
Analog to Digital Converters
Amitabh Shukla
 
Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310
DHEERAJ DHAKAR
 
Touchpad Monitored Car
Touchpad Monitored CarTouchpad Monitored Car
Touchpad Monitored Car
IOSR Journals
 
Touchpad Monitored Car
Touchpad Monitored Car Touchpad Monitored Car
Touchpad Monitored Car
IOSR Journals
 
Embedded System
Embedded SystemEmbedded System
Embedded System
Richa Arora
 

Similar to Seven segment interfacing with 8051.pdf (20)

8051.pdf
8051.pdf8051.pdf
8051.pdf
 
Ppt on interfacing led and 7 segment with 8951
Ppt on interfacing led and 7 segment with 8951 Ppt on interfacing led and 7 segment with 8951
Ppt on interfacing led and 7 segment with 8951
 
Ppt on interfacing led and 7 segmentwith 8951
Ppt on interfacing led  and 7 segmentwith 8951Ppt on interfacing led  and 7 segmentwith 8951
Ppt on interfacing led and 7 segmentwith 8951
 
IRJET - Interfacing Multi-Digit 7-Segment with 8051 Microcontroller
IRJET -  	  Interfacing Multi-Digit 7-Segment with 8051 MicrocontrollerIRJET -  	  Interfacing Multi-Digit 7-Segment with 8051 Microcontroller
IRJET - Interfacing Multi-Digit 7-Segment with 8051 Microcontroller
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers final
 
Electronic code lock device
Electronic code lock deviceElectronic code lock device
Electronic code lock device
 
Analog to Digital Converter
Analog to Digital ConverterAnalog to Digital Converter
Analog to Digital Converter
 
Lcd interfacing
Lcd interfacingLcd interfacing
Lcd interfacing
 
Introduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light systemIntroduction to embedded system & density based traffic light system
Introduction to embedded system & density based traffic light system
 
8051 FINIAL
8051 FINIAL8051 FINIAL
8051 FINIAL
 
LCD WITH 8051.docx
LCD WITH 8051.docxLCD WITH 8051.docx
LCD WITH 8051.docx
 
Abstract - Interfacing 5 x7 matrix led display to 8051
Abstract - Interfacing 5 x7 matrix led display to 8051 Abstract - Interfacing 5 x7 matrix led display to 8051
Abstract - Interfacing 5 x7 matrix led display to 8051
 
Nand gate breadboardtask
Nand gate breadboardtaskNand gate breadboardtask
Nand gate breadboardtask
 
Eee iv-microcontrollers [10 es42]-assignment
Eee iv-microcontrollers [10 es42]-assignmentEee iv-microcontrollers [10 es42]-assignment
Eee iv-microcontrollers [10 es42]-assignment
 
IMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERIMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETER
 
Analog to Digital Converters
Analog to Digital ConvertersAnalog to Digital Converters
Analog to Digital Converters
 
Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310Microprocessorlabmanual ee0310
Microprocessorlabmanual ee0310
 
Touchpad Monitored Car
Touchpad Monitored CarTouchpad Monitored Car
Touchpad Monitored Car
 
Touchpad Monitored Car
Touchpad Monitored Car Touchpad Monitored Car
Touchpad Monitored Car
 
Embedded System
Embedded SystemEmbedded System
Embedded System
 

More from Srikrishna Thota

solar energy introduction.pdf
 solar energy introduction.pdf solar energy introduction.pdf
solar energy introduction.pdf
Srikrishna Thota
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
Srikrishna Thota
 
Types of Microcontrollers.pdf
Types of Microcontrollers.pdfTypes of Microcontrollers.pdf
Types of Microcontrollers.pdf
Srikrishna Thota
 
Addressing modes of 8051.pdf
Addressing modes of 8051.pdfAddressing modes of 8051.pdf
Addressing modes of 8051.pdf
Srikrishna Thota
 
interrupts of 8051.pdf
interrupts of 8051.pdfinterrupts of 8051.pdf
interrupts of 8051.pdf
Srikrishna Thota
 
Port Organization of 8051 .pdf
Port Organization of 8051 .pdfPort Organization of 8051 .pdf
Port Organization of 8051 .pdf
Srikrishna Thota
 
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfDEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
Srikrishna Thota
 
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdfInterfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Srikrishna Thota
 
interfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdfinterfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdf
Srikrishna Thota
 
BInary Number Representation
 BInary Number Representation BInary Number Representation
BInary Number Representation
Srikrishna Thota
 
Number Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsNumber Base Conversion Digital Electronics
Number Base Conversion Digital Electronics
Srikrishna Thota
 
Operational amplifiers
Operational amplifiers Operational amplifiers
Operational amplifiers
Srikrishna Thota
 
Digital Electronics Notes
Digital Electronics Notes Digital Electronics Notes
Digital Electronics Notes
Srikrishna Thota
 
The 8255 PPI
The 8255 PPIThe 8255 PPI
The 8255 PPI
Srikrishna Thota
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
Srikrishna Thota
 
Analog to Digital Conversion Basics
Analog to Digital Conversion BasicsAnalog to Digital Conversion Basics
Analog to Digital Conversion Basics
Srikrishna Thota
 
8259 programmable interrupt controller
8259 programmable interrupt controller8259 programmable interrupt controller
8259 programmable interrupt controller
Srikrishna Thota
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
Srikrishna Thota
 

More from Srikrishna Thota (18)

solar energy introduction.pdf
 solar energy introduction.pdf solar energy introduction.pdf
solar energy introduction.pdf
 
8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf8051 Architecture and PIN Configuration.pdf
8051 Architecture and PIN Configuration.pdf
 
Types of Microcontrollers.pdf
Types of Microcontrollers.pdfTypes of Microcontrollers.pdf
Types of Microcontrollers.pdf
 
Addressing modes of 8051.pdf
Addressing modes of 8051.pdfAddressing modes of 8051.pdf
Addressing modes of 8051.pdf
 
interrupts of 8051.pdf
interrupts of 8051.pdfinterrupts of 8051.pdf
interrupts of 8051.pdf
 
Port Organization of 8051 .pdf
Port Organization of 8051 .pdfPort Organization of 8051 .pdf
Port Organization of 8051 .pdf
 
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfDEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
 
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdfInterfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
Interfacing of 8051 with 8255 Programmable Peripheral Interface.pdf
 
interfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdfinterfacing of temperature sensor LM 35 with 8051.pdf
interfacing of temperature sensor LM 35 with 8051.pdf
 
BInary Number Representation
 BInary Number Representation BInary Number Representation
BInary Number Representation
 
Number Base Conversion Digital Electronics
Number Base Conversion Digital ElectronicsNumber Base Conversion Digital Electronics
Number Base Conversion Digital Electronics
 
Operational amplifiers
Operational amplifiers Operational amplifiers
Operational amplifiers
 
Digital Electronics Notes
Digital Electronics Notes Digital Electronics Notes
Digital Electronics Notes
 
The 8255 PPI
The 8255 PPIThe 8255 PPI
The 8255 PPI
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
Analog to Digital Conversion Basics
Analog to Digital Conversion BasicsAnalog to Digital Conversion Basics
Analog to Digital Conversion Basics
 
8259 programmable interrupt controller
8259 programmable interrupt controller8259 programmable interrupt controller
8259 programmable interrupt controller
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
 

Recently uploaded

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 

Recently uploaded (20)

The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 

Seven segment interfacing with 8051.pdf

  • 1. Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP Seven segment interfacing with 8051 The name 7 segments imply there are 7 LED segments arranged as shown Seven segment displays are used to display digits from 0 to 9 and they also display letters A to F Working There are two main constructions of the seven-segment display modules Common Cathode: In this type of segments all the cathode terminals are made common and tied to GND. Thus the segments a to g needs a logic High signal(5v) in order to glow. Common Anode: In this type of segments all the anodes terminals are made common and tied to VCC(5v). Thus the segments a to g needs a logic LOW signal(GND) in order to glow.
  • 2. Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP Components required  8051 Microcontroller  7-Segment-Display  2:4 Decoder  NPN bipolar junction transistor –  5V Power supply
  • 3. Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP We will have two lookup tables that have values that are the complement of each other depending on whether we are using common anode/common cathode type seven-segment display.
  • 4. Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP Assembly language program to interface seven segment display (0-9) ORG 4000H DB: 3FH, 06H, 5BH, 4FH, 66H, 6DH, 7DH, 07H, 7FH, 6FH, 0 ; Lookup table for digits 0 to 9 ORG 0000H main: MOV DPTR, #4000H Repeat: CLR A MOVC A, @A+DPTR ; Copy data from external location to accumulator MOV P1, A ; Move the pattern of the digit into port P2 ACALL delay ; Call a delay to so that the transition is visible INC DPTR ; Point to the next pattern CJNE A, 0, Repeat ; Repeat till 0 (Stop bit) is received SJMP main ; Run this forever till externally stopped
  • 5. Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP Mode P3.4 P3.3 Active Module 1 0 0 1 2 0 1 2 3 1 0 3 4 1 1 4
  • 6. Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP Seven segment display – Four Modules Now to interface more than one module at once with the 8051 microcontroller. Hence, we connect a 2:4 decoder, whose inputs are given by pin P3.3 and pin P3.4. Based on the status of these two pins, we come up with four modes that correspond to the display selected. Assembly language program to interface quad seven segment displays to 8051 ORG 4000H DB 06H, 5BH, 4FH, 66H ORG 0000H main: MOV DPTR, #4000H MOV P3, #00H ; clear the port 3 to use it as output port CLR P3.3 ; Mode 1 CLR P3.4 ; 00 CLR A MOVC A, @A+DPTR CPL A MOV P2, A ; P2 = 00000110b = pattern of digit ‘1’ ACALL delay INC DPTR SETB P3.3 ; Mode 2 CLR P3.4 ; 01 CLR A MOVC A, @A+DPTR
  • 7. Seven Segment Interfacing with 8051 T.Srikrishna, M.Sc, M.Tech, GVP CPL A MOV P2, A ; P2 = 01011011b = pattern of digit ‘2’ ACALL delay INC DPTR CLR P3.3 ; Mode 3 SETB P3.4 ; 10 CLR A MOVC A, @A+DPTR CPL A MOV P2, A ; P2 = 01001111b = pattern of digit ‘3’ ACALL delay INC DPTR SETB P3.3 ; Mode 4 SETB P3.3 ; 11 CLR A MOVC A, @A+DPTR CPL A MOV P2, A ; P2 = 01100110b = pattern of digit ‘4’ ACALL delay SJMP main ; Run this program forever