Hello, I would appreciate some help;
I have had some free time and I have been playing with Flowcode 10 and its components, which I see have added features that they did not have in previous versions, some features such as the 16x2 display, EEPROM, which added writing and reading in float, long, INT I made a small flowchart that reads a FLOAT number and then writes it to the EEPROM memory and reads it when required; add 2 switches, one reads a number with 6 decimal places and the second switch reads another number with 6 decimal places also but negative; I have a GPS that I want to improve and record locations at different times, to later check the places visited, but after recording the numbers in the EEPROM to later read them, one reads the recorded number, but the second changes to a different number; I send the flowchart. I would appreciate if you can see it and help me; I assume that using variables in FLOAT the number is read directly and with that same variable it is recorded in the EEPROM, I looked for an example, but in FLOAT I found nothing.
I appreciate any help in advance.
Enrique
Thanks
EEPROM_FLOAT PIC16F1939
-
- Posts: 83
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 3:59 pm
- Has thanked: 20 times
- Been thanked: 7 times
EEPROM_FLOAT PIC16F1939
- Attachments
-
- EEPROM_FLOAT.fcfx
- Flowchart EEPROM_FLOAT
- (24.71 KiB) Downloaded 127 times
-
- Valued Contributor
- Posts: 1281
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 312 times
- Been thanked: 452 times
Re: EEPROM_FLOAT PIC16F1939
Hi
I can only run in simulation, and after storing variables Lat / Long in EEPROM I set them to zero before reading back to check what was being returned.
Simulation debugger displayed as expected.
When switch A0 is active the Lat is displayed at position 0/1 of your display. When switch A1 is active Long is displayed at position 0/1 of your display thereby overwriting the previously displayed Lat value.
Perhaps change the position of Lat to 0/0 ?
Regards
I can only run in simulation, and after storing variables Lat / Long in EEPROM I set them to zero before reading back to check what was being returned.
Simulation debugger displayed as expected.
When switch A0 is active the Lat is displayed at position 0/1 of your display. When switch A1 is active Long is displayed at position 0/1 of your display thereby overwriting the previously displayed Lat value.
Perhaps change the position of Lat to 0/0 ?
Regards
-
- Posts: 83
- Joined: Wed Dec 02, 2020 3:59 pm
- Has thanked: 20 times
- Been thanked: 7 times
Re: EEPROM_FLOAT PIC16F1939
Hello Chipfryer27,
in the simulation it also sends numbers different from those recorded in the EEPROM, it sends images of the numbers recorded in the EEPROM and later read; The number recorded in address 0 changed the value when it was read, the number recorded in address 1 remained the same.
Enrique
in the simulation it also sends numbers different from those recorded in the EEPROM, it sends images of the numbers recorded in the EEPROM and later read; The number recorded in address 0 changed the value when it was read, the number recorded in address 1 remained the same.
Enrique
- Attachments
-
- Read1.jpg (38.51 KiB) Viewed 2137 times
-
- Write1.jpg (42.79 KiB) Viewed 2137 times
-
- Posts: 83
- Joined: Wed Dec 02, 2020 3:59 pm
- Has thanked: 20 times
- Been thanked: 7 times
Re: EEPROM_FLOAT PIC16F1939
imagen
- Attachments
-
- Write2.jpg (40.66 KiB) Viewed 2137 times
-
- Read2.jpg (43.75 KiB) Viewed 2137 times
-
- Valued Contributor
- Posts: 1281
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 312 times
- Been thanked: 452 times
Re: EEPROM_FLOAT PIC16F1939
Hi
Hmm.... Using a different machine I'm now getting the same results as you. I may have not noticed it earlier though........
Everything is fine until you read from eeprom in your branch (if Inicio = 1).
I'll see what I get in hardware when I get a chance.
Regards
Hmm.... Using a different machine I'm now getting the same results as you. I may have not noticed it earlier though........
Everything is fine until you read from eeprom in your branch (if Inicio = 1).
I'll see what I get in hardware when I get a chance.
Regards
-
- Matrix Staff
- Posts: 1560
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 555 times
- Been thanked: 514 times
Re: EEPROM_FLOAT PIC16F1939
Hello.
You will need to remember that a float is 4 bytes.
If each address of EEPROM can only hold a byte, then you need to allow 4 addresses for each float variable.
It seems like you are corrupting EEPROM addresses reserved for LAT with values of LONG
Try setting LAT to address 0 and LONG to Address 4
You will need to remember that a float is 4 bytes.
If each address of EEPROM can only hold a byte, then you need to allow 4 addresses for each float variable.
It seems like you are corrupting EEPROM addresses reserved for LAT with values of LONG
Try setting LAT to address 0 and LONG to Address 4
Martin
-
- Posts: 83
- Joined: Wed Dec 02, 2020 3:59 pm
- Has thanked: 20 times
- Been thanked: 7 times
Re: EEPROM_FLOAT PIC16F1939
Hi,
Yesterday I did that test, I recorded at address 0, 3, 7, 11; But it does not work
Yesterday I did that test, I recorded at address 0, 3, 7, 11; But it does not work
-
- Posts: 83
- Joined: Wed Dec 02, 2020 3:59 pm
- Has thanked: 20 times
- Been thanked: 7 times
Re: EEPROM_FLOAT PIC16F1939
Hi Martin,
Maybe I'm missing one more direction; 0, 4, 8, 12... . I will do another test with those addresses; A problem that continues to persist is that the GPS takes too long to connect to a satellite; Now I have had it connected for 1 hour and 40 minutes and it still cannot connect.
Maybe I'm missing one more direction; 0, 4, 8, 12... . I will do another test with those addresses; A problem that continues to persist is that the GPS takes too long to connect to a satellite; Now I have had it connected for 1 hour and 40 minutes and it still cannot connect.
-
- Posts: 83
- Joined: Wed Dec 02, 2020 3:59 pm
- Has thanked: 20 times
- Been thanked: 7 times
Re: EEPROM_FLOAT PIC16F1939
I'm just waiting for the GPS to connect so it can show me the coordinates and do the tests. Flowchart shipping.
- Attachments
-
- TEST1939v10a.fcfx
- FLOWCHART
- (26.63 KiB) Downloaded 111 times
-
- GPS.jpg (44.06 KiB) Viewed 2118 times