Salut tout le monde
j'ai un probleme avec MIKROC , ou avec la bibliothèque MMC_FAT plus exactement, je compile sans erreurs et quand je le teste sur PROTEUS j'ai une erreur "Attempt to execute illigal opcode (loaded from PC=1420). Instruction executes as a NOP. "
Voila le code :
merci de votre aide et désolé pour les fautes d'orthographe je suis pas francophone .Code:sbit LCD_RS at RD4_bit; sbit LCD_EN at RD5_bit; sbit LCD_D4 at RD0_bit; sbit LCD_D5 at RD1_bit; sbit LCD_D6 at RD2_bit; sbit LCD_D7 at RD3_bit; sbit LCD_RS_Direction at TRISD4_bit; sbit LCD_EN_Direction at TRISD5_bit; sbit LCD_D4_Direction at TRISD0_bit; sbit LCD_D5_Direction at TRISD1_bit; sbit LCD_D6_Direction at TRISD2_bit; sbit LCD_D7_Direction at TRISD3_bit; sbit Mmc_Chip_Select at LATC2_bit; // for writing to output pin always use latch (PIC18 family) sbit Mmc_Chip_Select_Direction at TRISC2_bit; int error=0; void main() { int error=0; ADCON1=0x0F; TRISB=0xFF; TRISA=0XFF; T0CON=0B11101000; //TIMER1 SPI1_Init(); Lcd_Init(); Lcd_Cmd(_LCD_CLEAR); // Clear display // Cursor off Lcd_Cmd(_LCD_RETURN_HOME); error = MMC_Init(); while(error == 1) { Lcd_Cmd(_LCD_CLEAR); Lcd_Out(1,1," CARD NOT FOUND"); error = MMC_Init(); } Lcd_Cmd(_LCD_CLEAR); Lcd_Out(1,1," CARD DETECTED!"); Lcd_Out(2,1,"CARD INITIALIZED"); Delay_ms(1000); MMC_fat_init(); SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV64, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_LOW, _SPI_LOW_2_HIGH); }
-----