16f688 e/p

Forum for problems or queries regarding the Flowcode application and compiler usage.

Moderators: Benj, Mods

wjhos
Posts: 19
Joined: Wed Nov 30, 2005 5:30 pm
Been thanked: 1 time
Contact:

16f688 e/p

Postby wjhos » Mon Sep 03, 2012 10:33 am

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 ?

User avatar
Benj
Matrix Staff
Posts: 14151
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4079 times
Contact:

Re: 16f688 e/p

Postby Benj » Mon Sep 03, 2012 10:51 am

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?

wjhos
Posts: 19
Joined: Wed Nov 30, 2005 5:30 pm
Been thanked: 1 time
Contact:

Re: 16f688 e/p

Postby wjhos » Mon Sep 03, 2012 10:56 am

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

wjhos
Posts: 19
Joined: Wed Nov 30, 2005 5:30 pm
Been thanked: 1 time
Contact:

Re: 16f688 e/p

Postby wjhos » Mon Sep 03, 2012 12:38 pm

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

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 16f688 e/p

Postby Enamul » Mon Sep 03, 2012 2:43 pm

Can you please post your program?
Enamul
University of Nottingham
enamul4mm@gmail.com

User avatar
Benj
Matrix Staff
Posts: 14151
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4079 times
Contact:

Re: 16f688 e/p

Postby Benj » Mon Sep 03, 2012 3:36 pm

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.

viewtopic.php?f=26&t=6812

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

viewtopic.php?f=46&t=9958

wjhos
Posts: 19
Joined: Wed Nov 30, 2005 5:30 pm
Been thanked: 1 time
Contact:

Re: 16f688 e/p

Postby wjhos » Mon Sep 03, 2012 9:52 pm

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.
Attachments
VAPRmeter.fcf
(17.94 KiB) Downloaded 208 times

User avatar
Enamul
Posts: 1772
Joined: Mon Mar 05, 2012 11:34 pm
Location: Nottingham, UK
Has thanked: 271 times
Been thanked: 814 times
Contact:

Re: 16f688 e/p

Postby Enamul » Tue Sep 04, 2012 2:40 pm

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.
Enamul
University of Nottingham
enamul4mm@gmail.com

wjhos
Posts: 19
Joined: Wed Nov 30, 2005 5:30 pm
Been thanked: 1 time
Contact:

Re: 16f688 e/p

Postby wjhos » Tue Sep 04, 2012 10:52 pm

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.

wjhos
Posts: 19
Joined: Wed Nov 30, 2005 5:30 pm
Been thanked: 1 time
Contact:

Re: 16f688 e/p

Postby wjhos » Wed Sep 26, 2012 2:33 pm

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?

User avatar
Benj
Matrix Staff
Posts: 14151
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4079 times
Contact:

Re: 16f688 e/p

Postby Benj » Wed Sep 26, 2012 4:41 pm

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

wjhos
Posts: 19
Joined: Wed Nov 30, 2005 5:30 pm
Been thanked: 1 time
Contact:

Re: 16f688 e/p

Postby wjhos » Sat Sep 29, 2012 10:56 pm

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.
Attachments
FVR1m.fcf
(15.5 KiB) Downloaded 214 times
These users thanked the author wjhos for the post:
Benj (Mon Oct 01, 2012 11:05 am)
Rating: 5.56%
 

wjhos
Posts: 19
Joined: Wed Nov 30, 2005 5:30 pm
Been thanked: 1 time
Contact:

Re: 16f688 e/p

Postby wjhos » Sat Sep 29, 2012 11:02 pm

Oops, the fvrcon=0x83; c-icon can be deleted, it is already in the component macro, but it does not hurt.