PIC18F45K20-E/ML Microchip Technology, PIC18F45K20-E/ML Datasheet - Page 38

32KB, Flash, 1536bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 44 QFN 8x8x0.9mm TU

PIC18F45K20-E/ML

Manufacturer Part Number
PIC18F45K20-E/ML
Description
32KB, Flash, 1536bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 44 QFN 8x8x0.9mm TU
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr

Specifications of PIC18F45K20-E/ML

Core Processor
PIC
Core Size
8-Bit
Speed
48MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
35
Program Memory Size
32KB (16K x 16)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
1.5K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Data Converters
A/D 14x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
44-QFN
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
DM240313 - BOARD DEMO 8BIT XLPAC164112 - VOLTAGE LIMITER MPLAB ICD2 VPPDM164124 - KIT STARTER FOR PIC18F4XK20AC164322 - MODULE SOCKET MPLAB PM3 28/44QFN
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
PICkit™ 3 Debug Express
FIGURE 3-25:
DS41370C-page 34
T0CON: TIMER0 CONTROL REGISTER
To use Timer0 to replace the software delay Delay1KTCYx(50), it should be set up
so it overflows about every 200 to 300 ms. Let’s go over the T0CON bit settings to make
this happen:
T08BIT = 0
T0CS = 0
T0SE = 0
PSA = 1
Timer0 is configured as a 16-bit timer/counter to illustrate the buffering of TMR0H.
Timer0 runs off the internal instruction clock. At Fosc = 1MHz, the instruction clock
is 250kHz.
If Timer0 was running off the T0CKI pin, this bit would determine whether it incre-
mented on the falling edge or rising edge of the T0CKI pin signal. Since we are
running off the instruction clock, this bit is a “don’t care.” This means operation is
not affected by either setting of this bit.
The timer will overflow in 65536 counts. At the instruction clock rate of 250 kHz,
the timer overflow will occur every 65536 x (1 / 250,000) = 262ms. This is a time in
the range we want, so the prescaler is not assigned to Timer0. It runs directly off
the instruction clock.
© 2009 Microchip Technology Inc.

Related parts for PIC18F45K20-E/ML