I thought this is no problem.....
I wanted to set the offset of TMR_0 to a value of 240 in an Interrupt-Subroutine in Flowcode V4 for PIC
The properties of Timer 0 don't allow this. So I tried to use C-Code in a C-Code window like
tmr0=240;
(As I saw somewhere here in the forum)
I got this messages:
------start messages---------------------------
Starting preprocessor:.......
..........
error: unknown identifier 'TMR0'
error: invalid operand 'TMR0'
error: failed to generate expression
Balancer 16_test1 aus 16c mit TIMER0 Startwert.c success
failure
------end of messages---------------------------
(I also tried tmr0, tmr_0, TMR_0 ....)
Thanks for a reply
rmr
setting Timer-0 offset in C
Re: setting Timer-0 offset in C
Hallo Steve,
I am using Eico 40pin.
Does this depend on the chip? I thought all PICs are using this Interrupt the same way.
Thank You for your Help
rmr
I am using Eico 40pin.
Does this depend on the chip? I thought all PICs are using this Interrupt the same way.
Thank You for your Help
rmr
- 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: setting Timer-0 offset in C
Hello
The names of the registers change depending on the device family.
For the ECIO40 you need to use register name "tmr0l"
In C code this is:
The names of the registers change depending on the device family.
For the ECIO40 you need to use register name "tmr0l"
In C code this is:
Code: Select all
tmr0l = 240;
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
Re: setting Timer-0 offset in C
Thank You for your quick Help!
It works!
I have seen this command already, but I always thought the last character is the Number "1" but it's an "l" (lowercase of "L"). In Courier it looks just the same!
rmr
It works!
I have seen this command already, but I always thought the last character is the Number "1" but it's an "l" (lowercase of "L"). In Courier it looks just the same!
rmr