EEPROM.Write() x EEPROM.WriteByte() on Flowcode 10

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
User avatar
CamargoF
Posts: 40
Joined: Thu Aug 02, 2018 8:16 pm
Location: Sao Paulo, SP - Brazil
Has thanked: 6 times
Been thanked: 7 times
Contact:

EEPROM.Write() x EEPROM.WriteByte() on Flowcode 10

Post by CamargoF »

I migrate the program from Flowcode 8 to Flowcode 10 and I observed a strange behavior when the EEPROM has been written.
On my original code, I used EEPROM.Write() to save a byte of data.
On Flowcode 10 I observed the EEPROM.Write() may write 8 or 16-bits, so I changed to EEPROM.WriteByte(), but the EEPROM contents get worst.

I had some problem with the target migration from PIC16F18345 to PIC16F18444 that was fixed few days ago thanks to new library update.
I would like to know if my EEPROM problem is related, since the code was working for previous PIC.

Best regards,

Fernando

User avatar
CamargoF
Posts: 40
Joined: Thu Aug 02, 2018 8:16 pm
Location: Sao Paulo, SP - Brazil
Has thanked: 6 times
Been thanked: 7 times
Contact:

Re: EEPROM.Write() x EEPROM.WriteByte() on Flowcode 10

Post by CamargoF »

ADDITIONAL INFORMATION

The program runs the following block sequence:

Code: Select all

   Block:       EEPROM.WriteByte(0x0020, .0X01)
   Block:       EEPROM.WriteByte(0x0021, .0X03)
   Block:       EEPROM.WriteByte(0x0022, .0X01)
   Block:       EEPROM.WriteByte(0x0023, .0X01)
But the MPLAB shows the PIC16F18444 EEPROM as:

Code: Select all

   
   F020          00    00    00    00    00
It looks like the WriteByte() considers 0x01 as UINT, instead of byte, and saves the most significant byte.

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: EEPROM.Write() x EEPROM.WriteByte() on Flowcode 10

Post by Steve »

Please post on the Flowcode forums as these forums are rarely viewed.

Here's a link:
https://www.flowcode.co.uk/forums/index.php

Post Reply