Page 1 of 1

device detectted: unknow

Posted: 04 Oct 2022 15:37
by xallitic47
I am working with the pic18f47k22 with mikroC and EasypicV7 connectivity.
MikroProg Suite for pic [v2.80] does not recognize it, it shows me "-MCU selected:Pic18f47K22 continue away?" then I press yes button.
Progress bar shows me the programming progress up to 40% and returns to 0% and stays there.
I already tried with several Pic18f47k22 and it is the same. I can't program them. What is wrong?
Help me please.
image4.jpeg
image4.jpeg (292.06 KiB) Viewed 1445 times

Re: device detectted: unknow

Posted: 04 Oct 2022 20:06
by xallitic47
Hi
How to configure the digital analog converter of pic 18f4620 and pic18f47k42 to use it with visual glcd

Re: device detectted: unknow

Posted: 06 Oct 2022 08:33
by filip
Hi,

Which version of the mikroProg Suite for PIC are you using ?
Can you please attach detailed photo of your board ?

Regards,
Filip.

Re: device detectted: unknow

Posted: 06 Oct 2022 14:54
by xallitic47
I am using MikroProg Suite for pic [v2.80] with board Easypicv7 connectivity.
I have Windows on my laptop. I have programmed several microcontrollers. I recently started working with pic18f4620, but it hadn't happened until I tried programming pic18f47k42.

Re: device detectted: unknow

Posted: 10 Oct 2022 08:20
by filip
Hi,

Can you please install the latest version of mikroProg Suite (2.90) and perform firmware update of the EasyPIC v7 ?

Regards,
Filip.

Re: device detectted: unknow

Posted: 13 Oct 2022 04:31
by xallitic47
I tried again and downloaded icprog from the link https://www.mikroe.com/mikroprog-pic-dspic-pic32#suite and it does not recognize it

Re: device detectted: unknow

Posted: 14 Oct 2022 23:37
by xallitic47
I was finally successful. i had to install everything from scratch and update icprog. The trouble was fixed.

I have another question.
I am learning pic18f47k42.
I want to display a message in LCD, but the LCD shows nothing, what is wrong?
Mi code is


// Testing sprecial functions on MikroC
//#include "Special_functions.h"
// LCD module connections
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;

sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;



void main() {

//ANSELA = 0; // Configure AN pins as digital I/O
ANSELB = 0;
ANSELC =0;
ANSELD =0;
ANSELE=0;


TRISA = 0; // Configure AN0 and AN1 pins as input for AD
TRISB =0 ;
LATB=0;


//Configuración e inicialización del PIC.
Lcd_Init(); //Inicializa el LCD.
Lcd_Cmd(_LCD_CURSOR_OFF); //Se apaga el cursor.
Lcd_Cmd(_LCD_CLEAR);
Lcd_Out(1, 1,"Hello:"); //Se imprime texto.
Delay_ms(2000);
Lcd_Cmd(_LCD_CLEAR);
while(1)//Bucle infinito
{


}
}

Re: device detectted: unknow

Posted: 15 Oct 2022 01:13
by hexreader
For PIC18 and newer PIC16 chips, use LAT registers for output and PORT registers for input

Corrected code is:

Code: Select all

//  Testing sprecial functions on MikroC
// #include "Special_functions.h"
// LCD module connections
sbit LCD_RS at LATB4_bit;
sbit LCD_EN at LATB5_bit;
sbit LCD_D4 at LATB0_bit;
sbit LCD_D5 at LATB1_bit;
sbit LCD_D6 at LATB2_bit;
sbit LCD_D7 at LATB3_bit;

sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;

void main() {

    //ANSELA = 0; // Configure AN pins as digital I/O
    ANSELB = 0;
    ANSELC = 0;
    ANSELD = 0;
    ANSELE = 0;

    TRISA = 0; // Configure AN0 and AN1 pins as input for AD
    TRISB = 0;
    LATB = 0;

    //Configuración e inicialización del PIC.
    Lcd_Init(); //Inicializa el LCD.
    Lcd_Cmd(_LCD_CURSOR_OFF); //Se apaga el cursor.
    Lcd_Cmd(_LCD_CLEAR);
    Lcd_Out(1, 1,"Hello:"); //Se imprime texto.
    Delay_ms(2000);
    Lcd_Cmd(_LCD_CLEAR);

    while(1)//Bucle infinito
    {
    }
}

Re: device detectted: unknow

Posted: 19 Oct 2022 05:26
by xallitic47
thanks for your help. I already managed to make it work. I had forgotten the detail of the LATX registers.