Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

Project Request

Return
thomas thong
THOMAS_THONG

posted on 2014/07/04 12:38:41 PM CEST

Other Codes

Flash memory

write flash memory with library for PIC18, it's run, but I can't read flash if I don't use library. Writing is OK
TBLPTRL = Lo(address);
TBLPTRH = Hi(address);
TBLPTRU = Higher(address);

EECON1.EEPGD = 1;
EECON1.CFGS = 0;
EECON1.WREN = 1;
EECON1.FREE = 1;
INTCON.GIE = 0;
EECON2 = 0x55;
EECON2 = 0xAA;
EECON1.WR = 1;
INTCON.GIE = 1;
asm TBLRD*- ;

FSR0L = Lo(data_w[64]);
FSR0H = Hi(data_w[64]);

i = 0;
while (i <64) {
TABLAT = POSTINC0;
asm {
TBLWT+*
}
i++;

EECON1.EEPGD = 1;
EECON1.CFGS = 0;
EECON1.WREN = 1;
INTCON.GIE = 0;
EECON2 = 0x55;
EECON2 = 0xAA;
EECON1.WR = 1;
}
INTCON.GIE = 1;
EECON1.WREN = 0;

INTCON = saveintcon;


Please can help me!