Page 1 of 1

PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Thu Jan 24, 2019 9:02 am
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

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Thu Jan 24, 2019 9:13 am
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 5232 times

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Thu Jan 24, 2019 10:06 am
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

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Thu Jan 24, 2019 3:14 pm
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.

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Thu Jan 24, 2019 4:06 pm
by xelites
Thank you Benj .. I await tomorrow

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Thu Jan 24, 2019 4:18 pm
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

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Fri Jan 25, 2019 8:55 am
by xelites
Yes, now running ... i go try
Thank you Benj :)

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Fri Jan 25, 2019 9:36 am
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

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Fri Jan 25, 2019 11:15 am
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.

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Fri Jan 25, 2019 1:47 pm
by xelites
I tried Benj, but the stopcounter of the module as I recall the simulator creates error

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Fri Jan 25, 2019 5:49 pm
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.

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Fri Jan 25, 2019 6:09 pm
by Benj
Errors have now been found and fixed. They were to do with uninitialised variables in the simulation macros.

Re: PIC18F67K22 COMPONENT TIMER NOT RUNNING

Posted: Sat Jan 26, 2019 11:58 am
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: