load .hex file in PIC with hyperterminal


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2009
    Posts
    4

    Default load .hex file in PIC with hyperterminal

    Hi all!!

    I am doing a project with PIC16F874. I have the .asm code, and I have create a project with MPLAB. Then, I have built it successfully and i have generated the .hex file!!

    So, now, I need to load this .hex file in the PIC. I want to do it using the hyperterminal because i haven't any bootloader.

    I have configure hyperterminal with 9600bps, 8 - N - 1. then I connect the pic to the pc with a RS232 wire and then i turn on the pic. So, the hyperterminal shows the last program loaded and that the pic has jumped to the code.

    In order to load my file, i try to transfer the file, but it doesnt go!

    Can you help me, please??

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,616


    Did you find this post helpful? Yes | No

    Thumbs down

    Hi,

    No luck in this way !!!

    You do need a programmer in all cases ...

    - You program a boot loader WITH the Programmer ... then you use Hyperterm, i.e.

    OR

    - You program your chip with the programmer.

    in both cases you DO need a programmer !!!

    Have a look to the cost of a PicKit2 ... and do not hesitate !!!


    OR you can try PICAXE Chips ... that have a pre-programmed bootloader ( sort of ! )

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Aug 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Thanks a lot Acetronics!!!

    what do you mean with "programmer". I have used the MPLAB IDE.

    You program a boot loader WITH the Programmer ... then you use Hyperterm, i.e.
    How do i program the boot loader?? and how do i use the hyperterminal??

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    MPLAB is an IDE. It is a place to write the code.

    When the code is made into a HEX file a compiler is used, MPASM is the one MPLAB uses.

    A programmer is hardware to place the code on the chip. Certain voltage levels have to be met on certain pins for the chip to accept the file.

    Like Alan said, look at the PicKit2. Very nice.
    http://www.microchip.com/stellent/id...cName=en023805
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Thanks mackrackit.

    i understand it, but i have in the board an integrated circuit to implement it. This is: the MAX232, and then i have configured ports number 6 and 7 as input and output.

    with this, i suppose that i can communicate the pic with the pc to load the hex file...

    but how do i do this?

  6. #6
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Read How easily to build your own programmer @ this link:
    http://www.rentron.com/Myke4.htm

    This will help you in understanding the programmer subject.

    Al.
    All progress began with an idea

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by irenuska23 View Post
    Thanks mackrackit.

    i understand it, but i have in the board an integrated circuit to implement it. This is: the MAX232, and then i have configured ports number 6 and 7 as input and output.

    with this, i suppose that i can communicate the pic with the pc to load the hex file...

    but how do i do this?
    You have two pins on the pic labeled PGD and PGC, these are the pins the programmer uses to communicate with the chip. If these are the pins the 232 is connected to you are probably OK. You will need to "bug in" a connection of some kind between the PIC and the 232 to go to the programmer.

    The other pin used by the programmer is labeled MCLR. It is best not to have this pin connected to anything during programming. If it is connected to something it will need to be isolated with a diode. Higher voltage is applied to this pin to place the PIC in programming mode.

    So what you have is not going to work to get the first program into the chip as Alan mentioned. It might work after a boot loader is used.

    Read the link Al provided but I do not recommend building one. Unless you are wanting to build programmers. If you want to write code and program a chip then buy a programmer.

    Beware of the ebay stuff though. The money you save will be made up for in time and headaches.
    Dave
    Always wear safety glasses while programming.

  8. #8
    Join Date
    Aug 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    thanks a lot to everybody!!

    finally, i have achieved it!! mackrackit, your explanation has been very useful because now i have a better idea of how the pic works.

    i must say that the pic i am using has been programmed before, so it has installed the boot loader inside. I haven't done it, my colleage did some months ago!. so, now, with the hyperterminal i can load new versions of the code!!

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    thanks a lot to everybody!!

    finally, i have achieved it!! mackrackit, your explanation has been very useful because now i have a better idea of how the pic works.

    i must say that the pic i am using has been programmed before, so it has installed the boot loader inside. I haven't done it, my colleage did some months ago!. so, now, with the hyperterminal i can load new versions of the code!!
    COOL!!!!
    Have fun!
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Presetting Configuration Fuses (PIC Defines) into your Program
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 82
    Last Post: - 15th December 2013, 09:54
  2. Send binary file to pic over pc serial port
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 3rd May 2011, 13:47
  3. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  4. Replies: 67
    Last Post: - 8th December 2009, 02:27
  5. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts