hi guys
i've just tried writing a simple program to flash some LED's On/Off
i cant see whats wrong, but when i use PIC simulator IDE it just seems to get stuck in the first loop, and looking at the memory address ...the value doesnt decrease by 1 (it doesnt decrease at all)
is it the simulator...or is there something simple i just cant see?
thanks
Kane
i've just tried writing a simple program to flash some LED's On/Off
Code:
STATUS equ 03
PORTA equ 05
PORTB equ 06
TRISA equ 85
TRISB equ 86
RP0 equ 05
CNTR equ 0C
CNTR1 equ 0D
;Program
START org 0
bsf STATUS,RP0
movlw b'00000000'
movwf TRISA
movlw b'00000000'
movwf TRISB
bcf STATUS,RP0
MAIN movlw b'00000000'
movwf PORTB
movlw b'00000011
movwf CNTR
LOOP DECFSZ CNTR,0
GOTO LOOP
movlw b'11111111'
movwf PORTB
movlw b'00000011'
movwf CNTR1
LOOP2 DECFSZ CNTR1,0
GOTO LOOP2
END
i cant see whats wrong, but when i use PIC simulator IDE it just seems to get stuck in the first loop, and looking at the memory address ...the value doesnt decrease by 1 (it doesnt decrease at all)
is it the simulator...or is there something simple i just cant see?
thanks
Kane