Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assembly problem

Status
Not open for further replies.

alphasil

Programmer
Jan 7, 2012
1
PT
Hi
I have a problem with a code in 8051.

I must use 6 switch with instructions.
The 1º fisrt one, when i press 0 i must put a letter in LCD display.

This code does not work like i want

SETB P2.0 (define the switch)
inst1: JB P2.0, outra
MOV P1, #'N'
SJMP inst1
outra: MOV P1, #'S'
SJMP inst1

But the button (switch) doesn't do anything...

any help?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top