EEPROM Type Definition in fcd for 16F676

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Jojo1981
Posts: 28
Joined: Wed Feb 29, 2012 9:23 pm
Been thanked: 3 times
Contact:

EEPROM Type Definition in fcd for 16F676

Postby Jojo1981 » Tue Mar 18, 2014 9:52 pm

Hello,
what is the right Definition of the EEPROM TYPE for the Pic 16F676 / 16F630?
In the fcd is currently TYPE3 defined and i got a Long failure list during Compiling.

File name: C:\Users\Johannes\Desktop\Flowcode Test\EEPROM Test.c
Title:
Description:
Generated by: Flowcode v5.5.2.1
Date: Tuesday, March 18, 2014 21:36:17
Licence: Professional
Registered to: XXXXXXXXXXXXXX
Licence key: XXXXXXXXXXXXXXXXX
http://www.matrixmultimedia.com
Start des Compilers...
C:\Program Files (x86)\Flowcode\Tools\boostc\boostc_pic16_flowcode.exe -v -t PIC16F676 "EEPROM Test.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited


EEPROM Test.c
Starting preprocessor: C:\PROGRA~2\Flowcode\Tools\boostc\pp.exe "EEPROM Test.c" -i C:\PROGRA~2\Flowcode\Tools\boostc\include -d _PIC16F676 -la -c2 -o "EEPROM Test.pp" -v -d _BOOSTC -d _PIC16 -d _CHAR_INDEX


...........

C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(91:24): error: unknown identifier 'EEPGD'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(91:24): error: invalid operand 'EEPGD'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(91:19): error: failed to generate expression
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(91:15): error: invalid operand '~(1 << ( EEPGD))'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(91:12): error: failed to generate expression
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(92:24): error: unknown identifier 'CFGS'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(92:24): error: invalid operand 'CFGS'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(92:19): error: failed to generate expression
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(92:15): error: invalid operand '~(1 << ( CFGS))'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(92:12): error: failed to generate expression
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(157:24): error: unknown identifier 'EEPGD'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(157:24): error: invalid operand 'EEPGD'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(157:19): error: failed to generate expression
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(157:15): error: invalid operand '~(1 << ( EEPGD))'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(157:12): error: failed to generate expression
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(158:24): error: unknown identifier 'CFGS'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(158:24): error: invalid operand 'CFGS'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(158:19): error: failed to generate expression
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(158:15): error: invalid operand '~(1 << ( CFGS))'
C:\Program Files (x86)\Flowcode\CAL\PIC\PIC_CAL_EEPROM.c(158:12): error: failed to generate expression
EEPROM Test.c success

failure
Rückgabewert = 1
Flowcode konnte den C-Code des Flussdiagramms nicht kompilieren, da folgende Fehler auftraten:


Wenn Ihr Flussdiagramm C-Code enthält,überprüfen Sie diesen sorgfältig. Falls das Flussdiagramm keinen C-Code enthält oder Sie sich sicher sein können, dass dieser Code fehlerfrei ist, dann wenden Sie sich an den technischen Support.


BEENDET


I think Type 2 and 3 are definitely wrong because the used identifier are not for this devices.

Kind regards and thanks for your help,
Johannes

Jojo1981
Posts: 28
Joined: Wed Feb 29, 2012 9:23 pm
Been thanked: 3 times
Contact:

Re: EEPROM Type Definition in fcd for 16F676

Postby Jojo1981 » Tue Mar 18, 2014 9:54 pm

#endif
#ifdef MX_EE_TYPE
clear_bit(eecon1, EEPGD); <------- not valid for PIC 16F676
#endif
#ifdef MX_EE_TYPE3
clear_bit(eecon1, EEPGD); <------- not valid for PIC 16F676
clear_bit(eecon1, CFGS); <------- not valid for PIC 16F676
#endif
set_bit(eecon1, RD);
data = MX_EEDATA;

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: EEPROM Type Definition in fcd for 16F676

Postby Kenrix2 » Tue Mar 18, 2014 10:45 pm

I do not have that chip to test with but, you could try editing the 16F676.fcd by deleting the line under [Defines] that has TYPE3 in it, save changes, restart Flowcode, and then test it to make sure it writes and reads eeprom correctly.

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

Re: EEPROM Type Definition in fcd for 16F676

Postby Benj » Wed Mar 19, 2014 11:47 am

Here is a modified FCD for Flowcode v5 with the EEPROM problem resolved, Also rolling out this fix to v6.

16F676.fcd
(7.54 KiB) Downloaded 175 times


Let me know how you get on.

Jojo1981
Posts: 28
Joined: Wed Feb 29, 2012 9:23 pm
Been thanked: 3 times
Contact:

Re: EEPROM Type Definition in fcd for 16F676

Postby Jojo1981 » Wed Mar 19, 2014 8:24 pm

It works, thanks so much.