Bonjour, avant j'utiliser microC enfin jusque hier avant qu'il m'affiche "demo limit", donc j'ai choisis d'installer MPLAB X IDE pour pouvoir faire mon programme, seul problème impossible d'allumer une led correctement ( juste pour faire des test, le prendre en main) alors que cela est "normalement" super facile. Enfaite il y a un signal carre qui sort du PIN RB0 et RB7 alors qu'il devrais être au NVL1. Voici le programme:
Et au niveau des __config ça me met des ronds rouge avec des points d'exclamation, donc j'avais ajouter #pragma avant chaque config et a la conpilation ca me marque #pragma __ config unknow.Code:#include <stdio.h> #include <stdlib.h> #include <p18f2520.h> #include <delays.h> // PIC18F2520 Configuration Bit Settings #include <xc.h> __CONFIG(1, OSC_INTIO67 & FCMEN_OFF & IESO_OFF); __CONFIG(2, PWRT_OFF & BOREN_OFF & BORV_3); __CONFIG(3, WDT_OFF & WDTPS_32768); __CONFIG(4, CCP2MX_PORTC & PBADEN_OFF & LPT1OSC_OFF & MCLRE_ON); __CONFIG(5, STVREN_OFF & LVP_OFF & XINST_OFF); __CONFIG(6, CP0_OFF & CP1_OFF & CP2_OFF & CP3_OFF); __CONFIG(7, CPB_OFF & CPD_OFF); __CONFIG(8, WRT0_OFF & WRT1_OFF & WRT2_OFF & WRT3_OFF); __CONFIG(9, WRTC_OFF & WRTB_OFF & WRTD_OFF); __CONFIG(10, EBTR0_OFF & EBTR1_OFF & EBTR2_OFF & EBTR3_OFF); __CONFIG(11, EBTRB_OFF); int main(int argc, char** argv) { OSCCON = 0b11110111; // Oscillateur interne RC 8MHz TRISB = 0; PORTB = 0b00000001; LATB = 0b10000000; return (EXIT_SUCCESS); }
Si vous avez un site avec des exemples de programmation pour ce compilo j'en serait heureux.
EDIT: j'ai essayer avec PORTB et LATB mais dans les cas j'ai la même chose.
-----