j'ai réalisé ce programme pour la transmission série RS232-->PIC-->LCD
mais MPLAB ma affiche une erreur " OPTION ERROR: '-FM' "
j'ai besoin d'aide:
//--------E/S------------
bit Lcd_RS @ PORTB.0
bit Lcd_E @ PORTB.3
bit I @ PORTB.2
bit OERR @ RCSTA.1
bit CREN @ TXSTA.4
char data @ FSR
//-----------------variables globale---------------
bit drapeau;

//-----------------Initialisation du LCD------------
void Ini_Lcd()
{
PORTA=0;
PORTB=0;
Lcd_RS=0;
//delay(50);
//Place le curseur dans la position d'origine
commande_lcd(2)
//delay(50);
// LCD:interface 8 bits,2 lignes d'affichage(voir "LCDalpha")
commande_lcd(56)
//delay(50);
// Efface l'affichage initialisation
commande_lcd(1)
//delay(60);
//affichage visible, curseur invisible
commande_lcd(12)
//delay(6);
// Déplacement vers la droite
commande_lcd(6)
}
//----------------config le mode de transmission et la vitesse---------------
void Serial_Init() // Initialisation Port série 9600 baud 8 data bit, 1 bit stop, pas de parité
{
RCIE=1; //RCIE = 1 (bit 5):autorisation de l'interruption de réception
RCSTA=0b10010000; //SPEN = 1 (bit 7): utilisation du port série;
TXSTA=0b00000100; //BRGH = 1 (bit 2): mode asynchrone haute vitesse
// CREN = 1 (bit 4) Autorisation de la réception du port série
SPBRG=25; //9600 baud
// si 1 traité caractère série reçu.
drapeau=0;
}

//---------------Affichage---------------------------
void Affichage()
{
for(;!I
{
if(RCIF)
{
FSR=RCREG; //Place le caractère reçu dans FSR
drapeau=1;
if(OERR) //test d'une erreur d'overrun
{ //traitement de l'erreur d'overrun
CREN=0; //on efface le bit OERR (Autorisation de la réception du port série)
CREN=1; //on relance la réception
drapeau=0;
}
else if(drapeau)
{ //Affichage
Lcd_E=1;
PORTA.0=data.0;
PORTA.1=data.1;
PORTA.2=data.2;
PORTA.3=data.3;
PORTB.4=data.4;
PORTB.5=data.5;
PORTB.6=data.6;
PORTB.7=data.7;
Lcd_E=0;
INDF=6; // Déplacement vers la droite
commande_lcd(6)
}
}
}
}
//-------------------commande du LCD--------------------
void commande_lcd(char a)
{ INDF=a;
PORTA.0=INDF.0;
PORTA.1=INDF.1;
PORTA.2=INDF.2;
PORTA.3=INDF.3;
PORTB.4=INDF.4;
PORTB.5=INDF.5;
PORTB.6=INDF.6;
PORTB.7=INDF.7;
PORTA=0;
PORTB=0;
}


//--------Fonction principale---------
void main()
{
INTCON.7=1; //GIE = 1 (bit 7): autorisation globale des interruptions
INTCON.6=1; //PEIE = 1 (bit 6):autorisation des interruptions des périphériques
CMCON=0x7; // portA mode digital
TRISA=0b0; // portA pour lcd
TRISB=0b00000110; // portB pour lcd; rx en entrée
OPTION=0b10000101;
Serial_Init();
Ini_Lcd();
Affichage();
}