Page 1 of 1

EEPROM Type Definition in fcd for 16F676

Posted: Tue Mar 18, 2014 9:52 pm
by Jojo1981
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

Re: EEPROM Type Definition in fcd for 16F676

Posted: Tue Mar 18, 2014 9:54 pm
by Jojo1981
#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;

Re: EEPROM Type Definition in fcd for 16F676

Posted: Tue Mar 18, 2014 10:45 pm
by Kenrix2
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.

Re: EEPROM Type Definition in fcd for 16F676

Posted: Wed Mar 19, 2014 11:47 am
by Benj
Here is a modified FCD for Flowcode v5 with the EEPROM problem resolved, Also rolling out this fix to v6.
16F676.fcd
(7.3 KiB) Downloaded 397 times
Let me know how you get on.

Re: EEPROM Type Definition in fcd for 16F676

Posted: Wed Mar 19, 2014 8:24 pm
by Jojo1981
It works, thanks so much.