Problems in retrieving value stored in PIC

Vishal Sharma

Vishal Sharma

@vishal-pysGmK Oct 27, 2024
Hello, My current project involves storing of around 30 values in the PIC..
I want to retrieve these values through serial port when an application in my computer asks for it!
Do I need to use UART?? or the application can have the capability of retrieving the data stored at particular location in PIC??

I'm using PIC18F4520 , MikroC IDE.. The application is not yet developed. Need assistance!

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww May 30, 2013

    Vishal0203
    Hello, My current project involves storing of around 30 values in the PIC..
    I want to retrieve these values through serial port when an application in my computer asks for it!
    Do I need to use UART?? or the application can have the capability of retrieving the data stored at particular location in PIC??

    I'm using PIC18F4520 , MikroC IDE.. The application is not yet developed. Need assistance!
    In which memory you want those data to be stored? Internal flash or RAM?
    Which microcontroller you are using? You can easily send data to UART, make sure you connect RS232 converter IC between Microcontroller and PC.
  • Vishal Sharma

    Vishal Sharma

    @vishal-pysGmK May 30, 2013

    Harshad Italiya
    In which memory you want those data to be stored? Internal flash or RAM?
    Which microcontroller you are using? You can easily send data to UART, make sure you connect RS232 converter IC between Microcontroller and PC.
    Storing the values in EEPROM of MCU (i've mentioned MCU in my previous post PIC18F4520) I think activating UART after 30 days may be a problem, isn't it??
  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww May 30, 2013

    Vishal0203
    Storing the values in EEPROM of MCU (i've mentioned MCU in my previous post PIC18F4520) I think activating UART after 30 days may be a problem, isn't it??
    What do you mean by activating UART after 30 days?
    You can find routines for EEPROM read and write. Also some example code of UART can help you.
  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww May 30, 2013

    Check out #-Link-Snipped-#from microchip For EEPROM use and #-Link-Snipped-# for UART.
  • Vishal Sharma

    Vishal Sharma

    @vishal-pysGmK May 31, 2013

    Harshad Italiya
    What do you mean by activating UART after 30 days?
    You can find routines for EEPROM read and write. Also some example code of UART can help you.

    Sorry, I think activating is the wrong word.
    I mean to say, if UART is used to send the values, will my application be able to gather that info? if yes, is it possible to do that using java or c#?
  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww May 31, 2013

    Vishal0203
    Sorry, I think activating is the wrong word.
    I mean to say, if UART is used to send the values, will my application be able to gather that info? if yes, is it possible to do that using java or c#?
    Of course.. You can access COM port in your application. When you want to read some data you have to send some command say "*GET~" So this command will received at your microcontroller you have to decode it if command you received at UART port is OK then you have to send data back to UART which will received at COM port and your application can read all data.

    As I said you must have to be careful as you are going to connect your PC to microcontroller. You need RS232 converter IC MAX232 so it will do the logic transfer and you can make your device working. 😀
  • Vishal Sharma

    Vishal Sharma

    @vishal-pysGmK May 31, 2013

    Harshad Italiya
    Of course.. You can access COM port in your application. When you want to read some data you have to send some command say "*GET~" So this command will received at your microcontroller you have to decode it if command you received at UART port is OK then you have to send data back to UART which will received at COM port and your application can read all data.

    As I said you must have to be careful as you are going to connect your PC to microcontroller. You need RS232 converter IC MAX232 so it will do the logic transfer and you can make your device working. 😀
    okay! thanks a lot 😀
    I'm just waiting for my programmer 😒 I don't have it yet!
    Thank you!
  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww May 31, 2013

    Vishal0203
    okay! thanks a lot 😀
    I'm just waiting for my programmer 😒 I don't have it yet!
    Thank you!
    Great !
    I suggest to go with MPLAB X and XC8 Compiler. I am not sure Mikro C is better or not but I am using MPLAB X and XC8 it's working fine for me.
    BTW, Which programmer you have purchased?
  • Vishal Sharma

    Vishal Sharma

    @vishal-pysGmK May 31, 2013

    Harshad Italiya
    Great !
    I suggest to go with MPLAB X and XC8 Compiler. I am not sure Mikro C is better or not but I am using MPLAB X and XC8 it's working fine for me.
    BTW, Which programmer you have purchased?
    I'm not familiar with MPLAB yet (I have it in my PC though). I'm using MikroC as it is kind of understandable to me as I have knowledge regarding C n C++.
    I've not purchased it yet.. I think I'll go with JDM programmer, it suits my budget 👀
  • Harshad Italiya

    Harshad Italiya

    @harshad-ukH5ww Jun 2, 2013

    Vishal0203
    I'm not familiar with MPLAB yet (I have it in my PC though). I'm using MikroC as it is kind of understandable to me as I have knowledge regarding C n C++.
    I've not purchased it yet.. I think I'll go with JDM programmer, it suits my budget 👀
    Ah ! Ok. All the best for your code. 😀