PIC18F67K22 COMPONENT TIMER NOT RUNNING

Moderator: Benj

Post Reply
xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by xelites »

Hello everyone, I'm trying to use the timer component but it does not work, it creates an error in the simulation and the variables do not change. Is it my mistake or does the component have problems?
I enclose the program and I look forward to it.
Complete it with xc8 V2.0
thx all
Attachments
MTU_ECU_OK_FLUSSOMETRI.fcfx
(530.59 KiB) Downloaded 169 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by QMESAR »

Hi
The Flowchart you uploaded compile fine for me with V8,1,
I would recommend you to post a Flowchart with minimal code that shows your issue at the moment the Flowchart is big and many icons disabled
it hard to judge or see your problem.
P2.jpg
P2.jpg (198.11 KiB) Viewed 5154 times

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by xelites »

Hi Qmesar, it's not a compilation error ... the compiler says everything ok. Try the main program now simplified and you will see that the component when you bring to 1 the marker_01 does not count for 5-10 seconds and error.
Thanks again
Attachments
Timer_Component.fcfx
(523.79 KiB) Downloaded 183 times

User avatar
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: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by Benj »

Hello,

The Timer component doesn't currently have any simulation capability. However I have done a bit of investigation and managed to get it simulating quite nicely now.

I'll get the new component pushed out to the update system for you tomorrow as I'm out of the office today.

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by xelites »

Thank you Benj .. I await tomorrow

User avatar
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: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by Benj »

You can test for now if you like by copying the attached file into your "C:\ProgramData\MatrixTSL\FlowcodeV8\Components" folder and restarting Flowcode.
Timer.fcpx
(36.42 KiB) Downloaded 179 times

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by xelites »

Yes, now running ... i go try
Thank you Benj :)

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by xelites »

Benj, I tried, the timer now counts part and stops, but the reset? how you do it ? it's possible
or I have to consider that when the program runs on the microprocessor giving the stop timer it resets and starts again?
Thank you

User avatar
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: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by Benj »

Hello,

Many thanks I have been into the component again and now have created a new reset macro which can be called as well as adding a new parameter to the start macro to allow you to auto reset if you wish when starting the timer. This should give you a lot more control.

The latest component is now available via the update system.

Let me know how you get on.

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by xelites »

I tried Benj, but the stopcounter of the module as I recall the simulator creates error

User avatar
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: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by Benj »

Hello,

What error are you getting? The component runs fine for me but is popping up the Error tab of the icon lists window, though this is empty.

I'll see if I can investigate what might be triggering this but if you ignore the icon lists window appearing it does seem to be running as expected.

User avatar
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: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by Benj »

Errors have now been found and fixed. They were to do with uninitialised variables in the simulation macros.

xelites
Posts: 44
Joined: Thu Nov 06, 2014 9:47 am
Been thanked: 7 times
Contact:

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Post by xelites »

ok Banj, now it works Tuesday I install it in the processor and see if it also works on the board. For now, thanks and good week :wink:

Post Reply