Page 1 of 1

16f688 e/p

Posted: Mon Sep 03, 2012 10:33 am
by wjhos
I have written a program for a volt/ammeter. This does not fit in standard 16f688 (4k), but i have 16f688 e/p (7k). However, flowcode, nor PPP recocnizes the extra memory so wont compile. Is there a workaround ?. Furthermore, i use FC5 now, but there is a problem with the config screen,the same as presented by PPP. In FC5 the screen is not shown to full extend, so i cannot use the ok buttons because they are not visible and i found no way to have the screen to its correct size. I return here after a few years of inactivity, trying to grasp assembler, but i think i am to old for that. Using FC is more my thing, be it that the resulting code is a lot bigger than when using assembler. Therefore i am using the e/p chip, because the hardware pcb etc.are already finished. Can you help me out ?

Re: 16f688 e/p

Posted: Mon Sep 03, 2012 10:51 am
by Benj
Hello,

Looking at the FCD files the standard 16F688 already has 7K of memory specified. I wonder if the memory limitation is due to a limitation imposed by BoostC?

What about using the 16F1825, it has 8K of flash and I believe it should be pin compatible?

Re: 16f688 e/p

Posted: Mon Sep 03, 2012 10:56 am
by wjhos
When using Microchip IDE, selecting the 16f688 shows 4k memory, as does FC. So no way to program, as the hex file generation gives an unexpected EOF warning, so cannot be used in IDE

Re: 16f688 e/p

Posted: Mon Sep 03, 2012 12:38 pm
by wjhos
As you said, in the FCD files, flash is stated as 7168 k, so the problem is with boostC ?
Can you help me out ? I do not have 16f1825

Re: 16f688 e/p

Posted: Mon Sep 03, 2012 2:43 pm
by Enamul
Can you please post your program?

Re: 16f688 e/p

Posted: Mon Sep 03, 2012 3:36 pm
by Benj
Hello,

We do not make the boostc compiler and as such have no control over it.

You could maybe have a go with the HiTech compiler and see if that makes any difference.

http://www.matrixmultimedia.com/mmforum ... =26&t=6812

Also if your using Flowcode v5 then please sign up for the v5 topic using the link below.

http://www.matrixmultimedia.com/mmforum ... =46&t=9958

Re: 16f688 e/p

Posted: Mon Sep 03, 2012 9:52 pm
by wjhos
I have tried HI-Tech compiler, but it gives me a lot of error retuns, and so does not program the PIC. I ordered 16f1825 chips and try again.
For Enamul, i attach the program. (using 16f877a), not fine tuned yet.

Re: 16f688 e/p

Posted: Tue Sep 04, 2012 2:40 pm
by Enamul
Hi,
I have checked in the web. PIC 16f688 has 4K word memory which means that it has 8 K Byte memory. Flowcode specifies 4K word amount of memory which is fine. If you want to accommodate your code in the chip I can try is that possible or not. Although at a glance of your code it seems to me it's possible. But it is always better to move to large memory PIC if possible.

Re: 16f688 e/p

Posted: Tue Sep 04, 2012 10:52 pm
by wjhos
Got the program working on 16f1825, however it is running very,very slow. So itried the digital clock Flowcode example and that is running very slow also (1 second every half minite or so) It must have something to do with clock speed of the PIC, but i cant figure out the settings in the config screen. (Problem with that also solved) The program as it is definitivly does not fit in 16f688.

Re: 16f688 e/p

Posted: Wed Sep 26, 2012 2:33 pm
by wjhos
Problem with the speed solved. Added "osccon=0x7A;" to the flowchart, to set the osc. to the right speed (16MHz).
So the program is running propperly, however, i have to solve the problem with the reference voltage. I know how to set the ref.voltage to, in my case 4.096V, but the fvrcon settings are probably overruled by the FC settings. I have read someting on the forum about modifiing the FC code, but that is far from clear to me. Can anyone help me out?

Re: 16f688 e/p

Posted: Wed Sep 26, 2012 4:41 pm
by Benj
Hello,
Can anyone help me out?
What version of Flowcode are you using and please can you sign up to the appropriate forum using this link.
http://www.matrixmultimedia.com/forum_upgrades.php

Re: 16f688 e/p

Posted: Sat Sep 29, 2012 10:56 pm
by wjhos
After intensive searching the forum, i stumbled accross FVR1 program by ueli meyer. However, that program looks to work, but it does not in real life. I modified it a little and now i can have Vref+ 4.096 on one analog input and 2.048 or 1.024 on other input. And it works in real life. I modified the component macro for an0 and an1, added adcon1=0x83; and fvrcon=0x81/82/83; for 1.024, 2.048, or4.096 volt reference voltage.
Be sure to add the c code after the FC code, otherwise it will be overwritten. Modified program attacheed.

Re: 16f688 e/p

Posted: Sat Sep 29, 2012 11:02 pm
by wjhos
Oops, the fvrcon=0x83; c-icon can be deleted, it is already in the component macro, but it does not hurt.