首页 > 器件类别 >

PIC12F1840_12

8-Pin Flash Microcontrollers with XLP Technology

厂商名称:Microchip(微芯科技)

厂商官网:https://www.microchip.com

下载文档
文档预览
PIC12(L)F1840
8-Pin Flash Microcontrollers with XLP Technology
High-Performance RISC CPU:
• Only 49 Instructions to Learn:
- All single-cycle instructions except branches
• Operating Speed:
- DC – 32 MHz oscillator/clock input
- DC – 125 ns instruction cycle
• Interrupt Capability with Automatic Context
Saving
• 16-Level Deep Hardware Stack with Optional
Overflow/Underflow Reset
• Direct, Indirect and Relative Addressing modes:
- Two full 16-bit File Select Registers (FSRs)
- FSRs can read program and data memory
Extreme Low-Power Management with
PIC12LF1840 XLP:
Sleep mode: 20 nA @ 1.8V, typical
Watchdog Timer: 500 nA @ 1.8V, typical
Timer1 Oscillator: 300 nA @ 32 kHz, 1.8V, typical
Operating Current: 30
A/MHz
@ 1.8V, typical
Analog Features:
• Analog-to-Digital Converter (ADC) module:
- 10-bit resolution, 4 channels
- Conversion available during Sleep
• Analog Comparator module:
- One rail-to-rail analog comparator
- Power mode control
- Software controllable hysteresis
• Voltage Reference module:
- Fixed Voltage Reference (FVR) with 1.024V,
2.048V and 4.096V output levels
- 5-bit rail-to-rail resistive DAC with positive
and negative reference selection
Flexible Oscillator Structure:
• Precision 32 MHz Internal Oscillator Block:
- Factory calibrated to ± 1%, typical
- Software selectable frequencies range of
31 kHz to 32 MHz
• 31 kHz Low-Power Internal Oscillator
• Four Crystal modes up to 32 MHz
• Three External Clock modes up to 32 MHz
• 4X Phase Lock Loop (PLL)
• Fail-Safe Clock Monitor:
- Allows for safe shutdown if peripheral clock
stops
• Two-Speed Oscillator Start-up
• Reference Clock module:
- Programmable clock output frequency and
duty-cycle
Peripheral Highlights:
• 5 I/O Pins and 1 Input Only Pin:
- High current sink/source 25 mA/25 mA
- Programmable weak pull-ups
- Programmable interrupt-on-change pins
• Timer0: 8-Bit Timer/Counter with 8-Bit Prescaler
• Enhanced Timer1:
- 16-bit timer/counter with prescaler
- External Gate Input mode
- Dedicated, low-power 32 kHz oscillator driver
• Timer2: 8-Bit Timer/Counter with 8-Bit Period
Register, Prescaler and Postscaler
• Enhanced CCP (ECCP) module:
- Software selectable time bases
- Auto-shutdown and auto-restart
- PWM steering
• Master Synchronous Serial Port (MSSP) with SPI
and I
2
C
TM
with:
- 7-bit address masking
- SMBus/PMBus
TM
compatibility
• Enhanced Universal Synchronous Asynchronous
Receiver Transmitter (EUSART) module:
- RS-232, RS-485 and LIN compatible
- Auto-Baud Detect
• Capacitive Sensing (CPS) module (mTouch
TM
):
- 4 input channels
Special Microcontroller Features:
• Operating Voltage Range:
- 2.3V-5.5V (PIC12F1840)
- 1.8V-3.6V (PIC12LF1840)
• Self-Reprogrammable under Software Control
• Power-on Reset (POR), Power-up Timer (PWRT)
and Oscillator Start-up Timer (OST)
• Programmable Brown-out Reset (BOR)
• Extended Watchdog Timer (WDT)
• In-Circuit Serial Programming™ (ICSP™) via
two pins
• In-Circuit Debug (ICD) via Two Pins
• Enhanced Low-Voltage Programming (LVP)
• Programmable Code Protection
• Power-Saving Sleep mode
2011-2012 Microchip Technology Inc.
DS41441C-page 1
PIC12(L)F1840
Peripheral Features (Continued):
• Data Signal Modulator module:
- Selectable modulator and carrier sources
• SR Latch:
- Multiple Set/Reset input options
- Emulates 555 Timer applications
PIC12(L)F1822/1840/PIC16(L)F182X/1847 Family Types
ECCP (Full-Bridge)
ECCP (Half-Bridge)
CCP
Program Memory
Flash (words)
MSSP (I
2
C™/SPI)
Data Sheet Index
10-bit ADC (ch)
CapSense (ch)
Data EEPROM
(bytes)
Comparators
Data SRAM
(bytes)
SR Latch
Timers
(8/16-bit)
EUSART
Debug
(1)
I/H
I/H
I/H
I/H
I/H
I/H
I/H
I/H
I/H
I/H
I/O’s
(2)
Device
PIC12(L)F1822
(1)
2K
256
128
6
4
4
1
2/1
1
1
0/1/0
Y
PIC12(L)F1840
(2)
4K
256
256
6
4
4
1
2/1
1
1
0/1/0
Y
PIC16(L)F1823
(1)
2K
256
128 12
8
8
2
2/1
1
1
1/0/0
Y
PIC16(L)F1824
(3)
4K
256
256 12
8
8
2
4/1
1
1
1/1/2
Y
PIC16(L)F1825
(4)
8K
256 1024 12
8
8
2
4/1
1
1
1/1/2
Y
PIC16(L)F1826
(5)
2K
256
256 16 12 12
2
2/1
1
1
1/0/0
Y
PIC16(L)F1827
(5)
4K
256
384 16 12 12
2
4/1
1
2
1/1/2
Y
PIC16(L)F1828
(3)
4K
256
256 18 12 12
2
4/1
1
1
1/1/2
Y
PIC16(L)F1829
(4)
8K
256 1024 18 12 12
2
4/1
1
2
1/1/2
Y
PIC16(L)F1847
(6)
8K
256 1024 16 12 12
2
4/1
1
2
1/1/2
Y
Note 1:
I - Debugging, Integrated on Chip; H - Debugging, available using Debug Header.
2:
One pin is input-only.
Data Sheet Index:
(Unshaded devices are described in this document.)
1:
DS41413
PIC12(L)F1822/PIC16(L)F1823 Data Sheet, 8/14-Pin Flash Microcontrollers.
2:
DS41441
PIC12(L)F1840 Data Sheet, 8-Pin Flash Microcontrollers.
3:
DS41419
PIC16(L)F1824/1828 Data Sheet, 28/40/44-Pin Flash Microcontrollers.
4:
DS41440
PIC16(L)F1825/1829 Data Sheet, 14/20-Pin Flash Microcontrollers.
5:
DS41391
PIC16(L)F1826/1827 Data Sheet, 18/20/28-Pin Flash Microcontrollers.
6:
DS41453
PIC16(L)F1847 Data Sheet, 18/20/28-Pin Flash Microcontrollers.
Note:
For other small form-factor package availibility and marking information, please visit
http://www.microchip.com/packaging
or contact your local sales office.
DS41441C-page 2
2011-2012 Microchip Technology Inc.
XLP
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
PIC12(L)F1840
FIGURE 1:
8-PIN DIAGRAM FOR PIC12(L)F1840
PDIP, SOIC, DFN
V
DD
RA5
RA4
MCLR/V
PP
/RA3
1
2
3
4
8
7
6
5
V
SS
RA0/ICSPDAT
RA1/ICSPCLK
RA2
PIC12(L)F1840
Note
1:
See
Table 1
for the location of all peripheral functions.
TABLE 1:
8-Pin PDIP/SOIC/DFN
8-PIN ALLOCATION TABLE (PIC12(L)F1840)
Comparator
Cap Sense
Reference
Modulator
SR Latch
EUSART
Interrupt
Pull-up
Timers
RA0
RA1
RA2
7
6
5
AN0
AN1
AN2
DACOUT
V
REF
CPS0
CPS1
CPS2
C1IN+
C1IN0-
C1OUT
SRI
SRQ
T0CKI
P1B
CCP1
P1A
FLT0
P1B
(1)
TX
CK
RX
DT
SDO
SS
(1)
SCL
SCK
SDA
SDI
SS
SDO
(1)
IOC
IOC
INT/
IOC
IOC
IOC
MDOUT
MDMIN
MDCIN1
Y
Y
Y
Y
Y
ICSPDAT
ICDDAT
ICSPCLK
ICPCLK
RA3
RA4
4
3
AN3
CPS3
C1IN1-
T1G
(1)
T1G
T1OSO
T1CKI
T1OSI
TX
(1)
CK
(1)
RX
(1)
DT
(1)
MDCIN2
MCLR
V
PP
OSC2
CLKOUT
CLKR
OSC1
CLKIN
V
DD
V
SS
RA5
V
DD
V
SS
Note 1:
2
1
8
SRNQ
CCP1
(1)
P1A
(1)
IOC
Y
Alternate pin function selected with the APFCON (Register
12-1)
register.
2011-2012 Microchip Technology Inc.
DS41441C-page 3
Basic
MSSP
ECCP
ADC
I/O
PIC12(L)F1840
Table of Contents
1.0 Device Overview .......................................................................................................................................................................... 7
2.0 Enhanced Mid-Range CPU ........................................................................................................................................................ 11
3.0 Memory Organization ................................................................................................................................................................. 13
4.0 Device Configuration .................................................................................................................................................................. 33
5.0 Oscillator Module (With Fail-Safe Clock Monitor)....................................................................................................................... 39
6.0 Reference Clock Module ............................................................................................................................................................ 57
7.0 Resets ........................................................................................................................................................................................ 61
8.0 Interrupts .................................................................................................................................................................................... 69
9.0 Power-Down Mode (Sleep) ........................................................................................................................................................ 79
10.0 Watchdog Timer (WDT) ............................................................................................................................................................. 83
11.0 Data EEPROM and Flash Program Memory Control ................................................................................................................. 87
12.0 I/O Ports ................................................................................................................................................................................... 101
13.0 Interrupt-on-Change ................................................................................................................................................................. 109
14.0 Fixed Voltage Reference (FVR) ............................................................................................................................................... 113
15.0 Temperature Indicator .............................................................................................................................................................. 117
16.0 Analog-to-Digital Converter (ADC) Module .............................................................................................................................. 119
17.0 Digital-to-Analog Converter (DAC) Module .............................................................................................................................. 133
18.0 SR Latch................................................................................................................................................................................... 137
19.0 Comparator Module.................................................................................................................................................................. 141
20.0 Timer0 Module ......................................................................................................................................................................... 149
21.0 Timer1 Module ......................................................................................................................................................................... 153
22.0 Timer2 Modules........................................................................................................................................................................ 165
23.0 Data Signal Modulator (DSM) .................................................................................................................................................. 169
24.0 Capture/Compare/PWM Module .............................................................................................................................................. 179
25.0 Master Synchronous Serial Port (MSSP) Module .................................................................................................................... 201
26.0 Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) ............................................................... 257
27.0 Capacitive Sensing (CPS) Module ........................................................................................................................................... 287
28.0 In-Circuit Serial Programming
(ICSP
) ................................................................................................................................ 295
29.0 Instruction Set Summary .......................................................................................................................................................... 299
30.0 Electrical Specifications............................................................................................................................................................ 313
31.0 DC and AC Characteristics Graphs and Tables ....................................................................................................................... 345
32.0 Development Support............................................................................................................................................................... 383
33.0 Packaging Information.............................................................................................................................................................. 387
Appendix A: Revision History............................................................................................................................................................. 397
Appendix B: Device Differences......................................................................................................................................................... 397
Index .................................................................................................................................................................................................. 399
The Microchip Web Site ..................................................................................................................................................................... 405
Customer Change Notification Service .............................................................................................................................................. 405
Customer Support .............................................................................................................................................................................. 405
Reader Response .............................................................................................................................................................................. 406
Product Identification System............................................................................................................................................................. 407
DS41441C-page 4
2011-2012 Microchip Technology Inc.
PIC12(L)F1840
TO OUR VALUED CUSTOMERS
It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip
products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and
enhanced as new volumes and updates are introduced.
If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via
E-mail at
docerrors@microchip.com
or fax the
Reader Response Form
in the back of this data sheet to (480) 792-4150. We
welcome your feedback.
Most Current Data Sheet
To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at:
http://www.microchip.com
You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page.
The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000).
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision
of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
• Microchip’s Worldwide Web site;
http://www.microchip.com
• Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
Customer Notification System
Register on our web site at
www.microchip.com
to receive the most current information on all of our products.
2011-2012 Microchip Technology Inc.
DS41441C-page 5
查看更多>
参数对比
与PIC12F1840_12相近的元器件有:PIC12F1822、PIC16F1823、PIC16F1829。描述及对比如下:
型号 PIC12F1840_12 PIC12F1822 PIC16F1823 PIC16F1829
描述 8-Pin Flash Microcontrollers with XLP Technology 18/20/28-Pin Flash Microcontrollers with XLP Technology 18/20/28-Pin Flash Microcontrollers with XLP Technology 18/20/28-Pin Flash Microcontrollers with XLP Technology
第二篇 MSP-EXP430F5529LP建立工程与烧写
真心不知道怎么把word里的图文贴上去,图片一张张上传太麻烦了,只好附上附件 第二篇 MSP-EXP...
shmily53 微控制器 MCU
角度传感器SCA103T
有用过角度传感器SCA103T的高手吗?我的程序加上去,X_OUT和Y-OUT读数不正常,都是204...
sf73602 电子竞赛
电压信号和电流信号的区别?
最近在看一些有关通信协议的资料,最早的分布式系统都是使用0-10V和0-20mA的信号进行传输,但...
乱世煮酒论天下 模拟电子
【DigiKey“智造万物,快乐不停”创意大赛】中考倒计时摆件 测试外设
作品名称:中考倒计时摆件. 开发环境:vscode+platformio 使用arduin...
aramy DigiKey得捷技术专区
世界名校课件网络版
本文是在网上无意看到的,觉得挺好的,就粘贴过来了。 如果有侵害到著作者的权益,请声明一下哦。 ht...
unbj FPGA/CPLD
2007年外包芯片设计强劲增长
据Gartner 最新调查报告,2007年芯片设计外包增长20%。 从2006年开始,Gar...
bwandmff FPGA/CPLD
热门器件
热门资源推荐
器件捷径:
L0 L1 L2 L3 L4 L5 L6 L7 L8 L9 LA LB LC LD LE LF LG LH LI LJ LK LL LM LN LO LP LQ LR LS LT LU LV LW LX LY LZ M0 M1 M2 M3 M4 M5 M6 M7 M8 M9 MA MB MC MD ME MF MG MH MI MJ MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ N0 N1 N2 N3 N4 N5 N6 N7 N8 NA NB NC ND NE NF NG NH NI NJ NK NL NM NN NO NP NQ NR NS NT NU NV NX NZ O0 O1 O2 O3 OA OB OC OD OE OF OG OH OI OJ OK OL OM ON OP OQ OR OS OT OV OX OY OZ P0 P1 P2 P3 P4 P5 P6 P7 P8 P9 PA PB PC PD PE PF PG PH PI PJ PK PL PM PN PO PP PQ PR PS PT PU PV PW PX PY PZ Q1 Q2 Q3 Q4 Q5 Q6 Q8 Q9 QA QB QC QE QF QG QH QK QL QM QP QR QS QT QV QW QX QY R0 R1 R2 R3 R4 R5 R6 R7 R8 R9 RA RB RC RD RE RF RG RH RI RJ RK RL RM RN RO RP RQ RR RS RT RU RV RW RX RY RZ
需要登录后才可以下载。
登录取消