I am trying to blink led with switch
I have one switch and one LED.
switch is connected to port pin PO.0
LED is connected to port pin P1.0
if switch is on then LED is on
if switch is of then LED is of
assembly code
whats the problem , Led is not blinking
I have one switch and one LED.
switch is connected to port pin PO.0
LED is connected to port pin P1.0
if switch is on then LED is on
if switch is of then LED is of
assembly code
Code:
org 0h
ON:
setb P1.0 ; led on
setb P0.0 ; switch is on
OFF:
clr P1.0 ; led off
clr P0.0 ; switch is off
main:
jb P0.0, ON ; switch is closed
jnb P0.0, OFF ; switch is open
sjmp main
end
whats the problem , Led is not blinking
Attachments
Last edited: