Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

PIC18F23K22-E/ML Datasheet(PDF) 321 Page - Microchip Technology

Part # PIC18F23K22-E/ML
Description  28/40/44-Pin, Low-Power, High-Performance Microcontrollers with nanoWatt XLP Technology
PDF  496 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC18F23K22-E/ML Datasheet(HTML) 321 Page - Microchip Technology

Back Button PIC18F23K22-E/ML Datasheet HTML 317Page - Microchip Technology PIC18F23K22-E/ML Datasheet HTML 318Page - Microchip Technology PIC18F23K22-E/ML Datasheet HTML 319Page - Microchip Technology PIC18F23K22-E/ML Datasheet HTML 320Page - Microchip Technology PIC18F23K22-E/ML Datasheet HTML 321Page - Microchip Technology PIC18F23K22-E/ML Datasheet HTML 322Page - Microchip Technology PIC18F23K22-E/ML Datasheet HTML 323Page - Microchip Technology PIC18F23K22-E/ML Datasheet HTML 324Page - Microchip Technology PIC18F23K22-E/ML Datasheet HTML 325Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 321 / 496 page
background image
 2010 Microchip Technology Inc.
Preliminary
DS41412C-page 321
PIC18(L)F2X/4XK22
EXAMPLE 19-1:
SETUP FOR CTMU CALIBRATION ROUTINES
#include "p18cxxx.h"
/**************************************************************************/
/*Setup CTMU *****************************************************************/
/**************************************************************************/
void setup(void)
{ //CTMUCONH/1 - CTMU Control registers
CTMUCONH = 0x00;
//make sure CTMU is disabled
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;
//0.55uA, Nominal - No Adjustment
/**************************************************************************/
//Setup AD converter;
/**************************************************************************/
TRISA=0x04;
//set channel 2 as an input
// Configure AN2 as an analog channel
ANSELAbits.ANSA2=1;
TRISAbits.TRISA2=1;
// ADCON2
ADCON2bits.ADFM=1;
// Results format 1= Right justified
ADCON2bits.ACQT=1;
// Acquition time 7 = 20TAD 2 = 4TAD 1=2TAD
ADCON2bits.ADCS=2;
// Clock conversion bits 6= FOSC/64 2=FOSC/32
// ADCON1
ADCON1bits.PVCFG0 =0;
// Vref+ = AVdd
ADCON1bits.NVCFG1 =0;
// Vref- = AVss
//
ADCON0
ADCON0bits.CHS=2;
// Select ADC channel
ADCON0bits.ADON=1;
// Turn on ADC
}



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com