Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

PIC24F32KA304 Datasheet(PDF) 63 Page - Microchip Technology

Part # PIC24F32KA304
Description  20/28/44/48-Pin, General Purpose, 16-Bit Flash Microcontrollers with XLP Technology
PDF  320 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC24F32KA304 Datasheet(HTML) 63 Page - Microchip Technology

Back Button PIC24F32KA304 Datasheet HTML 59Page - Microchip Technology PIC24F32KA304 Datasheet HTML 60Page - Microchip Technology PIC24F32KA304 Datasheet HTML 61Page - Microchip Technology PIC24F32KA304 Datasheet HTML 62Page - Microchip Technology PIC24F32KA304 Datasheet HTML 63Page - Microchip Technology PIC24F32KA304 Datasheet HTML 64Page - Microchip Technology PIC24F32KA304 Datasheet HTML 65Page - Microchip Technology PIC24F32KA304 Datasheet HTML 66Page - Microchip Technology PIC24F32KA304 Datasheet HTML 67Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 63 / 320 page
background image
 2011 Microchip Technology Inc.
DS39995B-page 63
PIC24FV32KA304 FAMILY
EXAMPLE 5-2:
ERASING A PROGRAM MEMORY ROW – ‘C’ LANGUAGE CODE
EXAMPLE 5-3:
LOADING THE WRITE BUFFERS – ASSEMBLY LANGUAGE CODE
// C example using MPLAB C30
int __attribute__ ((space(auto_psv))) progAddr = &progAddr;// Global variable located in Pgm Memory
unsigned int offset;
//Set up pointer to the first memory location to be written
TBLPAG = __builtin_tblpage(&progAddr);
// Initialize PM Page Boundary SFR
offset = &progAddr & 0xFFFF;
// Initialize lower word of address
__builtin_tblwtl(offset, 0x0000);
// Set base address of erase block
// with dummy latch write
NVMCON = 0x4058;
// Initialize NVMCON
asm("DISI #5");
// Block all interrupts for next 5
// instructions
__builtin_write_NVM();
// C30 function to perform unlock
// sequence and set WR
; Set up NVMCON for row programming operations
MOV
#0x4004, W0
;
MOV
W0, NVMCON
; Initialize NVMCON
; Set up a pointer to the first program memory location to be written
; program memory selected, and writes enabled
MOV
#0x0000, W0
;
MOV
W0, TBLPAG
; Initialize PM Page Boundary SFR
MOV
#0x6000, W0
; An example program memory address
; Perform the TBLWT instructions to write the latches
; 0th_program_word
MOV
#LOW_WORD_0, W2
;
MOV
#HIGH_BYTE_0, W3
;
TBLWTL
W2, [W0]
; Write PM low word into program latch
TBLWTH
W3, [W0++]
; Write PM high byte into program latch
; 1st_program_word
MOV
#LOW_WORD_1, W2
;
MOV
#HIGH_BYTE_1, W3
;
TBLWTL
W2, [W0]
; Write PM low word into program latch
TBLWTH
W3, [W0++]
; Write PM high byte into program latch
;
2nd_program_word
MOV
#LOW_WORD_2, W2
;
MOV
#HIGH_BYTE_2, W3
;
TBLWTL
W2, [W0]
; Write PM low word into program latch
TBLWTH
W3, [W0++]
; Write PM high byte into program latch
•
•
•
; 32nd_program_word
MOV
#LOW_WORD_31, W2
;
MOV
#HIGH_BYTE_31, W3
;
TBLWTL
W2, [W0]
; Write PM low word into program latch
TBLWTH
W3, [W0]
; Write PM high byte into program latch



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com