| ??? 01/20/06 20:02 Read: times |
#107921 - to store into code memory Responding to: ???'s previous message |
an an example of writing to code memory ////////////////////////////////////////////////////////////
//
//
// FUNCTION void WriteFlash (U8 xdata * WFSaddr, U8 WFCdata)
//
// read high flash
//
void WriteFlash (U8 xdata * WFSaddr, U8 WFCdata)
{
U8 WFCintsav;
WFCintsav = SG_IE;
SG_IE = 0;
SG_SFRPAGE = 0x0f;
SF_CCH0CN &= 0xfe; // single byte write
SG_SFRPAGE = 0;
if (WFSaddr > 0x7fff)
{
SG_PSBANK = 0x30;
}
else
{
SG_PSBANK = 0x20;
WFSaddr += 0x8000 ;
}
S0_FLSCL |= 0x01 ; // flash write
S0_PSCTL |= 0x01 ; // movx to flash
*WFSaddr = WFCdata ; //write the byte
S0_PSCTL &= 0xfe ; // restore
S0_FLSCL &= 0xfe ; // restore
SG_PSBANK = 0x10 ;
SG_IE = WFCintsav;
}
pray tell what on earth does this have to do with ISP,IAP Erik |
| Topic | Author | Date |
| event logging | 01/01/70 00:00 | |
| How do you want to do it? | 01/01/70 00:00 | |
| instruction | 01/01/70 00:00 | |
| Read this! | 01/01/70 00:00 | |
| write to code memory | 01/01/70 00:00 | |
| not always true | 01/01/70 00:00 | |
| direct movx | 01/01/70 00:00 | |
| where dpes IAP come in????? | 01/01/70 00:00 | |
| and what? | 01/01/70 00:00 | |
| event logging is storing data, not instr | 01/01/70 00:00 | |
| it's just a label | 01/01/70 00:00 | |
| writing those have nothing, nada, zero | 01/01/70 00:00 | |
| sure | 01/01/70 00:00 | |
| to store into code memory | 01/01/70 00:00 | |
| PLS HELP | 01/01/70 00:00 | |
| My Suggestion... | 01/01/70 00:00 | |
| Don't shout! | 01/01/70 00:00 | |
| pls help | 01/01/70 00:00 | |
| define | 01/01/70 00:00 | |
Thanks | 01/01/70 00:00 |



