PIC16F785-I/SS Microchip Technology, PIC16F785-I/SS Datasheet - Page 118
![IC PIC MCU FLASH 2KX14 20SSOP](/photos/6/58/65895/150-20-ssop_sml.jpg)
PIC16F785-I/SS
Manufacturer Part Number
PIC16F785-I/SS
Description
IC PIC MCU FLASH 2KX14 20SSOP
Manufacturer
Microchip Technology
Series
PIC® 16Fr
Datasheets
1.PIC16F616T-ISL.pdf
(8 pages)
2.PIC16F785-ISS.pdf
(206 pages)
3.PIC16F785-ISS.pdf
(10 pages)
4.PIC16F785-ISS.pdf
(28 pages)
5.PIC16F785-IP.pdf
(178 pages)
Specifications of PIC16F785-I/SS
Program Memory Type
FLASH
Program Memory Size
3.5KB (2K x 14)
Package / Case
20-SSOP
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
17
Eeprom Size
256 x 8
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 14x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Processor Series
PIC16F
Core
PIC
Data Bus Width
8 bit
Data Ram Size
128 B
Interface Type
RS- 232/USB
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
17
Number Of Timers
3
Operating Supply Voltage
2 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734
Development Tools By Supplier
PG164130, DV164035, DV244005, DV164005, PG164120, ICE2000, DV164120, DM163029
Minimum Operating Temperature
- 40 C
On-chip Adc
14-ch x 10-bit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
XLT20SS1-1 - SOCKET TRANSITION 20DIP 20SSOPXLT20SS-1 - SOCKET TRANSITION 18DIP 20SSOPAC162060 - HEADER INTRFC MPLAB ICD2 20PINAC164307 - MODULE SKT FOR PM3 28SSOP
Connectivity
-
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
PIC16F785
15.5
During an interrupt, only the return PC value is saved
on the stack. Typically, users may wish to save key
registers during an interrupt (e.g., W and Status
registers). This must be implemented in software.
Since the last 16 bytes of all banks are common in the
PIC16F785 (See Figure 2-2), temporary holding
registers W_TEMP and STATUS_TEMP should be
placed in here. These 16 locations do not require
banking therefore, making it easier to save and restore
context. The same code shown in Example 15-1 can
be used to:
• Store the W register
• Store the Status register
• Execute the ISR code
• Restore the Status (and Bank Select Bit register)
• Restore the W register
EXAMPLE 15-1:
DS41249A-page 116
Note:
MOVWF
SWAPF
CLRF
MOVWF
:
:(ISR)
:
SWAPF
MOVWF
SWAPF
SWAPF
Context Saving During Interrupts
The PIC16F785 normally does not require
saving the PCLATH. However, if com-
puted GOTO’s are used in the ISR and the
main code, the PCLATH must be saved
and restored in the ISR.
W_TEMP
STATUS,W
STATUS
STATUS_TEMP
STATUS_TEMP,W
STATUS
W_TEMP,F
W_TEMP,W
SAVING STATUS AND W REGISTERS IN RAM
;Copy W to TEMP register
;Swap status to be saved into W (swap does not affect status)
;bank 0, regardless of current bank, Clears IRP,RP1,RP0
;Save status to bank zero STATUS_TEMP register
;Insert user code here
;Swap STATUS_TEMP register into W
;(sets bank to original state)
;Move W into Status register
;Swap W_TEMP
;Swap W_TEMP into W
Preliminary
2004 Microchip Technology Inc.