Thank you Henrik.
Its ok now,
Ioannis
And of course this explains the periodic error in the LED flashing...
Ioannis
Nice catch...
When someone shows you the stupid mistakes, its that moment you are embarrased a lot
Ioannis
A value of 0 in the pins PPS registers sets it to be controlled by the LAT register. See bottom of table 17-2 in the datasheet.
HenrikOlsson Yesterday, 11:08In the ISR you have this:
if seconds<1000 then
seconds=seconds+1
else
seconds=0
Timer0=0 'Stop timer0
TMR0H=$C1 'Load Timer 0 with start value...
If id does matter, chip is 47K42.
After setting the registers for a PWM output and selecting, for example, RC5PPS=%%00001001, the PWM signal indeed does appear on the output port.
What about...
Thanks Jerson.
At the moment it looked OK to have the LCDout inside the regularly called ISR, as it updatetd the LCD often. If the freq is low enough 1-2 Hz, it updates every second the LCD...
First thing that seems unusual to me is LCDOUT inside the ISR handler. That is something I would not do.
Secondly, there is a statement if freq < 68 then freq = 136 followed by freq = freq/68. As...
On the uploaded YT video one can see that the LED is not blinking stable as it should.
Can anyone spot what is wrong with the code please?
That LED is driven from the in2 output port and while...
changing from 16f876 to 18f252 file to modify
I'm changing chips and there is a config file or some file to modify I can't remember what it is or where it is
l_gaminde Today, 22:20