VTech Alphabert s Magic Readport User Manual Page 30

  • Download
  • Add to my manuals
  • Print
  • Page
    / 80
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 29
Lab Manual of Microcontroller & Interfacing Page 30
ajmp flash
sequence:
mov a,#0FEh ; Bit pattern for First LED ON, others OFF
next: mov P1,a ; Transfer bit pattern to port P1
rl a ; Rotate for next LED
acall delay ; Delay
ajmp next ; Repeat loop
delay: mov R4,#02h
loop3: mov R6,#0ffh
loop2: mov R5,#0ffh
loop1: djnz R5,loop1
djnz R6,loop2
djnz r4,loop3
ret
end
:: WORKSHEET ::
Exercise: Modify program such that when INT0 occurs, LEDs flash ten times and then stop.
When INT1 occurs LEDs glows one by one sequentially only once and then stop.
Hint: Use separate register as a counter.
Memory
Location
HEX
code
Label Opcode Operands Comments
Page view 29
1 2 ... 25 26 27 28 29 30 31 32 33 34 35 ... 79 80

Comments to this Manuals

No comments