Hot!There is a bug in MCC generated code related to EEPROM access PIC16F18875

Author
mbowers
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2018/08/08 13:09:07
  • Location: 0
  • Status: offline
2018/08/10 08:11:20 (permalink)
3 (1)

There is a bug in MCC generated code related to EEPROM access PIC16F18875

MCC version: v4.26
MPLAB X version: v5.00
OS: Windows 10
Area: Generated Code
Device: PIC16F18875
Peripheral: Memory
Mode: EEPROM
 
The MCC generates incorrect code for EEPROM access.  The bit NVMCON1bits.NVMREGS should be "1" for EEPROM access but MCC sets it to "0" for both READ access and WRITE access.  Took me about a week to find this bug but once set correctly EEPROM reads and writes work fine.
 
MCC code:
NVMCON1bits.NVMREGS = 0; (both read and write)
 
Correct code:
NVMCON1bits.NVMREGS = 1;
#1

3 Replies Related Threads

    katela
    Super Member
    • Total Posts : 921
    • Reward points : 0
    • Joined: 2013/06/11 05:25:18
    • Location: South Africa
    • Status: offline
    Re: There is a bug in MCC generated code related to EEPROM access PIC16F18875 2018/08/10 18:40:20 (permalink)
    3 (1)
    I think it's better to open a support ticket with Microchip directly. This info might be overlooked unlike if you contact them directly.

    Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
    YouTube Tutorials: https://www.youtube.com/user/StudentCompanionSA
    #2
    mbowers
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2018/08/08 13:09:07
    • Location: 0
    • Status: offline
    Re: There is a bug in MCC generated code related to EEPROM access PIC16F18875 2018/08/16 08:29:32 (permalink)
    0
    Hi Katela, I took your advice and sent this directly to MCC_Support.  Hopefully will make it into future MCC release.
    #3
    PA91
    Starting Member
    • Total Posts : 40
    • Reward points : 0
    • Joined: 2012/09/03 21:45:40
    • Location: 0
    • Status: offline
    Re: There is a bug in MCC generated code related to EEPROM access PIC16F18875 2018/09/12 06:56:15 (permalink)
    0
    Hi mbowers,
    This issue has been fixed in the latest MCU8 library release 1.75v. 
    #4
    Jump to:
    © 2018 APG vNext Commercial Version 4.5