device detectted: unknow

Fully featured PIC compilers available on Windows, Linux, and macOS.
Post Reply
Author
Message
xallitic47
Posts: 25
Joined: 07 Dec 2020 23:59

device detectted: unknow

#1 Post by xallitic47 » 04 Oct 2022 15:37

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 1395 times
Attachments
image1.jpeg
image1.jpeg (236.67 KiB) Viewed 1395 times
image3.jpeg
image3.jpeg (175.43 KiB) Viewed 1395 times

xallitic47
Posts: 25
Joined: 07 Dec 2020 23:59

Re: device detectted: unknow

#2 Post by xallitic47 » 04 Oct 2022 20:06

Hi
How to configure the digital analog converter of pic 18f4620 and pic18f47k42 to use it with visual glcd

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: device detectted: unknow

#3 Post by filip » 06 Oct 2022 08:33

Hi,

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

Regards,
Filip.

xallitic47
Posts: 25
Joined: 07 Dec 2020 23:59

Re: device detectted: unknow

#4 Post by xallitic47 » 06 Oct 2022 14:54

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.
Attachments
mikroprog.jpeg
mikroprog.jpeg (233.07 KiB) Viewed 1366 times

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: device detectted: unknow

#5 Post by filip » 10 Oct 2022 08:20

Hi,

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

Regards,
Filip.

xallitic47
Posts: 25
Joined: 07 Dec 2020 23:59

Re: device detectted: unknow

#6 Post by xallitic47 » 13 Oct 2022 04:31

I tried again and downloaded icprog from the link https://www.mikroe.com/mikroprog-pic-dspic-pic32#suite and it does not recognize it

xallitic47
Posts: 25
Joined: 07 Dec 2020 23:59

Re: device detectted: unknow

#7 Post by xallitic47 » 14 Oct 2022 23:37

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
{


}
}

hexreader
Posts: 1785
Joined: 27 Jun 2010 12:07
Location: England

Re: device detectted: unknow

#8 Post by hexreader » 15 Oct 2022 01:13

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
    {
    }
}
Start every day with a smile...... (get it over with) :)

xallitic47
Posts: 25
Joined: 07 Dec 2020 23:59

Re: device detectted: unknow

#9 Post by xallitic47 » 19 Oct 2022 05:26

thanks for your help. I already managed to make it work. I had forgotten the detail of the LATX registers.

Post Reply

Return to “PIC AI compilers”