Hi!
It is not possible to compile my program in FC7. I am trying to reset TMR0 by help of a C macro. But get an error code1 if I do this.
In FC5 it work fine.
Or am I doing something wrong.
Br Jorgen
Timer0 not reset Pic 16f88 solved no bug!
Moderator: Benj
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Timer0 not reset Pic 16f88 solved no bug!
- Attachments
-
- PicUdfald.fcfx
- (10.08 KiB) Downloaded 264 times
Last edited by jgu1 on Fri Jun 09, 2017 5:44 am, edited 1 time in total.
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Timer0 not reset Pic 16f88!
Hi Jorgen,
Since FC5 &n FC6 uses a different compiler from FC7 then the syntax will be different.
Instead of = BoostC format
You must use = XC format.
Take a look at this post
As its not a bug, I have moved topic to a more appropriate section.
Martin
Since FC5 &n FC6 uses a different compiler from FC7 then the syntax will be different.
Instead of
Code: Select all
tmr0 = 0x00;
You must use
Code: Select all
TMR0 = 0x00;
Take a look at this post
As its not a bug, I have moved topic to a more appropriate section.
Martin
Martin
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Timer0 not reset Pic 16f88!
Hi Martin!
Well well, I did not knew this. I make a test later today. You hear. Thank you Martin.
Br Jorgen
Well well, I did not knew this. I make a test later today. You hear. Thank you Martin.
Br Jorgen
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Timer0 not reset Pic 16f88 solved no bug!
Hi Martin!
Now I can compile. Do you know, is it correct in Arduino Mega if I want to reset INT0 the C code is : TCCR0A = 0;
Thanks in advance.
Jorgen
Now I can compile. Do you know, is it correct in Arduino Mega if I want to reset INT0 the C code is : TCCR0A = 0;
Thanks in advance.
Jorgen
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Timer0 not reset Pic 16f88 solved no bug!
Hi Jorgen,
Sorry for the delay.
I have been on a short holiday from Friday to Sunday.
Glad Flowchart compiles for you now.
Thaks for keeping us updated.
I will leave that question to those that actually know.
I'm thinking of purchasing one so I can have a play,
Martin
Sorry for the delay.
I have been on a short holiday from Friday to Sunday.
Glad Flowchart compiles for you now.
Thaks for keeping us updated.
Sorry I have not had anything to do with Arduino Mega.jgu1 wrote:s it correct in Arduino Mega if I want to reset INT0 the C code is : TCCR0A = 0;
I will leave that question to those that actually know.
I'm thinking of purchasing one so I can have a play,
Martin
Martin
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Timer0 not reset Pic 16f88 solved no bug!
Hi Martin!
No sorry, it is weekend... offtime Again thank's for your help.
Br Jorgen
No sorry, it is weekend... offtime Again thank's for your help.
Br Jorgen
- 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: Timer0 not reset Pic 16f88 solved no bug!
Hello,
You mention INT0, did you mean timer 0 or external interrupt pin INT0 on pin D0?
TCCR0A is the Timer 0 control register. If you want to reset the timer 0 count register then you need to use the following code.Now I can compile. Do you know, is it correct in Arduino Mega if I want to reset INT0 the C code is : TCCR0A = 0;
Code: Select all
TCNT0 = 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
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
Re: Timer0 not reset Pic 16f88 solved no bug!
Hi Ben!
Yes timer 0, my mistake. Thanks for reply and info. By the way, test Tour bme280 program Thisted evening
Br. Jorgen
Yes timer 0, my mistake. Thanks for reply and info. By the way, test Tour bme280 program Thisted evening
Br. Jorgen