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 |