Hi Fraser,

On 2019/11/06 21:44, FraserSmith51 wrote:

I am trying to amend the pic_data_eeprom.jal file to work with a PIC16F18313 chip that calls just about everything in the first file by a different name. I have attached my effort so far but it's not working despite a lot of time going through the datasheet. I was going to attach the datasheet as well to save the hassle of downloading it from the microchip site but it's too big for this group. I did find an error in that in section 11.4.2 (NMVCON2 instead of NVMCON2) but I'm sure that what is on lines 139 and 140 in my attached file is corrrect. Has anyone met this problem already and solved it to work with the 16F18313 and its two bigger brothers the 18323 and the 18344.

Any assistance gratefully received.


I think there are several issues:
1. The NVMCON1_NVMREGS bit must be SET to get access to EEPROM (when not set program memory is accessed)
    This is not done by the library (on the contrary, see 2).
2. The bits NVMREGS and CFGS of the NVMCON1 register reference the same bit (see device file).     And this bit is CLEARED by the library in the _prepare_eeprom_access() procedure, thus wrong for these PICs. 3. The 'offset' to be specified the user must specify the real <address>  (thus  <offset> + 0XF000).     I think the library should take care of the difference, to keep compatibility.

Hope this helps. Good luck.

Regards, Rob.

BTW: I post this reply in both the Jallist group at Google and Yahoo, but the discussion really belongs in the Jallib group.



--
*Rob H*amerling, Vianen, NL

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jallib/4e90b079-725a-6196-f98b-a70fa0dea0b4%40gmail.com.

Reply via email to