Hi John Thanks for the reply. (Now I'm really confuzed!) I'm more than a little fuzzy here so bear with me. Why would you write data to the program memory bus but not program memory its self?.....unless there was device on the program memory bus that needed the data other than program memory? If I look at the block diagram I don't even see a connection to the outside world. I thought/assumed (most likely incorrectly) that what was this function i.e. memmoveram2pgm (and the other similar functions) did underneath was to do TABLE reads and writes to program memory. If you step into the function with the debugger it looks like that is what it is doing (but I can't really tell for certain what it is doing in there exactly) I can't figure what these functions are for unless they do this? Technically speaking program memory is the EEPROM?......ummm right??? I thought I only had access to a portion of it. In this case a 18F6520 I have access/ ability to read/write to 1024 bytes on one end? I thought that (magically) these functions could do table reads and writes in rest of program memory. Thanks in advance for clearing this up for me. Phillip Things should be as simple as possible but no simpler Phillip Coiner CTO, GPS Source, Inc. Your source for quality GNSS Networking Solutions and Design Services, Now! -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of piclist@xargs.com Sent: Wednesday, June 07, 2006 12:48 PM To: Microcontroller discussion list - Public. Subject: Re: [PIC] how do I get from ram to rom in C18 On Wed, 7 Jun 2006, Phillip wrote: > Can anyone tell me how to get the data in the var holder to the var > atten_setting? The "2pgm" functions write data to the program memory bus. They do not write to the PIC's program memory. If you really need to write to the PIC's program memory, you'll have to follow the flash write procedure outlined in your PIC's datasheet (assuming your PIC supports this feature). EEPROM might be a better choice. > I was under the impression that atten_string is in program memory and that > holder is an auto variable in data memory. > > I'm also "assuming" the function memmoveram2pgm would move the value in > holder (which has the correct data when I view in the debugger) to > atten_setting. > > This is not working but I can't see why not any sugestions out there? > > rom char atten_string[6]; > > void Attenuation_adjust(void) > > { > > char holder[6]; > > unsigned long x; > > unsigned char RF_atten_setting; > > RF_atten_setting = read_RF_Atten(); > > x = RF_atten_setting; > > ultoa(x,holder); > > memmoveram2pgm(atten_string,holder); -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist