5 Flash Program Memory

Note: This data sheet summarizes the features of the dsPIC33CK256MC006 family of devices. It is not intended to be a comprehensive reference source. To complement the information in this data sheet, refer to “Flash Programming” (www.microchip.com/DS70000609) in the “dsPIC33/PIC24 Family Reference Manual”.

The dsPIC33CK256MC006 family devices contain internal Flash program memory for storing and executing application code. The memory is readable, writable and erasable during normal operation over the entire VDD range.

Flash memory can be programmed in three ways:

  • In-Circuit Serial Programming™ (ICSP™) programming capability
  • Enhanced In-Circuit Serial Programming (Enhanced ICSP)
  • Run-Time Self-Programming (RTSP)
ICSP allows for a dsPIC33CK256MC006 family device to be serially programmed while in the end application circuit. This is done with a Programming Clock and Programming Data (PGCx/PGDx) line and three other lines for power (VDD), ground (VSS) and Master Clear (MCLR). This allows customers to manufacture boards with unprogrammed devices and then program the device just before shipping the product. This also allows the most recent firmware or a custom firmware to be programmed.

Enhanced In-Circuit Serial Programming uses an on-board bootloader, known as the Programming Executive, to manage the programming process. Using an SPI data frame format, the Programming Executive can erase, program and verify program memory. For more information on Enhanced ICSP, see the device programming specification.

RTSP is accomplished using TBLRD (Table Read) and TBLWT (Table Write) instructions. With RTSP, the user application can write program memory data by double program memory words or by blocks (rows) of 128 instructions (256 addressable bytes). RTSP can erase program memory in blocks (pages) of 1024 instructions (2048 addressable bytes) at a time.