Forum: Mikrocontroller und Digitale Elektronik für PIC18F Flash schreiben


von rapeur (Gast)


Lesenswert?

Hallo zusammen
ich habe code für [WriteProgMem] und ich moechte eine Funktion schreiben 
die die von Funktion WriteProgMem geschrieben werden und ich schaffe 
nicht.Das sind die Code
void WriteProgMem(void) //TESTED: Passed
{
    /*
     * The write holding register for the 18F4550 family is
     * actually 32-byte. The code below only tries to write
     * 16-byte because the GUI program only sends out 16-byte
     * at a time.
     * This limitation will be fixed in the future version.
     */
    dataPacket.ADR.low &= 0b11110000;  //Force 16-byte boundary
    EECON1 = 0b10000100;        //Setup writes: EEPGD=1,WREN=1

    //LEN = # of byte to write

    for (counter = 0; counter < (dataPacket.len); counter++)
    {
        *((dataPacket.ADR.pAdr)+counter) = \
        dataPacket.data[counter];
         dataPacket.data[counter]= ??????;
        if ((counter & 0b00001111) == 0b00001111)
        {
            StartWrite();
        }//end if
    }//end for
}//end WriteProgMem

und das ist meine Funktion:
unsigned char AND(unsigned char IN1,unsigned char IN2)
{if(IN1&&In2)
return(1);
}
und ich will AND, IN1, IN2 in Flash schreiben.
Grüß

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.