Hi=20 Im using a CCS C-Compiler i am having trouble writting to EEPROM I am = currently trying to use the code i have generated (below) in the MPLAB = simulator. I can read the data stored in eeprom but i cannot write any = data to the eeprom. Has anyone used this compiler and had similar = problems? Cheers=20 Chris #DEVICE PIC16F877 #include "C:\Program Files\PICC\Chris programs\eeprom.h" void main() { int x,ad,y; setup_adc_ports(NO_ANALOGS); setup_adc(ADC_CLOCK_DIV_2); setup_spi(FALSE); setup_psp(PSP_DISABLED); setup_counters(RTCC_INTERNAL,RTCC_DIV_2); setup_timer_1(T1_DISABLED); setup_timer_2(T2_DISABLED,0,1); setup_ccp1(CCP_OFF); setup_ccp2(CCP_OFF); ad=3D02; x=3D16; y=3Dread_eeprom(ad); write_eeprom(ad,x); -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.