Using timer1 with 12F1840 gives and error that the Timer1 Clock Source Selection bit TMR1CS in Timer1 Control Register T1CON is an unknown identifier.
What to do?
Jan Lichtenbelt
TMR1 and 12F1840
Moderator: Benj
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: TMR1 and 12F1840
Hi Jan,
Here is an updated FCD file.
Let me know how you get on.
Here is an updated FCD file.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: TMR1 and 12F1840
Hi Ben,
Thanks, this one works correctly.
Jan
PS. TMR1CS has been replaced by TMR1CS1
Thanks, this one works correctly.
Jan
PS. TMR1CS has been replaced by TMR1CS1
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: TMR1 and 12F1840
I still have problems, even with the new FDC file (using Flowcode V4.5)
The Timer1 does not work and I do not know why. But I solved the problem with an additional C-code t1con=0x01; directly after the enable macro. This enables the Timer1, with precsaler 1:1 ansd clock source Fosc/4. If you need other prescaler values or trigger on external pin, see datasheet chapter 21.11.
Kind regards,
Jan Lichtenbelt
The Timer1 does not work and I do not know why. But I solved the problem with an additional C-code t1con=0x01; directly after the enable macro. This enables the Timer1, with precsaler 1:1 ansd clock source Fosc/4. If you need other prescaler values or trigger on external pin, see datasheet chapter 21.11.
Kind regards,
Jan Lichtenbelt