hii
i am trying to test my pic.. however i am incurring some problems.. i am doing a basic test of switchign on and off of the leds ..
here is the code i used
my concern is that i can only see the red light blinking i cannot see all the lights blinking in an orderly fashion..
my second ques.. is my delay always starts from ff even though i have put my count value as 08h
![Confused :confused: :confused:](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
i am trying to test my pic.. however i am incurring some problems.. i am doing a basic test of switchign on and off of the leds ..
here is the code i used
Code:
#include<P16f877.inc>
LIST p=16F877
errorlevel 1,-302 ;to disable MPLAB bank warnings.
COUNT1 equ 08h
org 0
bsf STATUS,5
clrf TRISB
clrf TRISC
clrf TRISD
bcf STATUS,5
LED
movlw b'00000001' ; red on
movwf PORTB
call Delay
call Delay
movlw b'00000000' ; red oFF
movwf PORTB
movlw b'00000001'; yellow on
movwf PORTC
call Delay
movlw b'00000000' ; yellow off
movwf PORTC
movlw b'00000001'; green on
movwf PORTD
call Delay
movlw b'00000000' ; green off
movwf PORTD
goto LED
Delay decfsz COUNT1,1
goto Delay
return
;********************************************************
; END of control processing
;********************************************************
end
my concern is that i can only see the red light blinking i cannot see all the lights blinking in an orderly fashion..
my second ques.. is my delay always starts from ff even though i have put my count value as 08h