Page 2 of 4

Re: Pic12629 + Pic12f675 not working!

Posted: Wed Jul 20, 2022 8:52 am
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.

Re: Pic12629 + Pic12f675 not working!

Posted: Wed Jul 20, 2022 3:58 pm
by jgu1
Thank you. Glad you will investigate. Look fprward to see :D

Br Jorgen

Re: Pic12629 + Pic12f675 not working!

Posted: Mon Jul 25, 2022 10:30 am
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.

Re: Pic12629 + Pic12f675 not working!

Posted: Mon Jul 25, 2022 4:06 pm
by jgu1
Hi Ben!

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

jorgen

Re: Pic12629 + Pic12f675 not working!

Posted: Mon Jul 25, 2022 4:30 pm
by LeighM
Looks like you have missed the space between 32 and --RUNTIME ...

Code: Select all

--DOUBLE=32--RUNTIME=no_startup

Re: Pic12629 + Pic12f675 not working!

Posted: Mon Jul 25, 2022 7:15 pm
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?

Re: Pic12629 + Pic12f675 not working!

Posted: Tue Jul 26, 2022 6:27 pm
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

Re: Pic12629 + Pic12f675 not working!

Posted: Tue Jul 26, 2022 7:06 pm
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

Re: Pic12629 + Pic12f675 not working!

Posted: Tue Jul 26, 2022 8:51 pm
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

Re: Pic12629 + Pic12f675 not working!

Posted: Wed Jul 27, 2022 10:16 am
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