![Pololu P-Star 25K50 Micro Скачать руководство пользователя страница 31](http://html1.mh-extra.com/html/pololu/p-star-25k50-micro/p-star-25k50-micro_user-manual_1574946031.webp)
Full documentation of these settings can be found in the PIC18F25K50/PIC18F45K50 datasheet, and
some of the settings are discussed below.
Instruction set
The PIC18 extended instruction set is disabled, so the microcontroller uses the legacy instruction set.
The legacy instruction set is the only instruction set supported by the XC8 compiler, but if you use a
different compiler then you should make sure it supports the legacy instruction set and is configured
to use it.
I/O pin configuration
The MCLRE bit is set to 1, so the MCLR pin is used as a reset pin and not a generic digital input.
The SDOMX bit is set to 1, so the SDO (SPI data output) pin is assigned to RB3.
The T3CMX bit is set to 1, so the T3CKI (Timer3 clock input) pin is assigned to RC0.
The CCP2MX bit is set to 1, so the CCP2 input/output pin is assigned to RC1.
Clock selection
The P-Star is configured to automatically use the on-board 16 MHz crystal, which is also known as the
primary oscillator. The signal from the crystal goes to a PLL, which uses it to generate a 48 MHz signal
for the CPU and the peripherals. The CPU takes at least 4 cycles to execute a single instruction, so it
can execute up to 12 million instructions per second (12 MIPS).
The PCLKEN configuration bit is set to 0, so it is possible to shut down the primary oscillator
and switch over to the internal oscillator of the PIC microcontroller. However, without changing the
FOSC<3:0> configuration bits, it is not possible to clock the USB module from the internal oscillator.
Also, without changing the FOSC<3:0> configuration bits, it is not possible to send the signal from
the internal oscillator through the PLL, so the maximum CPU clock speed would be 16 MHz (4 million
instructions per second), which is three times slower than the default.
Brown-out reset
The brown-out reset threshold on the P-Star is set to a nominal value of 2.85 V. The brown-out reset
is enabled by default, but it can be disabled in software by clearing the SBOREN bit in the RCON
register. The low-power brown-out reset circuit is also enabled, and will cause the microcontroller to
reset at some point between 1.8 V and 2.1 V.
Clearing the SBOREN bit will reduce the power consumption of the microcontroller and will allow it
63
#pragma config EBTRB = OFF
Pololu P-Star User’s Guide
© 2001–2019 Pololu Corporation
6. The P-Star Bootloader
Page 31 of 46