using assembly language 8. The following program sequence tries to drive the LEDS so that LEDS-LEDO, LED2, LED4, LE...
8. The following program sequence tries to drive the LEDS so that LEDS-LEDO, LED2, LED4, LED6 turns on one at a time starting with LEDO and repeat. Each LED must be lighted for about half a second. But there are some errors in the program that are preventing the program to run successfully. Debug the program and rewrite it to make the program run successfully to perform the desired task [10 points HCS12 org $2000 movb $00,DDRB Idx movb 2,X+,portb jsr 1.5 KO PB7 DZww forever: led_tab PB6 ledIp: PBS delay 100ms epx Wled tab+10 bne led_Ip bra forever de.b S01,S00,$11,520 PB PB3 PB led_tab: PB ;Delay subroutine here end PBO
8. The following program sequence tries to drive the LEDS so that LEDS-LEDO, LED2, LED4, LED6 turns on one at a time starting with LEDO and repeat. Each LED must be lighted for about half a second. But there are some errors in the program that are preventing the program to run successfully. Debug the program and rewrite it to make the program run successfully to perform the desired task [10 points HCS12 org $2000 movb $00,DDRB Idx movb 2,X+,portb jsr 1.5 KO PB7 DZww forever: led_tab PB6 ledIp: PBS delay 100ms epx Wled tab+10 bne led_Ip bra forever de.b S01,S00,$11,520 PB PB3 PB led_tab: PB ;Delay subroutine here end PBO