eddieprice19
Member
I wonder if someone can help me. I am using a 16f630 to generate a pwm signal for a small electric motor. I have 4 inputs for forward, reverse, halt and emergency stop. I originally used RA0, RA1, RA2 and RA3 as inputs and it worked fine. However I decided that it would be useful to keep RA3 (MCLR) free for future reprogramming, and also for a better distribution of pcb tracks it would be better to use RA0(pin13), RA1(pin12), RA4(pin3) and RA5(pin2). I made the changes to my program for the new inputs and the new interrupts in IOCA, and ---------it didn't work.
The problem appears to be with the use of RA5. When this appears in the MPLAB Stimulus worksheet for PIN/Register Actions, while RA0, RA1 and RA4 appear as Binary inputs, nothing is registered for RA5. The fault in the program appears in the pwm routine where I am using TMR0 to measure mark and space values, BUT TMR0 doesn't change
I can always go back to my original program, but I would like to know why I can't use RA5 as an input, and why does it affect TMR0.
Eddie Price
The problem appears to be with the use of RA5. When this appears in the MPLAB Stimulus worksheet for PIN/Register Actions, while RA0, RA1 and RA4 appear as Binary inputs, nothing is registered for RA5. The fault in the program appears in the pwm routine where I am using TMR0 to measure mark and space values, BUT TMR0 doesn't change
I can always go back to my original program, but I would like to know why I can't use RA5 as an input, and why does it affect TMR0.
Eddie Price