Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
141 views
16 pages
Lab-8 8051 I o Port Programming
Uploaded by
Ankit Dhang
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Lab-8 8051 i o Port Programming For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
141 views
16 pages
Lab-8 8051 I o Port Programming
Uploaded by
Ankit Dhang
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Lab-8 8051 i o Port Programming For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Lab-8 8051 i o Port Programming For Later
You are on page 1
/ 16
Search
Fullscreen
I/O PORT PROGRAMMING IN 10}Write an 8051 assembly language program to toggle the status of the LEDs connected at port 1 pins 0 for every “PQRS” ms, where “PQRS" is last 4-digits of your register number. Assume the crystal frequency as 11.0592 MHz. Verify the output using ESA 8051 Microcontroller kit. TABS BECEZ04P- MP & MC LAB <1TABS 8051 have 4 I/O ports each comprising 8 bits which can be configured as inputs or outputs. Hence, total 32 i/o pins allow the microcontroller to be connected with the peripheral devices. Except port | all other ports are used for dual purpose, all ports are bidirectional and they are constructed with a D type output latch. Pin configuration, ie. whether it is to be configured as an input (1) or an output (0), depends on its logic state, All the ports upon RESET are configured as input, ready to be used as input ports. All ports are byte and bit accessible > Byte accessible : PO,P1,P2,P3 > Bit-accessible : Px.y, where x represents port number ranging from 0 to 3, y represents bit number of the port ranging from 0 10 7 ‘BECE204P- MP & MC LAB @Write an 8051 assembly language program to toggle the status of the LEDs connected at port 1 pins O for every 1 seconds (1000 ms). Assume the crystal frequency as 11,0592 MHz. Verify the output using ESA 8051 Microcontroller kit. ‘ORG 0000H cur P10 BACK: SETB P.O ACALL DELAY car P10 ACALL DELAY SIMP BACK TABS BECEZ04P- MP & MC LABDelay calculation: + LOOPS Time delay : [250x|1+1+2)}x1.085=1085) MON REE LOOP2, repeat LOOPS for 200 times, to 20041085 kz = 217000 1 MOV R2, #200; IMC Bur, “MOV R3,i#250" and “DINZ R2, AGAIN” ot the start and ond of MOV RS, #250; IMC LOOP? [200x(1-+2)/x1.085 js = 651 jis. As @ result, toto time delay NOP IMC ‘of LOOP? Is 217000+651=217651 us NOP 7 1MC DINZR3, LOOPS; 2MC Then LOOPS, repeat LOOP? for 5 times, so Sx 217651 us = 1088255 Ws = 1088 ms or 1,088 seconds. But, “MOV R2,#200" and “DINZ RI, AGAIN” ot the start ond end of LOOP! [5x(1+2)}x1.085 us = 16 us DINZR2,L00P2 ; 2MC DINZRI,LOOPT ;2MC Also "MOV R1,#5" and RET instuction execute once, 3x1.085 = 3 jis RET 4; 2MC Therefore total time delay generated by the entire delay loop program Js 1088255 us + 16 is + Sis = 1088274 ps TABS BECEZ04P- MP & MC LAB
onche ROM (RO-DFFFF Memory Mode: Sat = ATA = Code Rom Sze: [lage:e&Kpozan i neh RAM (O-G5FF) paring stem: [ine SCS ute OPTR register Of Case meni Of hp Xana meneny Sat: __ = fon ff Pom feof pet fd pe ee |[r Bee: [=] tak hee ca pr ox Covel | __ Deets TABS BECEZ04P- MP & MC LABBB options for Trget “Target 1 Device | Tam Ot TUBng | User | C51 | AST. | BL51 Locate | BL51 Mac | Debug | Utes | ‘Sect Feertr ects. Hef Exeatabe: [ESTING Cre Breast: \Objcts\ TESTING Debus bhematon F Browse Hemaon Caan Wine ow © Obecta TESTING LI TABS BECEZ04P- MP & MC LABTABS [EB Options for Target Target Une Sindstor TF ne Speedo FesTine F L2etfeplesen a Sttip FF Rintoman) Lead Meptstenat Sutin Rintoman Ineo Fie Initio Fle esore Dabu Sesson Seng exo Debug Sesson Senge F Besiports 1 Toobox F Beskports IF Teobox IF Wah Wedows &Pefemance Anahaer Wach Wedews Menon Daley I Menor Bley crupu: Diver DLL: Parameter a a Diop DLL _ Parenter: Dios DU: [rsvou — oarestrene resto | 2 0K Hep BECEZO4P- MP & MG IABTABS =H Feder Deb Seat IF Breskpores IF Wah Wedon IF Nena Daioy cPuou: Pam eon Diseg DU: Pray [prion — [ext PORT NUMBERS NOT SAME FOR EVERONE, (CHECK THE PORT NUMBER IN DEVICE MANAGER. Coe Opn IF Cache DATA(SFR) IF Cache DATA ‘Sep Poyan Excuton wth Set rtemst Morte Kents Monte not comected ox cancel BECEZO4P- MP & MG IABJT: 26-Pin Male Connector for Ports PO, P1 and P2 Pin No. on J7 PORT Line Pin No. on J7 7 Pat 2 P22 4 P20 é PIs 3 Pia 70 PI2 ig Pro 7a POS 76 Pod 8 POR 2 POO 2 Pa6 2h Ey = a TABS BECEZ04P- MP & MC LAB aa)
You might also like
8051 Pin Diagram
PDF
No ratings yet
8051 Pin Diagram
20 pages
MP & MC Module-4
PDF
No ratings yet
MP & MC Module-4
72 pages
Programming Parallel Ports
PDF
No ratings yet
Programming Parallel Ports
19 pages
Emb C Merged
PDF
No ratings yet
Emb C Merged
205 pages
MP MC Module-4
PDF
No ratings yet
MP MC Module-4
74 pages
8051
PDF
100% (1)
8051
32 pages
8051 PPT For MSC
PDF
No ratings yet
8051 PPT For MSC
122 pages
1-Module - 1 IntroductionOverview of Embedded Systems,-05!01!2024
PDF
No ratings yet
1-Module - 1 IntroductionOverview of Embedded Systems,-05!01!2024
138 pages
MPMC Unit-4
PDF
No ratings yet
MPMC Unit-4
115 pages
MC Lab Manual 2024-25
PDF
No ratings yet
MC Lab Manual 2024-25
18 pages
Et3491 Embedded Lab
PDF
No ratings yet
Et3491 Embedded Lab
63 pages
8051
PDF
No ratings yet
8051
159 pages
8051 Micro Controller
PDF
No ratings yet
8051 Micro Controller
116 pages
L7 - 8051 Interrupt, Timer and Addressing Modes
PDF
No ratings yet
L7 - 8051 Interrupt, Timer and Addressing Modes
34 pages
Microcontroller Basic
PDF
No ratings yet
Microcontroller Basic
56 pages
Port Programming Assembly 8086
PDF
No ratings yet
Port Programming Assembly 8086
15 pages
MPMC Unit-4
PDF
No ratings yet
MPMC Unit-4
115 pages
Friday, April 20, 2012
PDF
100% (1)
Friday, April 20, 2012
39 pages
L4 - Simple I - O Control
PDF
No ratings yet
L4 - Simple I - O Control
9 pages
8051 Microcontroller
PDF
No ratings yet
8051 Microcontroller
39 pages
2.8051 Pin Diagram.1
PDF
No ratings yet
2.8051 Pin Diagram.1
29 pages
8051 Uc
PDF
No ratings yet
8051 Uc
84 pages
Program For Interfacing 8279: 1. 8085 Microprocessor Kit 2. 8279 Interfacing Module 3. Power Supply
PDF
No ratings yet
Program For Interfacing 8279: 1. 8085 Microprocessor Kit 2. 8279 Interfacing Module 3. Power Supply
21 pages
ESD File
PDF
No ratings yet
ESD File
42 pages
The 8051 Microcontroller
PDF
No ratings yet
The 8051 Microcontroller
169 pages
8051 Microcontroller Basics, STM32CubeIDE, and Use
PDF
No ratings yet
8051 Microcontroller Basics, STM32CubeIDE, and Use
15 pages
8051 Pin Configaration and Architecture
PDF
No ratings yet
8051 Pin Configaration and Architecture
59 pages
Module 5
PDF
No ratings yet
Module 5
67 pages
Lab Manual 8051
PDF
50% (2)
Lab Manual 8051
40 pages
8051 Pin Diagram
PDF
No ratings yet
8051 Pin Diagram
10 pages
Unit 4 Exact PDF MPMC
PDF
No ratings yet
Unit 4 Exact PDF MPMC
46 pages
Chapter 3
PDF
No ratings yet
Chapter 3
45 pages
Presentation Avi
PDF
No ratings yet
Presentation Avi
29 pages
8051
PDF
No ratings yet
8051
37 pages
Chapter TW - Embedded - Student
PDF
No ratings yet
Chapter TW - Embedded - Student
43 pages
8051 Document
PDF
No ratings yet
8051 Document
62 pages
Support Study Material On 8051: 1. Introduction To 8051 Microcontroller
PDF
No ratings yet
Support Study Material On 8051: 1. Introduction To 8051 Microcontroller
38 pages
Microcontroller
PDF
No ratings yet
Microcontroller
40 pages
Led Glowing
PDF
No ratings yet
Led Glowing
5 pages
Module 4
PDF
No ratings yet
Module 4
32 pages
Exp 8
PDF
No ratings yet
Exp 8
3 pages
Seminar ON Embedded System
PDF
0% (1)
Seminar ON Embedded System
35 pages
Design By: Harman S. Gahir Ap, Mca CGC-Gharuan
PDF
No ratings yet
Design By: Harman S. Gahir Ap, Mca CGC-Gharuan
38 pages
Unit IV
PDF
No ratings yet
Unit IV
26 pages
Microcontroller For Embedded Systems RIC-651
PDF
No ratings yet
Microcontroller For Embedded Systems RIC-651
27 pages
2a Prof. Shabiul Lecture Ch-2 1 Octo 2023
PDF
No ratings yet
2a Prof. Shabiul Lecture Ch-2 1 Octo 2023
13 pages
The 8051 Microcontroller Architecture
PDF
No ratings yet
The 8051 Microcontroller Architecture
30 pages
Microcontroller Exp To Write 6 To 8
PDF
No ratings yet
Microcontroller Exp To Write 6 To 8
12 pages
MPMC Unit 5
PDF
No ratings yet
MPMC Unit 5
62 pages
UNIT III Introduction To Microcontroller
PDF
No ratings yet
UNIT III Introduction To Microcontroller
118 pages
Microcontrollers & Embedded Systems
PDF
No ratings yet
Microcontrollers & Embedded Systems
10 pages
Chapter 2 - 8051 Microcontroller
PDF
No ratings yet
Chapter 2 - 8051 Microcontroller
29 pages
8051 MC BT-1-LAPTOP-LJ7D0M7S
PDF
No ratings yet
8051 MC BT-1-LAPTOP-LJ7D0M7S
23 pages
8051 Microcontroller Hardware Interfacing Tutorials - Basic Circuit For 8051
PDF
No ratings yet
8051 Microcontroller Hardware Interfacing Tutorials - Basic Circuit For 8051
4 pages
8051 2ed Hard Lab1
PDF
No ratings yet
8051 2ed Hard Lab1
3 pages