EEPROM.WriteByte() Issue after Migration from Flowcode 8 to Flowcode 10 (PIC16F18444)

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
CamargoF
Posts: 17
http://meble-kuchenne.info.pl
Joined: Tue Mar 16, 2021 9:47 pm
Has thanked: 6 times

EEPROM.WriteByte() Issue after Migration from Flowcode 8 to Flowcode 10 (PIC16F18444)

Post by CamargoF »

Dear Support Team,

I recently migrated my project from Flowcode 8 to Flowcode 10 and encountered unexpected behavior when writing to EEPROM.

In the original Flowcode 8 code, I used EEPROM.Write() to store individual bytes. After the migration, I noticed that EEPROM.Write() in Flowcode 10 might perform 8- or 16-bit writes depending on the context, so I switched to EEPROM.WriteByte() to ensure a single byte is written.

While the new implementation works correctly in the emulator, it fails when running on real hardware.

The relevant sequence of operations in the program is:

Code: Select all

   Block:       EEPROM.WriteByte(0x0020, .0X01)
   Block:       EEPROM.WriteByte(0x0021, .0X03)
   Block:       EEPROM.WriteByte(0x0022, .0X01)
   Block:       EEPROM.WriteByte(0x0023, .0X01)
However, when I inspect the EEPROM contents on the PIC16F18444 using MPLAB, I see

Code: Select all

   F020          00    00    00    00    00
It appears that WriteByte() might be incorrectly interpreting the byte value (e.g., 0x01) as a UINT and only writing the most significant byte, resulting in zero being written.

Notably, this code was working properly on the PIC16F18345. I recently resolved another migration issue involving this target with the help of a library update, so I’m wondering if this EEPROM issue might be related to the same update or to differences in EEPROM handling between the two devices.

Could you please advise whether this is a known issue or provide any recommendations for further debugging?

Best regards,

Fernando

CamargoF
Posts: 17
Joined: Tue Mar 16, 2021 9:47 pm
Has thanked: 6 times

Re: EEPROM.WriteByte() Issue after Migration from Flowcode 8 to Flowcode 10 (PIC16F18444)

Post by CamargoF »

I have replaced all calls to EEPROM.WriteByte() with EEPROM.Write() in my Flowcode 10 project, but the issue persists: the EEPROM is still being filled with 0x00 instead of the intended values.

This behavior suggests that the EEPROM write functions may not be functioning correctly for the PIC16F18444 device. The same code worked correctly on the PIC16F18345.

Could this be a compatibility issue with the EEPROM library or device configuration in Flowcode 10 for the PIC16F18444?

Any guidance or workaround would be greatly appreciated.

Best regards,

Fernando

CamargoF
Posts: 17
Joined: Tue Mar 16, 2021 9:47 pm
Has thanked: 6 times

Re: EEPROM.WriteByte() Issue after Migration from Flowcode 8 to Flowcode 10 (PIC16F18444)

Post by CamargoF »

Dear Support Team,

While running the Flowcode 10 emulator with the PIC16F18444 target, I noticed that the initial contents of the EEPROM are not displayed in the console. However, EEPROM.Write() operations do appear to execute and update the display.

Given the broader issues I've encountered — including EEPROM writes consistently resulting in 0x00 on the physical device and discrepancies in expected behavior — I am concerned that the Flowcode 10 implementation for the PIC16F18444 may not be fully functional.

At this point, I cannot confidently assume that the project is being compiled and executed correctly for all aspects of this device, including EEPROM access, I/O port control, and interrupt handling.

I respectfully request a thorough review of the PIC16F18444 device support in Flowcode 10 to confirm that all core functions are working as intended.

Thank you for your attention to this matter.

Best regards,

Fernando

Post Reply