8051 program to get data from SWs on P1 and send it to LEDs on P2
ORG 0
MOVA,#0
MOVP2,A ;P2 as output
MOVA,#0FFH
MOVP1,A;P1 AS INPUT
BACK:MOV A,P1;get data from SWs on P1
MOV P2,A ;send it to LEDs on P2
SJMP BACK ;keep doing it
EN D
All About 8051 Microcontroller.Learn all basics of Microcontrollers and Embedded Systems.
Subscribe to our newsletter to get the latest updates to your inbox. ;-)
Your email address is safe with us!
© 2015 8051 Microcontroller. Designed by Bassar Patel
0 comments:
Post a Comment
If you have any questions or droughts feel free to ask here.