i tried to make a program to generate a 10KHz frequency using interrupts but i find that there is no provision of setting the the registers TH0 and TL0 of timer TMR0 to a particular value. since i want that the interrupt should occur after a user defined time i m finding no method of doing so.
please tell me how can i get an interrupt after a user defined time(without using the prescaler )
Interrupts in flowcode
-
- Posts: 14
- Joined: Thu Apr 17, 2008 10:10 am
- 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: Interrupts in flowcode
Hello
You can write to the timer registers directly using a C code Icon.
Eg.
tmr0l = 0;
tmr0h = 0;
You can write to the timer registers directly using a C code Icon.
Eg.
tmr0l = 0;
tmr0h = 0;
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