PIC18F46K22-I/MV Microchip Technology, PIC18F46K22-I/MV Datasheet - Page 321

64KB, Flash, 3968bytes-RAM,8-bit Family,nanoWatt XLP 40 UQFN 5x5x0.5mm TUBE

PIC18F46K22-I/MV

Manufacturer Part Number
PIC18F46K22-I/MV
Description
64KB, Flash, 3968bytes-RAM,8-bit Family,nanoWatt XLP 40 UQFN 5x5x0.5mm TUBE
Manufacturer
Microchip Technology
Series
PIC® XLP™ 18Fr
Datasheet

Specifications of PIC18F46K22-I/MV

Core Processor
PIC
Core Size
8-Bit
Speed
64MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
35
Program Memory Size
64KB (32K x 16)
Program Memory Type
FLASH
Eeprom Size
1K x 8
Ram Size
3.8K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 30x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
40-UFQFN Exposed Pad
Processor Series
PIC18F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
4 KB
Number Of Programmable I/os
36
Number Of Timers
3 x 8-bit. 4 x 16-bit
Operating Supply Voltage
1.8 V to 5.5 V
Mounting Style
SMD/SMT
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
EXAMPLE 19-1:
 2010 Microchip Technology Inc.
#include "p18cxxx.h"
/**************************************************************************/
/*Set up CTMU *****************************************************************/
/**************************************************************************/
void setup(void)
{ //CTMUCONH/1 - CTMU Control registers
/**************************************************************************/
//Set up AD converter;
/**************************************************************************/
}
//
// ADCON2
ADCON2bits.ADFM=1;
ADCON2bits.ACQT=1;
ADCON2bits.ADCS=2;
// ADCON1
ADCON1bits.PVCFG0 =0;
ADCON1bits.NVCFG1 =0;
ADCON0bits.CHS=2;
ADCON0bits.ADON=1;
ANSELAbits.ANSA2=1;
TRISAbits.TRISA2=1;
CTMUCONH = 0x00;
CTMUCONL = 0x90;
//CTMU continues to run when emulator is stopped,CTMU continues
//to run in idle mode,Time Generation mode disabled, Edges are blocked
//No edge sequence order, Analog current source not grounded, trigger
//output disabled, Edge2 polarity = positive level, Edge2 source =
//source 0, Edge1 polarity = positive level, Edge1 source = source 0,
//CTMUICON - CTMU Current Control Register
CTMUICON = 0x01;
TRISA=0x04;
// Configure AN2 as an analog channel
ADCON0
SETUP FOR CTMU CALIBRATION ROUTINES
//make sure CTMU is disabled
//0.55uA, Nominal - No Adjustment
//set channel 2 as an input
// Results format 1= Right justified
// Acquition time 7 = 20TAD 2 = 4TAD 1=2TAD
// Clock conversion bits 6= FOSC/64 2=FOSC/32
// Select ADC channel
// Turn on ADC
// Vref+ = AVdd
// Vref- = AVss
Preliminary
PIC18(L)F2X/4XK22
DS41412D-page 321

Related parts for PIC18F46K22-I/MV