Combining E-blocks GPS module and ECIO? - Flowcode 4

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
wardnica
Posts: 13
Joined: Wed Jun 08, 2011 1:46 pm
Has thanked: 1 time
Contact:

Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by wardnica »

Hello

I recently bought the following e-block systems: ECIO 40pin microcontroller, Application board ECIO, 2x16 LCD screen, keypad and a GPS module (EB056).
After a bit of trial-and-error I found out how the keypad and LCD works. But the problem is the GPS module.
The basic testing didn't work; I don't know how to properly connect it to the ECIO. I was looking at the pdf's provided with the GPS module, and saw that the PIC18F4550 wasn't listed in the jumper-setting list. So I assume that I'll need to use the patch system.
https://www.dropbox.com/s/spheh3wzy443lt5/GPS.JPG - E-Blocks gps module patch information.
https://www.dropbox.com/s/y61yvrgdc101w ... 8F4550.JPG - pin layout of the microcontroller.

Could anyone explain me what to do, or what I'm doing wrong?
The whole programming will be done in flowcode 4.

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: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by Benj »

Hello,

The EB056 and the ECIO will work together the same as a 16F877A.

e.g. PortC and jumper settings C and 1.

We recently updated the module on the EB056 and the replacement GPS module does not start up correctly without the battery fitted with the correct polarity. We have therefore started shipping all EB056 boards with the battery included so please ensure this is inserted and the correct way around for the module to fire up and start passing data to your system.

wardnica
Posts: 13
Joined: Wed Jun 08, 2011 1:46 pm
Has thanked: 1 time
Contact:

Re: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by wardnica »

So I should be able to the GPS in flowcode, and use for instance the Read_UTC_Time macro to get the hour (unit 'h') and display it to a LCD screen? Do I have to change something in the settings?
When I send a program with the GPS macro to the ECIO, I get some compile errors...
Warning unreferenced functions removed:
FCI_FLOAT_TO_STRING in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCI_NUMBER_TO_HEX in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h
Wdt_Delay_S in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h
isinf in: C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\FCD\internals.h
FCD_GPS0_Is_Data_Valid in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_GPS0_Read_Longitude in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_GPS0_Read_Latitude in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_GPS0_Read_Altitude in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_GPS0_Read_GroundSpeed in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_GPS0_Read_NumberOfSatellites in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_LCDDisplay0_Command in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_LCDDisplay0_ScrollDisplay in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_LCDDisplay0_ClearLine in: C:\Users\Ward\Documents\flowcode\test gps 2.c
FCD_LCDDisplay0_RAM_Write in: C:\Users\Ward\Documents\flowcode\test gps 2.c

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by DavidA »

hello,

that compiler warning can be ignored usually, it is informing you that functions that are not referenced in the code have been removed.

wardnica
Posts: 13
Joined: Wed Jun 08, 2011 1:46 pm
Has thanked: 1 time
Contact:

Re: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by wardnica »

Allright, I write "start" to the lcd at the beginning of the program. Without using the gps components in the flowchart, this string appears on the LCD screen. But when I add a GPS macro, there isn't even that start message on the LCD screen when I send the program to the microcontroller.
I've attached the flowchart...
Attachments
testgps2.fcf
(6.5 KiB) Downloaded 412 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: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by Benj »

Hello,

You could try adding this to the top of your main macro using a C icon and see if it helps at all. Out of interest which version of Flowcode 4 are you using?

set_bit(intcon, PEIE);

wardnica
Posts: 13
Joined: Wed Jun 08, 2011 1:46 pm
Has thanked: 1 time
Contact:

Re: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by wardnica »

v4.2 ; I'll have a try if the c code solves the problem...
I'm trying to get the gps information for a solar tracker (project for school) :)
No, the program doesn't work yet. Maybe it could be the baud rate? Can I set this to 4800 with C code?

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: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by Benj »

Hello,

In the GPS component Ext properties there might be options to set the Baud. I know they are definitely there in v4.5.

Otherwise yes you can edit using C code but it might not be trivial.

wardnica
Posts: 13
Joined: Wed Jun 08, 2011 1:46 pm
Has thanked: 1 time
Contact:

Re: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by wardnica »

When I want to edit the component property, it says 'There are no properties for this component' ; Do you have an idea what the code would be to set the baud rate with C code?

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: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by Benj »

If you can update to v4.5 then the properties will become available.

If this is not an option for you then to help you do the baud change I would need the following information.

Which chip your using.
The speed of your crystal.
The baud rate the GPS module your using requires.

Note that the baud being incorrect should not cause the lockup problem your describing.

wardnica
Posts: 13
Joined: Wed Jun 08, 2011 1:46 pm
Has thanked: 1 time
Contact:

Re: Combining E-blocks GPS module and ECIO? - Flowcode 4

Post by wardnica »

I was able to update my flowcode, and the problem was solved.
Thank you for helping me out :)

Post Reply