Pic12629 + Pic12f675 not working!

Any bugs you encounter with Flowcode should be discussed here.
Steve-Matrix
Matrix Staff
Posts: 1234
http://meble-kuchenne.info.pl
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: Pic12629 + Pic12f675 not working!

Post by Steve-Matrix »

The UK broke 40° for the first time yesterday. A bit cooler where I live, luckily.

I've checked both the v9 629 HEX files (GP3 and PinFunction) and they are identical. Both have a config of 0x3195, but they should be different. However, the working v5 "internal" HEX has a config of 0x3F95 which is effectively the same. Therefore we can rule out any problem with the config settings causing the chip to not work.

So I assume it is a CAL issue. I will pass this on and try to get this resolved.

jgu1
Posts: 602
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 495 times
Been thanked: 132 times

Re: Pic12629 + Pic12f675 not working!

Post by jgu1 »

Thank you. Glad you will investigate. Look fprward to see :D

Br Jorgen

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: Pic12629 + Pic12f675 not working!

Post by BenR »

Hello,

I think I may be onto something here. It looks like the calibration value for the internal oscillator may be being overwritten when the chip is erased and when this happens the chip can get stuck in a constant loop. Try to read osccal, it's not there, reset to 0, try to read osccal... etc.

Please can you try to edit the following file and see if it makes any difference.

First browse to here by copying and pasting the path into your file explorer address bar.

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PIC\batch

Next open the pic_xc8_comp.bat in a text editor.

Find this line.

Code: Select all

"%MX_COMPILER%bin\xc8.exe" --chip=%MX_CHIP%  "%MX_PROJECT%.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32 
and change to this.

Code: Select all

"%MX_COMPILER%bin\xc8.exe" --chip=%MX_CHIP%  "%MX_PROJECT%.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32 --RUNTIME=no_startup
Now when you compile hopefully the calibration read will be skipped and you can get on with your program.

Hopefully that will help.

This looks quite useful as a means of regaining the OSCCAL value.
https://www.best-microcontroller-projec ... ation.html

If you do re-calculate the value then you can force this value using this line in the batch file.

Code: Select all

"%MX_COMPILER%bin\xc8.exe" --chip=%MX_CHIP%  "%MX_PROJECT%.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32 --RUNTIME=oscval:XXXX
replacing XXXX with the calculated value.

jgu1
Posts: 602
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 495 times
Been thanked: 132 times

Re: Pic12629 + Pic12f675 not working!

Post by jgu1 »

Hi Ben!

Thank´s. But it doen´t work, after changing it´s not possible to compile?

jorgen
Attachments
Slet629.msg.txt
(2.02 KiB) Downloaded 49 times

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: Pic12629 + Pic12f675 not working!

Post by LeighM »

Looks like you have missed the space between 32 and --RUNTIME ...

Code: Select all

--DOUBLE=32--RUNTIME=no_startup

jgu1
Posts: 602
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 495 times
Been thanked: 132 times

Re: Pic12629 + Pic12f675 not working!

Post by jgu1 »

Hi Leigh and Ben!

Now I try to copy and paste Ben´s :

"%MX_COMPILER%bin\xc8.exe" --chip=%MX_CHIP% "%MX_PROJECT%.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32 --RUNTIME=no_startup

No luck, doest work, sorry?

jgu1
Posts: 602
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 495 times
Been thanked: 132 times

Re: Pic12629 + Pic12f675 not working!

Post by jgu1 »

Hi Ben!

As mentioned, I copy your path and paste in the file, but doesn´t work.

Is there anything I can do?

Br jorgen

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: Pic12629 + Pic12f675 not working!

Post by LeighM »

I think Ben probably needs more information from you,
Such as, does it compile to hex now ok?
Does the program still not run on the chip?

Have you tried Ben's other suggestion...
--RUNTIME=oscval:XXXX

jgu1
Posts: 602
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 495 times
Been thanked: 132 times

Re: Pic12629 + Pic12f675 not working!

Post by jgu1 »

Hi Leigh!

Well, ok I did not know you need more information. No it is not possible to compile, error 1 when start compile after adding Bens correction. With the originale file I can compile, No problem But nothing is coming out on the pins on the chip.

First I am not familiare with edit in this kind of files, afraid to do something wrong, and honest I can´t see what happend and I don´t understand, Ben wrote:

"If you do re-calculate the value then you can force this value using this line in the batch file.
CODE: SELECT ALL

"%MX_COMPILER%bin\xc8.exe" --chip=%MX_CHIP% "%MX_PROJECT%.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32 --RUNTIME=oscval:XXXX
replacing XXXX with the calculated value." :?: Please I just want a Flowcode which working.......

How could it be that pic12f683 & 615 working these look like they are similar devices?

If it is to difficult to fix, I have to use FC5 when I use these devices.

But really annoying to discover these kinds of errors when you are working on a project. It takes a lot of time. :?

I am always ready to help if I can, let me hear what I can do?

Br jorgen

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: Pic12629 + Pic12f675 not working!

Post by LeighM »

If you are still getting a compile error, could you please post your Slet629.msg.txt file again?

edit: Ignore my request, I've just tried the RUNTIME option myself and it looks like it needs some debug code.
This is going to need more research, hopefully Ben has some more input :D

Post Reply