The MIAC dsPIC menu not work with EEPROM

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hello Everbardy
Is there anyone here that could help to get the MIAC dsPIC menu to work?
I get an error by uploading the MIAC dsPic codes.

If I remove EEPROM, I can upload the codes to MIAC. And the program works.
Is there anyone here that will help solve the problem?
Attach MIAC code:
MIAC dsPIC Menu Test.fcfx
(31.37 KiB) Downloaded 291 times
Hope that someone will help solve the problem.
Compile message with error message:

Code: Select all

Target folder: C:\Users\Bruger\Desktop\TILFOR~1
Source name:   C:\Users\Bruger\Desktop\Til Forum\MIAC dsPIC Menu Test.fcfx
Title:         
Description:   
Device:        PIC16.33E.MIAC (dsPIC) System
Generated by:  Flowcode v7.3.0.5
Date:          Saturday, June 09, 2018 12:52:33
Users:         1
Registered to: monie jacobsen
Licence key:   YUWNEC
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_comp.bat  "MIAC dsPIC Menu Test" "C:\Users\Bruger\Desktop\TILFOR~1\" "33EP256MU806"
Launching compiler...

C:\Users\Bruger\Desktop\TILFOR~1>xc16-gcc -c -mcpu="33EP256MU806" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\FLOWCO~1\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\FLOWCO~1\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "MIAC dsPIC Menu Test".c -o "MIAC dsPIC Menu Test".o 
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
MIAC dsPIC Menu Test.c:395:13: error: expected declaration specifiers or '...' before numeric constant
MIAC dsPIC Menu Test.c: In function '_EEDATA':
MIAC dsPIC Menu Test.c:395:16: error: expected declaration specifiers before 'NonVolatileData'
MIAC dsPIC Menu Test.c:395:78: error: expected declaration specifiers before ';' token
In file included from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:41:0,
                 from MIAC dsPIC Menu Test.c:405:
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:48:17: error: storage class specified for parameter 'WG_CursorX'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:49:17: error: storage class specified for parameter 'WG_CursorY'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:51:13: error: storage class specified for parameter 'WG_Write'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:52:17: error: storage class specified for parameter 'WG_Read'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:53:13: error: storage class specified for parameter 'WG_Command'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:54:17: error: storage class specified for parameter 'WG_Status'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:55:13: error: storage class specified for parameter 'WG_WriteWordAt'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:56:18: error: storage class specified for parameter 'WG_ReadWordAt'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:60:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:104:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:152:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:167:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:182:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:199:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:220:17: error: storage class specified for parameter 'MIAC_SPI0_cs'
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:223:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:268:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:296:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:305:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:322:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:327:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:361:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:377:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:386:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:392:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:444:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:466:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:514:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:521:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:573:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:578:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:599:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:610:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:621:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:632:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:643:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:238:0,
                 from MIAC dsPIC Menu Test.c:405:
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_EEPROM.c:51:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_EEPROM.c:68:4: error: #error "Chip does not have EEPROM memory"
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_EEPROM.c:73:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_EEPROM.c:129:4: error: #error "Chip does not have EEPROM memory"
MIAC dsPIC Menu Test.c:426:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:436:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:451:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:460:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:474:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:483:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:497:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:506:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:520:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:529:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:543:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:552:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:566:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:575:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:589:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:599:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:614:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:624:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:639:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:649:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:664:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:674:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:689:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:699:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:714:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:724:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:739:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:749:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:764:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:774:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:789:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:799:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:817:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:858:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:943:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1050:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1084:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1105:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1167:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1190:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1255:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1298:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1345:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1404:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1425:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1440:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1632:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
MIAC dsPIC Menu Test.c:1924:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_EEPROM.c:40:6: error: declaration for parameter 'FC_CAL_EE_Write' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_EEPROM.c:39:11: error: declaration for parameter 'FC_CAL_EE_Read' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:220:17: error: declaration for parameter 'MIAC_SPI0_cs' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:56:18: error: declaration for parameter 'WG_ReadWordAt' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:55:13: error: declaration for parameter 'WG_WriteWordAt' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:54:17: error: declaration for parameter 'WG_Status' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:53:13: error: declaration for parameter 'WG_Command' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:52:17: error: declaration for parameter 'WG_Read' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:51:13: error: declaration for parameter 'WG_Write' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:49:17: error: declaration for parameter 'WG_CursorY' but no such parameter
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:48:17: error: declaration for parameter 'WG_CursorX' but no such parameter
MIAC dsPIC Menu Test.c:400:6: error: declaration for parameter 'FCD_06651_eeprom1__Write' but no such parameter
MIAC dsPIC Menu Test.c:399:11: error: declaration for parameter 'FCD_06651_eeprom1__Read' but no such parameter
MIAC dsPIC Menu Test.c:2032:1: error: expected '{' at end of input

Error returned from [xc16-gcc.exe]
Completed compilation, return = 1

C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1



FINISHED
Best Regard
Monie

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by kersing »

The controller in the dspic miac does not contain an eeprom so you can not use the eeprom component.

These is a component that simulates an eeprom on the dspic hardware, search the forum to find it.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi kersing
Thank you for the information and descriptions of missing eeprom in miac dsPIC.

Hi Leigh,
Hope to be able to get another solution to the missing eeprom?
Best Regard
Monie

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by kersing »

Have you checked my proposed solution?
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi kersing
No, I have not understood!
Do not understand how it can be done. do you?
Has not found anything useful on the forum...
Best Regard
Monie

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by kersing »

Check viewtopic.php?f=58&t=15932. That component simulates an eeprom using flash.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi kersing
Thank you very much for your help.
MIAC dsPIC Menu with (eeprom) Flash works, now also in the real world ;-)
It was almost too easy.
I will use Flash as memory for MIAC dsPIC in the future...
Attached codes:
MIAC dsPIC Menu Flash.fcfx
(34.1 KiB) Downloaded 323 times
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by LeighM »

Just for further information, the dsPIC MIAC does have serial EEPROM on-board.
This can be used with the Serial EEPROM component ...
serial_eeprom.jpg
serial_eeprom.jpg (90.04 KiB) Viewed 12412 times

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi Leigh,

Did not know anything about it the dsPIC MIAC does have serial EEPROM on-board.
Is this unit an inoperable component Serial EEPROM component.
Sorry for the question!
Will of course test your proposal;-)
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hello Everbardy
I want to exit Menu with GetKey = 6 ???
Desires the following procedure:
1: Set Time
2: And then exit Menu with GetKey = 6
3: Absolutely out of menu
And the action goes on in Macro SetValue

Can not get out of Menu.
Can you see where I'm making a mistake?
Would very much like your help, can not get along with the codes.

Has attached the codes:
MIAC dsPIC Menu Flash-003.fcfx
(97.23 KiB) Downloaded 297 times
Miac_sdPIC_OutPut.JPG
Miac_sdPIC_OutPut.JPG (20.98 KiB) Viewed 12393 times
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hello Everbardy
Regarding the above problem, I really want a help.
Have tried many times, but without luck!
Hope for help?
Best Regard
Monie

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

Re: The MIAC dsPIC menu not work with EEPROM

Post by Benj »

Hi Monie,

I've added a bit of a hacky way of doing it using gotos to jump out of your macros. Seems to largely work but maybe some more cases need adding.
MIAC dsPIC Menu Flash-003.fcfx
(99.17 KiB) Downloaded 267 times

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

Re: The MIAC dsPIC menu not work with EEPROM

Post by Benj »

This topic may also help, I create a heating controller using the MIAC with things like time setting and the ability to add and edit recurring events.

viewtopic.php?f=36&t=7735&p=42694#p21244

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi Benj
Thank you for your help.
I've also added more gotos to jump out of your macros.
This worked;-)
I was stuck in the codes...

It is also intranspected to see your floor heating system.
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hello Everbardy
Would you be helpful and tell me what goes wrong?
I can simulate but by compiling to Miac dsPIC result in ERROR see below.
Icon Lists.JPG
Icon Lists.JPG (18.23 KiB) Viewed 12337 times
Error results:

Code: Select all

Target folder: C:\Users\Bruger\Desktop\TILFOR~1
Source name:   C:\Users\Bruger\Desktop\Til Forum\MIAC dsPIC Menu Flash-007.fcfx
Title:         
Description:   
Device:        PIC16.33E.MIAC (dsPIC) System
Generated by:  Flowcode v7.3.0.5
Date:          Thursday, June 14, 2018 15:19:46
Users:         1
Registered to: monie jacobsen
Licence key:   YUWNEC
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_comp.bat  "MIAC dsPIC Menu Flash-007" "C:\Users\Bruger\Desktop\TILFOR~1\" "33EP256MU806"
Launching compiler...

C:\Users\Bruger\Desktop\TILFOR~1>xc16-gcc -c -mcpu="33EP256MU806" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\FLOWCO~1\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\FLOWCO~1\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "MIAC dsPIC Menu Flash-007".c -o "MIAC dsPIC Menu Flash-007".o 
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
MIAC dsPIC Menu Flash-007.c: In function 'FCD_0f151_flashio1__ClearPage':
MIAC dsPIC Menu Flash-007.c:525:20: warning: cast from pointer to integer of different size
MIAC dsPIC Menu Flash-007.c: In function 'FCD_0f151_flashio1__ReadCell':
MIAC dsPIC Menu Flash-007.c:588:20: warning: cast from pointer to integer of different size
MIAC dsPIC Menu Flash-007.c: In function 'FCD_0f151_flashio1__WriteCell':
MIAC dsPIC Menu Flash-007.c:635:20: warning: cast from pointer to integer of different size
MIAC dsPIC Menu Flash-007.c: In function 'FCM_Display_On_OFF':
MIAC dsPIC Menu Flash-007.c:2779:3: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:385:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:2801:3: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:385:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:2828:3: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:385:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:2850:3: warning: passing argument 1 of 'MIAC_PrintString' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:385:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c: In function 'FCM_DayOfTheWeek':
MIAC dsPIC Menu Flash-007.c:4765:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:899:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:4774:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:899:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:4783:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:899:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:4792:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:899:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:4801:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:899:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:4810:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:899:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:4819:4: warning: passing argument 3 of 'FCI_SCOPY' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:899:13: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c: In function 'FCM_SolarPosition':
MIAC dsPIC Menu Flash-007.c:4840:13: error: 'MONTH_DAYS' undeclared (first use in this function)
MIAC dsPIC Menu Flash-007.c:4840:13: note: each undeclared identifier is reported only once for each function it appears in
MIAC dsPIC Menu Flash-007.c:5359:2: warning: passing argument 3 of 'FCI_FLOAT_TO_STRING' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:557:18: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:5360:2: warning: passing argument 3 of 'FCI_FLOAT_TO_STRING' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:557:18: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:5368:2: warning: passing argument 3 of 'FCI_FLOAT_TO_STRING' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:557:18: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'
MIAC dsPIC Menu Flash-007.c:5369:2: warning: passing argument 3 of 'FCI_FLOAT_TO_STRING' discards qualifiers from pointer target type
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_String.c:557:18: note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'

Error returned from [xc16-gcc.exe]
Completed compilation, return = 1

C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1



FINISHED
Vedhæftet:
MIAC dsPIC Menu Flash-007.fcfx
(149.85 KiB) Downloaded 195 times
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by LeighM »

The only error I get is this one, due to some C code in SolarPosition

Code: Select all

MIAC dsPIC Menu Flash-007.c: In function 'FCM_SolarPosition':
MIAC dsPIC Menu Flash-007.c:4842:13: error: 'MONTH_DAYS' undeclared (first use in this function)

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi LeighM
Try to see this version it works!
Just editing another simple version:
I do not know what goes wrong?
Is it the Flash device that is causing problems?

The following works....!
Se attach file:
MIAC dsPIC Menu Flash-0014 OK.fcfx
(139.68 KiB) Downloaded 258 times
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by LeighM »

Hi Monie,
In the 007 version there are warnings that you can ignore.
But you have an error due to this C code in SolarPosition ...

Code: Select all

FCV_DAYS = MONTH_DAYS[FCV_MONTH-1];
So you need to either create a MonthDays array as a Flowcode global variable, and then initialise and read the values in calculation icons,
or create a C code initialised array in the "Supplementary Code" (see Build->Project Options)

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi LeighM
Sorry Legih I Can not Find Project Options ;-)
My edition is in Danish ...
Do you want to give a Screen dump?
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by LeighM »

array.jpg
array.jpg (93.61 KiB) Viewed 12307 times

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi LeighM
Thank you very much for your proposal.
I will try the proposal and come with a report ;-)

Good'Weekend
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi LeighM

The code below works!
Report!
Suplerende Code.JPG
Suplerende Code.JPG (33.94 KiB) Viewed 12296 times
Thank you very much for the proposal
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hi LeighM
Working to get attached codes to work with MAC sdPIC, but unsuccessfully.
Would you like to get MIAC sdPIC with the attached coder to work?
Have tried a lot;-)

Se attached flow code works fine via Flowcode with Arduino Mega 2560 R3
Attach file:
Noedstop-002.fcfx
(12.85 KiB) Downloaded 238 times
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hello Hello everyone
Is there anyone who has a solution to the above posts?
Have tried a lot of codes, but without luck.
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 17 times
Been thanked: 46 times
Contact:

Re: The MIAC dsPIC menu not work with EEPROM

Post by Monie Jacobsen »

Hello everyone
When simulated in the Flowcode program, the codes work.
I am working to get MAC sdPIC with the attached codes to work in the real world?
Works to get attached codes to work with MAC sPICE Interrup reset function, but without success.
Have tried a lot ;-)
Would you like to help make the codes work?

Attach file:
MIAC dsPIC Interrup Induktiv Stop.fcfx
(76.08 KiB) Downloaded 205 times
Best Regard
Monie

Post Reply