PIC16F1937-I/ML Microchip Technology, PIC16F1937-I/ML Datasheet - Page 11

IC PIC MCU FLASH 512KX14 44-QFN

PIC16F1937-I/ML

Manufacturer Part Number
PIC16F1937-I/ML
Description
IC PIC MCU FLASH 512KX14 44-QFN
Manufacturer
Microchip Technology
Series
PIC® XLP™ 16Fr

Specifications of PIC16F1937-I/ML

Core Size
8-Bit
Program Memory Size
14KB (8K x 14)
Core Processor
PIC
Speed
32MHz
Connectivity
I²C, LIN, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, LCD, POR, PWM, WDT
Number Of I /o
36
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 14x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
44-QFN
Controller Family/series
PIC16F
No. Of I/o's
36
Eeprom Memory Size
256Byte
Ram Memory Size
512Byte
Cpu Speed
32MHz
No. Of Timers
5
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Coding Practices for the Enhanced
PIC12/16
PAGING MINIMIZATION TECHNIQUES
Minimizing paging can be accomplished by the
following:
1.
2.
Most applications can minimize paging impact simply
by using relative branches.
RECOMMENDED PRACTICES
If your code currently uses the PAGESEL macro, it now
produces a MOVLP instruction. If your code currently
uses the BANKSEL macro, it will now produce a MOVLB
instruction. Use PAGESEL/BANKSEL to produce
migrateable code with the least effort.
ROBUST PROGRAMMING
Robust programming is an important issue in many
areas. To better support robust practices, the RESET
instruction was added, the optional Stack Reset was
included, and the ability to examine the stack was
added.
SOFTWARE RESET
The RESET instruction performs a complete system
Reset. This replaces the previous practice of waiting for
the Watchdog Timer to provide a Reset. Reset should
be placed around critical code blocks to reduce the
possibility of Program Counter upsets from causing
improper code execution.
STACK RESET
The Stack Reset allows an application to reset when
the stack overflows or underflows. In critical applica-
tions such as medical or aerospace, a stack monitor
can minimize erroneous behavior.
RESET MONITORING
With so many more ways to Reset, it can be a
challenge identifying the Reset source for proper
recovery.
The PCON register has been extended to show:
• Stack Overflow
• Stack Underflow
• Reset by Instruction
• Reset by POR
• Reset by MCLR
© 2009 Microchip Technology Inc.
Utilize relative branches whenever possible.
Update the RETLW tables to use BRW or the FSR/
INDF program memory read functions.
SOFTWARE MIGRATION
Software migration can be a tricky problem. Every effort
was made to minimize the complexities of converting
legacy code to run correctly on the enhanced PIC12/
16.
MOVING FROM PIC1XFXXX TO
PIC1XF1XXX
Migrating software from the legacy PIC12/16 devices to
the enhanced PIC12/16 consists of changes for pag-
ing/banking, adjusting the interrupt context saving and
modifying the indirect memory access functions. After
the software runs, additional changes can be made to
further improve the performance.
Banking
To adjust the banking for the new device, all references
to RP0 and RP1 must be replaced with MOVLB instruc-
tions. Usually the references to RP0 and RP1 are inside
of macros such as BANKSEL or simply BANK0.
MPASM™ assembler provides a BANKSEL macro that
inserts the correct RP0 and RP1 writes for the legacy
PIC12/16. MPASM assembler inserts the MOVLB
instruction for BANKSEL on the enhanced PIC12/16. If
your software uses a homebuilt BANKx type macro,
simply make a new version that uses MOVLB or replace
all the BANKx macros with BANKSEL macros. The
best general solution is simply to use the built-in BANK-
SEL macro.
Paging
There are two ways to handle paging issues. The first
way is to simply find all the writes to PCLATH and
adjust them. Most of them will continue to work
correctly but the MOVLP instruction will make them
faster. If your code uses the built-in MPASM assembler
macro
automatically. For further acceleration, the BRA and
BRW instructions can be used to eliminate the need for
many PAGESEL/GOTO combinations.
Interrupts
Automatic Context Save
Interrupts can remain unchanged but the context time
can be dramatically improved by eliminating the con-
text save code. Most Interrupt Service Routines do not
need any additional context saved beyond the registers
saved by the hardware. Simply removing the context
saving code will improve the context switch time by
approximately 12 instruction cycles.
Return Without Context Restore
PAGESEL
then
MOVLP
DS41375A-page 11
will
be
used

Related parts for PIC16F1937-I/ML