Miac dsPIC Ketpad

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

Moderators: Benj, Mods

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

Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hello..
Is there anyone who can describe what I'm doing wrong with the Miac dsPIC Keypad (MI5809.
Can not see any result in the display by test ...
I'm absolutely sure I'm ignoring something.
Would you like to help make the codes work and results can be seen in the Miac dsPIC Display.
See attached codes:
Keypad Test.fcfx
(15.05 KiB) Downloaded 272 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: Miac dsPIC Ketpad

Post by LeighM »

Hi Monie,

You need to change your target to a MIAC dsPIC.
Build->Project Options->Choose a Target
PIC16->Misc->MIAC (dsPIC)

Regards,
Leigh

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

Re: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi Leigh,
Thank you very much :-)

What is the difference between choosing Miac (dsPIC) or Miac (dsPIC) System ??
MiscMIAC.JPG
MiscMIAC.JPG (30.71 KiB) Viewed 10654 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: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi Leigh,
Have tried via the Miac dsPIC to get the GPS device to work, but unsuccessfully!
Miac dsPIC og Miac GPS.JPG
Miac dsPIC og Miac GPS.JPG (27.58 KiB) Viewed 10649 times
But get the error message as shown below, you can see how this should be done?
Icon List.JPG
Icon List.JPG (15.95 KiB) Viewed 10649 times
Attached file:
MIAC_dsPIC_GPS.fcfx
(45.71 KiB) Downloaded 253 times
Compile message:

Code: Select all

Target folder: C:\Users\Bruger\Desktop\TILFOR~1
Source name:   C:\Users\Bruger\Desktop\Til Forum\MIAC_dsPIC_GPS.fcfx
Title:         
Description:   
Device:        PIC16.33E.MIAC (dsPIC)
Generated by:  Flowcode v7.3.0.5
Date:          Monday, June 04, 2018 12:04:26
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_GPS" "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_GPS".c -o "MIAC_dsPIC_GPS".o 
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:41:0,
                 from MIAC_dsPIC_GPS.c:443:
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:36:26: fatal error: MIAC_CAL_API.h: No such file or directory
compilation terminated.

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

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: Miac dsPIC Ketpad

Post by LeighM »

What is the difference between choosing Miac (dsPIC) or Miac (dsPIC) System ??
You need to choose "MIAC (dsPIC) System" when using the MIAC Expansion modules (such as GPS)
this then includes all the "system" functionality.

I'll now take a look at your latest flowchart

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: Miac dsPIC Ketpad

Post by LeighM »

Hi Monie,
Yes, you need to change the target to "MIAC (dsPIC) System"
Also, the "number" variable error is due to the use of the global "number" variable in your PrintDecimal macro that is not given a value.
parameter.jpg
parameter.jpg (79.43 KiB) Viewed 10642 times
I think you intended to use the parameter ".PrintDecimal" not "number"
Attachments
MIAC_dsPIC_GPS.fcfx
(45.73 KiB) Downloaded 262 times

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

Re: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi Leigh,
Thank you for your code.
I get the following error message: C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1
Do you have a suggestion to resolve the error message below.

Reported error:

Code: Select all

Target folder: C:\Users\Bruger\DOWNLO~1
Source name:   C:\Users\Bruger\Downloads\MIAC_dsPIC_GPS.fcfx
Title:         
Description:   
Device:        PIC16.33E.MIAC (dsPIC)
Generated by:  Flowcode v7.3.0.5
Date:          Monday, June 04, 2018 13:36:42
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_GPS" "C:\Users\Bruger\DOWNLO~1\" "33EP256MU806"
Launching compiler...

C:\Users\Bruger\DOWNLO~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_GPS".c -o "MIAC_dsPIC_GPS".o 
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:41:0,
                 from MIAC_dsPIC_GPS.c:444:
C:\Program Files (x86)\Flowcode 7\CAL\/MIAC\MIAC_CAL_API.c:36:26: fatal error: MIAC_CAL_API.h: No such file or directory
compilation terminated.

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

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: Miac dsPIC Ketpad

Post by LeighM »

Have you got the following directory? ...
C:\Program Files (x86)\Flowcode 7\CAL\MIAC
Is there anything in it?
MIAC_CAL_API.h in particular

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

Re: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi Leigh,
I have the following files in Flowcode/CAL/MIAC:
xxxxx.JPG
xxxxx.JPG (19.96 KiB) Viewed 10638 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: Miac dsPIC Ketpad

Post by LeighM »

Hmm, MIAC_CAL_API.h is missing, attached.
Attachments
MIAC_CAL_API.h
(2.89 KiB) Downloaded 241 times

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

Re: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi LeighM,
Thank you very much for your patients.
It looks like it's working now.
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: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi LeighM,

How do I put the coordinates in miac - gps longitude and latitude, so they work?
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: Miac dsPIC Ketpad

Post by LeighM »

Hi Monie,
If you mean for simulation, unfortunately there is not much simulation for the Expansion modules.

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

Re: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi Leigh,
I mean i the real world ;-)

Wish to GPS Read longitude and latitude!
Please see below on the codes!
Attached file:
MIAC_dsPIC_GPS.fcfx
(47.38 KiB) Downloaded 236 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: Miac dsPIC Ketpad

Post by LeighM »

Hi Monie
They return the value in degrees as a float

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

Re: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi Leigh,

They return the value in degrees as a float, I use them;-)
But when I move Miac dsPIC and Miac GPS outside the house, the devices work ....

Is it possible to put an ant on Miac GPS, as well from inside the PCB layout and out of the box???
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: Miac dsPIC Ketpad

Post by LeighM »

Hi Monie,
There is no easy way to do that.
But you could maybe move the GPS module near to a window?
Run the CAN wiring back to the MIAC if that cannot be moved near the window too?

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

Re: Miac dsPIC Ketpad

Post by Monie Jacobsen »

Hi Leigh,
It is very annoying that an external ant can not be connected :shock:
Best Regard
Monie

Post Reply