cancel
Showing results for 
Search instead for 
Did you mean: 

Reading the RCCR0 register

fxdif
Associate II
Posted on May 19, 2004 at 08:16

Reading the RCCR0 register

3 REPLIES 3
fxdif
Associate II
Posted on May 18, 2004 at 13:58

I want to read the RCCR0 register then load it into the RCCR register to accurately set my clock speed. I tried using a pointer to address (0x01000h) as it states in the user manual but this didn't seem to work. Any ideas???

sjo
Associate II
Posted on May 19, 2004 at 08:03

In cosmic you would define the locations:

const BYTE RCCR0 @0xFFDE;

const BYTE RCCR1 @0xFFDF;

RCCR = RCCR0; // load calibration value

in asm:

#define RCCR0 $FFDE

#define RCCR0 $FFDF

ld A, RCCR0

ld RCCR, A ; load calibration value

Regards

sjo
fxdif
Associate II
Posted on May 19, 2004 at 08:16

Thanks!!