iank 0 Posted October 6, 2010 Report Share Posted October 6, 2010 Gents, I would like to ask for your support on this one pls, as I have checked the forum but could not find any references to this issue I see. Background I am changing my project target from a PIC16F648A to a PIC16F1827. I have changed the internal readback EEPROM routine to reflect the register difference and find that I read back 0xFF from EEPROM that should have been pre-loaded. On debugging my issue, I looked at MPLAB IDE -> View -> EEPROM directly after the compile to see if the values were being setup correctly. I dont see these values being stored to EEPROM. On the 648A the EEPROM is setup correctly On the 1827 the EEPROM remains as 0xFF The Issue On a target PIC16F1827, using the #pragma statement to pre-load the EEPROM, I don't see any of the values defined by the pragma to be stored in the EEPROM data area. Code Fragment :- #pragma DATA _EEPROM, 13, 200 The results When compiling, I then check the EEPROM values in MPLAB IDE using View->EEPROM and the values are all 0xFF (i.e unchanged). I have also programmed a target and check the EEPROM read back as 0xFF where I would expect my values. - I have checked the PIC16F1827 include file and the symbol is defined correctly as 0x2100 My System details:- MPLAB 8.56.00.00 Certified Windows XP 5.1.2600.2 Service Pack 3n\a Source Boost = BoostC Optimizing C Compiler Version 6.97 (for PIC16 architecture) PIC16F1827 Any advise would be welcome. Quote Link to post Share on other sites
iank 0 Posted October 6, 2010 Author Report Share Posted October 6, 2010 Gents, I would like to ask for your support on this one pls, as I have checked the forum but could not find any references to this issue I see. Background I am changing my project target from a PIC16F648A to a PIC16F1827. I have changed the internal readback EEPROM routine to reflect the register difference and find that I read back 0xFF from EEPROM that should have been pre-loaded. On debugging my issue, I looked at MPLAB IDE -> View -> EEPROM directly after the compile to see if the values were being setup correctly. I dont see these values being stored to EEPROM. On the 648A the EEPROM is setup correctly On the 1827 the EEPROM remains as 0xFF The Issue On a target PIC16F1827, using the #pragma statement to pre-load the EEPROM, I don't see any of the values defined by the pragma to be stored in the EEPROM data area. Code Fragment :- #pragma DATA _EEPROM, 13, 200 The results When compiling, I then check the EEPROM values in MPLAB IDE using View->EEPROM and the values are all 0xFF (i.e unchanged). I have also programmed a target and check the EEPROM read back as 0xFF where I would expect my values. - I have checked the PIC16F1827 include file and the symbol is defined correctly as 0x2100 My System details:- MPLAB 8.56.00.00 Certified Windows XP 5.1.2600.2 Service Pack 3n\a Source Boost = BoostC Optimizing C Compiler Version 6.97 (for PIC16 architecture) PIC16F1827 Any advise would be welcome. After further thinking on this topic, I have found the answer. The header files supplied within the SourceBoost env. for 16F1827 is incorrect for _EEPROM symbol address. The address should be set to 0xF000 and not 0x2100. Forcing the address in the #pragma statement as shown below fixs the problem :- #pragma DATA 0xF000, 253, 200 Therefore, this is clearly a bug in the header file define. Quote Link to post Share on other sites
Dave 0 Posted October 7, 2010 Report Share Posted October 7, 2010 iank, After further thinking on this topic, I have found the answer. The header files supplied within the SourceBoost env. for 16F1827 is incorrect for _EEPROM symbol address. The address should be set to 0xF000 and not 0x2100. Forcing the address in the #pragma statement as shown below fixs the problem :- #pragma DATA 0xF000, 253, 200 Therefore, this is clearly a bug in the header file define. Thanks for the update. Now we can correct the header file. Regards Dave Quote Link to post Share on other sites
Dave 0 Posted November 5, 2010 Report Share Posted November 5, 2010 Thanks for the update. Now we can correct the header file.Corrected header now available with other new targets files. Look here: http://forum.sourceboost.com/index.php?s=&...ost&p=17634 Regards Dave Quote Link to post Share on other sites
Recommended Posts
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.