You are currently viewing How to Interface LED with 8051 Lab Trainer Kit

How to Interface LED with 8051 Lab Trainer Kit

Spread the love

8051 – TRAINER BOARD

PS-TRAINER-8051 trainer kit is proposed to smooth the progress of learning and developing designs of MCU from Intel and NXP. It has facility to connect PC’s 101/104 Keyboard, to enter user programs in Assembly languages. Serial communication achieved using 8051. It also supports C & assembly language in standalone kit (P89V51RD2). It’s designed as to facilitate On-board Programmer for NXP 8051 MCU through ISP on serial port.

LED (LIGHT EMITTING DIODE)

Light Emitting Diodes (LED) is the most commonly used components, usually for displaying pins digital states. Typical uses of LEDs include alarm devices, timers and confirmation of user input such as a mouse click or keystroke.

INTERFACING LED

Fig. 1 shows how to interface the LED to microcontroller. As you can see the Anode is connected through a resistor to GND & the Cathode is connected to the Microcontroller pin. So when the Port Pin is HIGH the LED is OFF & when the Port Pin is LOW the LED is turned ON.

 How to Interface LED with 8051 Lab Trainer Kit
Fig. 1 Interfacing LED to Microcontroller

INTERFACING LED WITH 8051

LED in 8051 Trainer Board works by turning ON a LED & then turning it OFF & then looping back to START. However the operating speed of microcontroller is very high so the flashing frequency will also be very fast to be detected by human eye.

PIN ASSIGNMENT WITH 8051

How to Interface LED with 8051 Lab Trainer Kit

CIRCUIT DIAGRAM TO INTERFACE LED WITH 8051

How to Interface LED with 8051 Lab Trainer Kit

ASSEMBLY PROGRAM TO ON AND OFF LED USING 8051

MEMORY ADDRESSOPCODEMNEMONICS
910074 55L1:MOV A,#FF
91027CMOV B0,A
910412 91 0F      LCALL DELAY
910774 00MOV A,#00
91097CMOV B0,A
910b12 91 0F      LCALL DELAY
910D80 F9SJMP L1
910F7D 05            DELAY: MOV R5,#05
91117C FF H3       MOV R4,#FF
91137B FF H2       MOV R3,#FF
9115DB FEH1:     DJNZ R3,H1
9117DC FADJNZ R4,H2
9119DD F6           DJNZ R5,H3
911B22RET

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.