首页 > 器件类别 >

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
WinCE 6.0中有关内存映射交换区大小的问题?
最近写了个程序,用的是内存映射,在WinCE5.0中运行蛮顺畅的,速度也挺快,但是到了WinCE6....
guweijie_gg WindowsCE
想自己做一个通过单片机来测量10A以下交流电流的电路。
想自己做一个通过单片机来测量一个10A以下交流电流的电路。 我是这样想的,通过一个穿心电流互感器来得...
liudy2007 嵌入式系统
时钟信号后接反相器作用
时钟信号后接反相器作用 不明白的地方: 1、反相器的作用 2、反相器输入输出串电阻,以及C8...
gurou1 模拟电子
ADS41xx 的电源设计
本帖最后由 dontium 于 2015-1-23 13:40 编辑 ADS41xx 的电源设计...
安_然 模拟与混合信号
关于蓝牙Mesh的一些问题
最近工作需要,开始接触蓝牙Mesh,看了一下,蓝牙Mesh出来的时候不久,大概是17年出来的,到现...
w494143467 RF/无线
lm3s9b90外接FPGA问题 用EPI?
菜鸟问: LM3S9B90 跟 ATLEAR的FPGA通信,是否用EIP功能? 思路是使能...
collean 微控制器 MCU
热门器件
热门资源推荐
器件捷径:
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF EG EH EI EJ EK EL EM EN EO EP EQ ER ES ET EU EV EW EX EY EZ F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF FG FH FI FJ FK FL FM FN FO FP FQ FR FS FT FU FV FW FX FY FZ G0 G1 G2 G3 G4 G5 G6 G7 G8 G9 GA GB GC GD GE GF GG GH GI GJ GK GL GM GN GO GP GQ GR GS GT GU GV GW GX GZ H0 H1 H2 H3 H4 H5 H6 H7 H8 HA HB HC HD HE HF HG HH HI HJ HK HL HM HN HO HP HQ HR HS HT HU HV HW HX HY HZ I1 I2 I3 I4 I5 I6 I7 IA IB IC ID IE IF IG IH II IK IL IM IN IO IP IQ IR IS IT IU IV IW IX J0 J1 J2 J6 J7 JA JB JC JD JE JF JG JH JJ JK JL JM JN JP JQ JR JS JT JV JW JX JZ K0 K1 K2 K3 K4 K5 K6 K7 K8 K9 KA KB KC KD KE KF KG KH KI KJ KK KL KM KN KO KP KQ KR KS KT KU KV KW KX KY KZ
需要登录后才可以下载。
登录取消