ummm...would the simulator return anything because there isnt any real hardware that its reading from?? Jan-Erik Soderholm wrote: Harley Shanko wrote : > Vasile Surducan wrote correctly the Microchip code for > setting the OSCCAL value: > >" bsf _rp0 ; bank1 > call 0x3ff ; get the calibration value > movwf osccal > bcf _rp0 ; bank0 " Correct. > But as I initially wrote, the MPLAB Simulator doesn't even > return the 80h value from > > org 0x3ff > retlw 0x80 And I asked, why you are entering that code at all ?? You are *not* supposted to enter any retlw command at h'3FF'. It's been put there by Microchip. Best Regards, Jan-Erik. PS: Your code (slightly modified since _RP0 wasn't found) works just fine here, b.t.w... -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist