2.0 Introduction
Prior to the start of programming a microcontroller, it is necessary to set the conditions governing the operation of the microcontroller. The governing conditions imply the clock defining the speed of execution of instructions, the source of the clock, the protection against instabilities of the power supply, the protection against irregular execution of the parts of the program (through WATCHDOG timer, to be descibed later), etc.
The configuration of a microcontroller is carried out by the four registers:
REGISTER |
NAME |
ADDRESS |
FOSC |
Oscillator Configuration Register |
0xF80000 |
FWDT |
Watchdog Timer Configuration Register |
0xF80002 |
FBORPOR |
BOR and POR (Voltage Protection) Configuration Register |
0xF80004 |
FGS |
General Code Segment Configuration Register |
0xF8000A |
These registers are in the programming memory in the upper half of the memory. Details concerning the programming memory can be found in Chapter 8 of the book. It is important to know that the locations in the programming memory are 24-bit wide.
Attention!
The access to the configuration registers is enabled only during configuration of the microcontroller. Any attempt to access the configuration registers in terms of the programming code will result in the microcontroller reset.