BUILD SUCCESSFUL (total time: 2s)
Loading code from C:/Users/Utilisateur/Desktop/PROGRA/timer0/LED.X/dist/default/production/LED.X.production.hex...
Loading completed
Connecting to programmer...
Programming target...
The programmer could not be started: Failed to program the target device
J'ai changé mon programme : (il allume juste une LED maintenant)
Code : Tout sélectionner
#include "configuration_bits.h"
void main(void)
{
TRISC = 0xF0;
RC0=1;
while(1) // boucle infinie
{
}
}Si vous voulez le fichier configuration_bits (on me l'a donné et il fonctionnait parfaitement avant) :
Code : Tout sélectionner
/ PIC16F887 Configuration Bit Settings
// 'C' source line config statements
#include <xc.h>
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
// CONFIG1
#pragma config FOSC = HS // Oscillator Selection bits (HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN)
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled and can be enabled by SWDTEN bit of the WDTCON register)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = ON // RE3/MCLR pin function select bit (RE3/MCLR pin function is MCLR)
#pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled)
#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled)
#pragma config BOREN = ON // Brown Out Reset Selection bits (BOR enabled)
#pragma config IESO = ON // Internal External Switchover bit (Internal/External Switchover mode is enabled)
#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is enabled)
#pragma config LVP = OFF // Low Voltage Programming Enable bit (RB3 pin has digital I/O, HV on MCLR must be used for programming)
// CONFIG2
#pragma config BOR4V = BOR40V // Brown-out Reset Selection bit (Brown-out Reset set to 4.0V)
#pragma config WRT = OFF // Flash Program Memory Self Write Enable bits (Write protection off) Bref le problème est vraiment survenu du jour au lendemain sans avertissement.
En tout cas merci d'avance
PS : c'est super d'avoir pu trouver un forum dédié principalement aux pics !
PS2 : la datasheet : http://ww1.microchip.com/downloads/en/D ... 41291D.pdf
PS3 : j'utilise une carte que l'on ma fournie pour programmer le pic, j'ai déjà changé 3 fois de cartes donc je ne pense pas que le problème vienne de là




