cant use timer1 overflow in pic 16f877
-
- Posts: 43
- Joined: Sat Sep 13, 2008 10:36 pm
- Contact:
cant use timer1 overflow in pic 16f877
why i cant create a timer1 overflow interrupt using pic16f877 but i can do that with pic16f877a?????
- 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: cant use timer1 overflow in pic 16f877
Hello
Check that the timer interrupt enable icon properties is using the CLKI and not the T0CLKI for the input clock.
Check that the timer interrupt enable icon properties is using the CLKI and not the T0CLKI for the input clock.
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
-
- Posts: 43
- Joined: Sat Sep 13, 2008 10:36 pm
- Contact:
Re: cant use timer1 overflow in pic 16f877
still cant understand why,when i change the PIC target from 16f877a to 16f877 a message tells me that flow code is unable to run one or more commands....
- 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: cant use timer1 overflow in pic 16f877
Ah ok that makes sense. The timer1 interrupt is probably not defined for the 16F877 processor. If you open up the 16F877A.fcd file from the Flowcode V3/fcd folder and scroll to the bottom then you will see the interrupt code. Copy this section of code into your 16F877.fcd file and restart Flowcode. Remember to make backups of the files incase things go wrong.
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
-
- Posts: 43
- Joined: Sat Sep 13, 2008 10:36 pm
- Contact:
Re: cant use timer1 overflow in pic 16f877
hi...
i think i might have found my problem...i used pic16f877a and just wrote a simple program with an interrupt icon,the program counts how many times timer1 overflows,just like that .but it seems that timer1 never overflows
,i replaced the interrupt icon timer1overflow with timer0 overflow and it worked fine and the counter started incrementing each time timer0 overflowed but this as didn't work when i used timer1 overflow interrupt icon so whats the problem???
i think i might have found my problem...i used pic16f877a and just wrote a simple program with an interrupt icon,the program counts how many times timer1 overflows,just like that .but it seems that timer1 never overflows



- 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: cant use timer1 overflow in pic 16f877
Hello
Are you simulating or running the code on the chip?
Are you simulating or running the code on the chip?
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
-
- Posts: 43
- Joined: Sat Sep 13, 2008 10:36 pm
- Contact:
Re: cant use timer1 overflow in pic 16f877
no i am only simulating in flowcode3 and watching the counter for the overflow on an lcd screen
- 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: cant use timer1 overflow in pic 16f877
Ok that makes sense. The Timer0 simulation was buggy at best so the timer1 simulation has been left out of Flowcode v3. We hope to have this fixed in V4.
Sorry for any inconvenience and let me know if it doesn't work on hardware.
Sorry for any inconvenience and let me know if it doesn't work on hardware.
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
-
- Posts: 43
- Joined: Sat Sep 13, 2008 10:36 pm
- Contact:
Re: cant use timer1 overflow in pic 16f877
will that is ok , but i thought that if it wasn't working in simulation it wont be working after i upload the hex file to the chip and see the output,so if i upload the program to the chip i will be able to see the variable that will count how many times timer1 have overflowed incrementing on the lcd
also is there any other way that i can see if timer1 is working while simulating in flowcode3,example or anything that i may try t do?

- 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: cant use timer1 overflow in pic 16f877
Hello
Yes the best way to test if it is indeed working would be to output the count value on the LCD on the hardware.
Once you have confirmed that it is indeed working then you can fool the simulation if you want to by pausing it and manually editing variables etc that would have been updated by the interrupt routine.
Yes the best way to test if it is indeed working would be to output the count value on the LCD on the hardware.
Once you have confirmed that it is indeed working then you can fool the simulation if you want to by pausing it and manually editing variables etc that would have been updated by the interrupt routine.
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