Bonjour à tous
Voilà, j'ai un problème quand je lance la compilation de mon programme fait en C
Voila le programme:
#pragma chip PIC16F876
#include"delay.c"
char sortie @ PORTB;
bit position1;
bit position2;
void main(void)
{
sortie=0;
TRISB=0b00000000;
TRISA=0b11111111;
TRISC=0b00000000;
PORTB=0;
PORTC=0;
for (;
{
position1=1;
position2=1;
delay_ms(1);
position1=0;
delay_ms(1);
position2=0;
delay_ms(18);
if (PORTA.0==1){ PORTB.0=position2; }
else { PORTB.0=position1; }
if (PORTA.1==1){ PORTB.1=position2; }
else { PORTB.1=position1; }
if (PORTA.2==1){ PORTB.2=position2; }
else { PORTB.2=position1; }
if (PORTA.3==1){ PORTB.1=position2; }
else { PORTB.3=position1; }
if (PORTA.4==1){ PORTB.4=position2; }
else { PORTB.4=position1; }
if (PORTA.5==1){ PORTB.5=position2; }
else { PORTB.5=position1; }
}
}
ET voila ce que me dit le compilateur :
CC5X Version 3.3A, Copyright (c) B Knudsen Data, Norway 1992-2007
--> FREE edition, 8-16 bit int, 24 bit float, 1k code, reduced optim.
test.c:
Warning[1] C:\Users\Bernard\Documents\pro gramation PIC en c\programes\clignotement\test. c 1 : Duplicate chip definition is ignored
(Multiple different chip definitions (option -p<chip> and #pragma chip ..)
is supplied. One should be removed)
TRISA=0b11111111;
TRISC=0b00000000;
^------
Error[1] C:\Users\Bernard\Documents\pro gramation PIC en c\programes\clignotement\test. c 12 : Symbol 'TRISC' is undefined
(The definition of the symbol in not known. This can be due to
wrong spelling or letter case mismatch. Otherwise a new symbol
definition is required: variable, function, macro, etc.)
PORTB=0;
PORTC=0;
^------
Error[2] C:\Users\Bernard\Documents\pro gramation PIC en c\programes\clignotement\test. c 14 : Symbol 'PORTC' is undefined
Error options: -ew: no warning details -ed: no error details -eL: list details
Je ne vois pas en quoi le TRISC et PORTC sont faut?
Si qqun peut m'aider?
merci
-----