Hi,
As some of you may be aware, I am trying to get a 16F627 working in a Velleman kit. I have very limited exposure to this coding, and not having a working application is not assisting matters...
(see https://www.electro-tech-online.com/threads/how-to-use-an-opto-triac.10570/ also)
I have been able to confirm that the PIC is processing some instructions, but it appears to be sticking on some code:
Here is a sub procedure in the code:
The PIC seems to get stuck at the point where the first DECFSZ appears.
I was able to confirm this by doing a MOVWF PORTB to change LED's in sequence, incrementing the LED count per line.
Question #1 is: Is there an element in this code that is not supported on the 16F627 chip?
Question #2 is: Does anybody have a small piece of code that will serve to prove the operation of my Velleman circuit board... A simple LED on/off example would do.
Thoughts on the matter shall be considered and appreciated...
As some of you may be aware, I am trying to get a 16F627 working in a Velleman kit. I have very limited exposure to this coding, and not having a working application is not assisting matters...
(see https://www.electro-tech-online.com/threads/how-to-use-an-opto-triac.10570/ also)
I have been able to confirm that the PIC is processing some instructions, but it appears to be sticking on some code:
Here is a sub procedure in the code:
Code:
DELAY MOVLW D'150' ;* ;Put 150 decimal in the 'TIMER1' register.
MOVWF TIMER1 ;*
;
DELAY2 MOVLW D'150' ;Put 150 decimal in the 'TIMER2' register.
MOVWF TIMER2
DECFSZ TIMER2,F ;* ;Timer2 = Timer2 -1, skip next instruction if Timer2 = 0.
GOTO $-1 ;* ;Jump back 1 instruction.
DECFSZ TIMER1,F ;Timer1 = Timer1 - 1, skip next instruction if Timer1 = 0
GOTO DELAY2 ;Jump to 'DELAY2' routine
RETLW 0 ;Return (jump back to main) and load W-reg with 0.
The PIC seems to get stuck at the point where the first DECFSZ appears.
I was able to confirm this by doing a MOVWF PORTB to change LED's in sequence, incrementing the LED count per line.
Question #1 is: Is there an element in this code that is not supported on the 16F627 chip?
Question #2 is: Does anybody have a small piece of code that will serve to prove the operation of my Velleman circuit board... A simple LED on/off example would do.
Thoughts on the matter shall be considered and appreciated...