Jump to content
RJS

Incorrect Eeprom Address For 12Lf1822 In Header File

Recommended Posts

The header file, PIC12LF1822.h, contains an incorrect address for the 12LF1822 MCU, the file states 0x1E000 but the correct address is 0xF000.

 

Thanks,

 

Randy

Share this post


Link to post
Share on other sites

Thanks Reynard!

 

I see that the Microchip documents do state 1E000h as the EEPROM address, however, when programming the device this does not work. I am not sure if MPLAB is not interperting it correctly or just an error in the document but if you set _EEPROM to F000h the data is written to the EEPROM in the correct location. I hate modifying header files as they will get over written next time I update so I just set the correct value in my code.

 

Randy

Share this post


Link to post
Share on other sites

Hi Randy,

 

I think MPLAB requires a word address rather than a byte address. The byte address is twice the word address hence the 1 bit shift to the left.

 

:0200000400F00A

:080000000102030405060708D4

The hex line before the EEPROM data specified the offset address for the debugger or programmer.

 

In my case the offset is 0x00F0 for a 18F4580.

 

I am using the MicroElektronika which understands the SourceBoost hex file format and shows the correct data in the EEPROM window.

 

The programmer starts at address 0x0000 for the EEPROM data and the shift to 0x1E000 (in you case) is done internally on the chip. Data is written as 14 bits but only stored as a the first 8 bits.

 

For some reason I cannot get the SourceBoost debugger to show anything in its EEPROM window. If anyone has any ideas on this please let us all know.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

RJS,

I see that the Microchip documents do state 1E000h as the EEPROM address, however, when programming the device this does not work. I am not sure if MPLAB is not interperting it correctly or just an error in the document but if you set _EEPROM to F000h the data is written to the EEPROM in the correct location. I hate modifying header files as they will get over written next time I update so I just set the correct value in my code.

 

Looks like we corrected something that was already correct and made it wrong :-(

The confusion in this area stems from byte addressing and word addressing.

 

Updated header files which will be included in the next release can be found here:http://www.sourceboost.com/CommonDownload/Binaries/PIC16F1XXX_HEADERS.zip

 

Apologies to those who have suffered from this problem.

 

Regards

Dave

Share this post


Link to post
Share on other sites

 

 

This issue is now resolved in the SourceBoost V7.05.1 Package available from the regular download page:

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...