medelec35 wrote: ↑Wed May 14, 2025 10:05 am
Hello.
For the EEPROM, Within the configuration settings, have you tried by setting SAF Enabled bit to SAF Enabled?
For the ADC you have the same results no matter what ADC pin you have tried?
To eliminate compiler bugs, what about trying with a different compiler version, lower than XCX8 v3.0, e.g v2.50?
Instructions can be found on the Wiki
here
I would recommend the top version of keeping the original compiler.
As low voltage programming is enabled, one of the port b pins are reserved for that so will be unavailable to use.
Dear Martin,
Thank you very much for your suggestions and support.
I originally developed the code using Flowcode 8, and it had been running reliably on the PIC16F18345 since 2019. The issues only began during the COVID-19 pandemic, when lead times for the PIC16F18345 extended to over 52 weeks, making procurement extremely difficult.
Toward the end of 2024, our company acquired the PIC16F18444 as a functional replacement for the PIC16F18345. However, I encountered compilation issues with Flowcode 8, which prompted me to purchase the Flowcode 10 upgrade. Unfortunately, even with Flowcode 10, the code failed to compile for the PIC16F18444 until Matrix provided a library update.
With the update, I was finally able to compile the code, but testing revealed that the PCBA using the PIC16F18444 was not functioning correctly.
EEPROM Issue:
The first problem I noticed was that EEPROM.Write() was not working. I verified this by reading the EEPROM with a PICkit — values were not being stored (always 0x00).
Low Battery LED Always On:
During testing, we also observed that the low battery LED remained constantly on, regardless of whether the battery sensor input was at 5V or GND.
UART Debugging Failed:
I attempted to use the UART for debug messages, but the output was unreadable, likely due to configuration or peripheral issues.
ADC Not Responding:
I then tried reading analog values using a potentiometer, but ADC.GetByte() does not respond to voltage changes.
Direct C Code Attempts:
I even attempted to bypass Flowcode libraries by writing raw C code based on the PIC16F18444 datasheet to directly configure and operate peripherals, suspecting library issues. However, the behavior remained inconsistent.
Emulator Limitations:
I tried running tests in the Flowcode 10 emulator, but the EEPROM console didn't show initial values and register behavior seemed inconsistent — possibly due to incorrect register mappings.
As a result, I’m currently stuck:
- Returning to the PIC16F18345 is not viable due to supply constraints.
- Migrating to the PIC16F18444 has not succeeded due to what appear to be incomplete or incorrect Flowcode 10 support for this device.
Apologies for the lengthy explanation, but I hope this helps contextualize the situation.
Regarding your suggestions:
- Low Voltage Programming: This is disabled.
- Flowcode Version: I’ve tried both version 8 and 10, without success.
- ADC Pins: Our PCBA uses 9 ADC sensors. Since both EEPROM and UART are non-functional for debugging, I will explore further tests to confirm ADC functionality.
Thank you once again for your time and assistance.
Best regards,
Fernando