Page 1 of 1

PIC16(L)F18446.fcdx with wrong definitions (continuation)

Posted: Fri Jun 03, 2022 1:50 pm
by miggarc
Hi

On May 31, 2022 10:38 pm I posted a bug report named
PIC16(L)F18446.fcdx with wrong definitions .

You promptly solved this uC definitions and all compile well.

The problem is, even with an absolute simple flowchart like this
PIC16LF18446_tests_Port_C_LED_second_counter .fcfx
(30.72 KiB) Downloaded 57 times
timer 2 is still not working.

It simulates as if all is correct (functioning as expected) but, after compiled (no errors)
and transfered to the real PIC16LF18446 it doesn't work

If you could look at this before we enter the weekend I will appreciate it very much.

Re: PIC16(L)F18466.fcdx with wrong definitions (continuation)

Posted: Sat Jun 04, 2022 12:29 pm
by Steve-Matrix
I don't have any hardware to test and I'm not familiar with that particular chip, but try putting the following statements into a C icon just before you enable the interrupt:

Code: Select all

T2CLKCONbits.CS = 2;
T2HLTbits.MODE = 0;
The first statement ensures the clock source is the main Fosc clock rather that whatever is set in the PPS (Peripheral Pin Select).

Re: PIC16(L)F18446.fcdx with wrong definitions (continuation)

Posted: Sat Jun 04, 2022 4:23 pm
by miggarc
Hi Steve

Your cue did the trick .

How do I mark this as solved ?

Re: PIC16(L)F18466.fcdx with wrong definitions (continuation)

Posted: Mon Jun 06, 2022 8:43 am
by Steve-Matrix
Great news, thanks. I'll ask for the fix to be added to the chip definition file.

I think to mark it as solved you can edit your original post and change the subject line, e.g. by adding "[SOLVED]" to the end of it.

Re: PIC16(L)F18446.fcdx with wrong definitions (continuation)

Posted: Mon Jun 06, 2022 9:40 pm
by miggarc
Hi...

I was thinking about marking this topic as Solved but, at the very last moment before I did it, another related problem arose:

I found result frequency doesn't change with different options from Clock Source Select ,
at least for any PIC16LF18446 timer interrupt properties where this drop down exists: TMR0, 1,3 and 5 .

Some examples ...

Re: PIC16(L)F18466.fcdx with wrong definitions (continuation)

Posted: Tue Jun 07, 2022 8:38 am
by Steve-Matrix
We are aware of this issue. Please see here:
https://www.flowcode.co.uk/forums/viewt ... 6844#p6844