PIC24F16KA302-E/SP Microchip Technology, PIC24F16KA302-E/SP Datasheet - Page 72

no-image

PIC24F16KA302-E/SP

Manufacturer Part Number
PIC24F16KA302-E/SP
Description
16KB Flash, 2KB RAM, 512B EEPROM, 16 MIPS, 12-bit ADC, CTMU, XLP 28 SPDIP .300in
Manufacturer
Microchip Technology
Series
PIC® XLP™ 24Fr
Datasheet

Specifications of PIC24F16KA302-E/SP

Core Processor
PIC
Core Size
16-Bit
Speed
32MHz
Connectivity
I²C, IrDA, LIN, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, HLVD, POR, PWM, WDT
Number Of I /o
24
Program Memory Size
16KB (5.5K x 24)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
2K x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 3.6 V
Data Converters
A/D 13x12b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
28-DIP (0.300", 7.62mm)
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
PIC24FV32KA304 FAMILY
6.4.3
To read a word from data EEPROM, the table read
instruction is used. Since the EEPROM array is only
16 bits wide, only the TBLRDL instruction is needed.
The read operation is performed by loading TBLPAG
and WREG with the address of the EEPROM location
followed by a TBLRDL instruction.
EXAMPLE 6-5:
DS39995B-page 72
int __attribute__ ((space(eedata))) eeData = 0x1234;
int data;
unsigned int offset;
// Set up a pointer to the EEPROM location to be erased
TBLPAG = __builtin_tblpage(&eeData);
offset = __builtin_tbloffset(&eeData);
data = __builtin_tblrdl(offset);
READING THE DATA EEPROM
READING THE DATA EEPROM USING THE TBLRD COMMAND
// Data read from EEPROM
A typical read sequence, using the Table Pointer
management
builtin_tbloffset)
(builtin_tblrdl) procedures from the C30
compiler library, is provided in
Program Space Visibility (PSV) can also be used to
read locations in the data EEPROM.
// Global variable located in EEPROM
// Initialize EE Data page pointer
// Initizlize lower word of address
// Write EEPROM data to write latch
(builtin_tblpage
 2011 Microchip Technology Inc.
and
Example
table
6-5.
read
and

Related parts for PIC24F16KA302-E/SP