main ;校准内部振荡器 ;-------------------------------------------------------------------- call 0x3FF ; retrieve factory calibration value bsf STATUS,RP0 ; set file register bank to 1 movwf OSCCAL ; update register with factory 汇编中这是样的
c语言:
#define OSCCAL_CHECK (*(const unsigned char *)0x3ff) //读取flash 0x3ff的振荡校准值
main() { ... while (1) { OSCCAL = OSCCAL_CHECK; ... } }
|