Thanks for attending my problem Mac
My code is an assembly one. Immediately after POR the code looks like this:
After POR:
RSP ; Reset Stack Pointer
CLRA ; Initialize A,X so that interrupt
CLRX ; uninitialized register warnings
*** -------------------------------------------------------------------
BSET 0,CONFIG1 ; Disable COPCTRL (Wdog)
*** -------------------------------------------------------------------
BSET 4,CONFIG2 ; External oscillator
When I read the registers CONFIG1 and CONFIG2 I get the proper settings:
CONFIG1 = %00000001 ; COPCTRL (Wdog) disabled
CONFIG2 = %00010000 ; X-tal oscillator (XCLK)
I do not change any settings regarding the MOR register. I presumed that after POR all bits would be set to “1” as described in the datasheet. Also, when reading the MOR register I get:
CONFIG1 = %11111111 ; OSCSEL1 and OSCSEL0 = 11 = XCLK
It could be helpful to know how to change the settings of the MOR register in the FLASH area of the ROM
But again, many thanks for helping out and hopefully you can guide in resolving this problem.
Regards, Oskar