i load the hex file to the pic but it is not working on board help help

Discussion in 'Embedded Systems and Microcontrollers' started by angelita, Jan 18, 2011.

  1. angelita

    Thread Starter Member

    May 29, 2009
    25
    0
    hi need help please
    i want to program pic16f84A
    i have pic-pg2 programmer
    i used picpgm prgrammer software

    when i connect the pic it detected ..i can program it and load the hex file successfully without error ..

    but when i connect it to the board
    nothing happened ...its like have not been connected at all
    what is happeing here and how to fix this

    thank you
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Loading a hex file successfully to chip. Is not the same as the code will work as you want. And also serial based programmers are know to work now and then. Due to how many modern serial ports are constructed. I would as first step. Do compare/redback of the code that you have on your MCU. With the hex file on your computer. I am sure your programming software do have such options. If you have a match. Your programmer works. And it is your coding what is wrong. And that is most often. A far more simple task to fix
     
  3. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    Could you draw out a schematic of the PIC circuit. It's fairly easy to get something wrong the first time.
     
  4. angelita

    Thread Starter Member

    May 29, 2009
    25
    0
    i used the schematic and the code for Rickard Gunee pic game system

    t06afre : i do as you say and i noticed when i read the code from the pic the first line was missing its seems like the name of the pic and the config ..
    :020000040000FA ......the rest of the code are the same

    how to fix this
     
    Last edited: Jan 19, 2011
  5. angelita

    Thread Starter Member

    May 29, 2009
    25
    0
  6. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    It's possible you have to set up the config (first line of the hex file) in the software that you use to program the PIC:
    From the faq in the zip file:
     
  7. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    You can also erase the chip. And then do a blank check. If you are not able to erase your chip. Something is wrong.
     
  8. angelita

    Thread Starter Member

    May 29, 2009
    25
    0
    is there a way to check if the chip is working or not
     
  9. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I think the problem is the programmer. The JDM type programmer are famous for instability. They may work on a computer with a old type RS232 port. But with a USB to serial converter the result may be very disappointing. You have sort of been scammed by purchasing this product. Get a PICKIT 2 or 3 instead
     
  10. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988
    t06afre gives good advice. You should get a PICKit2 or PICKit3. Yo will be glad you did.

    The PICKit2 is not very expensive. It will not work with newer chips but there are still plenty it will work on.

    Both PICKit2 and 3 give you in circuit debugging which is very useful The PICKit 2 gives you a simple logic analyzer.
     
  11. angelita

    Thread Starter Member

    May 29, 2009
    25
    0
    im not using usb to serial...im using the rs232 port on my computer !!!


    by the way i erased the chip and every thing was successful ...also when i wrote the program to the
    chip eveything was successful

    is it possible that the problem is from pic >>>
     
  12. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Good the hear. By the way. The PIC16f84 is a old chip. You will find that the newer PICs are cheaper and better. With more functions. A good way to learn would be to port your games to a new chip
     
  13. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988

    That is good to hear. Congratulations! I been able to get PICs to work with erase before myself, though it usually does not require it.

    You still might want to look at buying a PICKit2 or 3.
     
  14. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    DIY programmers are often the cause of people getting frustrated and giving up on microcontrollers as "too hard".

    A PicKit 2 or 3 through ICSP will program and debug a PIC, and will alert you of a failure in loading the firmware.

    If the .hex code in the .ZIP file was written for the 16F84, it should work. It is VERY rare to have a bad PIC. It is very common to have a bad programmer, though.
     
  15. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988
    I have several. Well of course they did not come that way. I had something to do with them going bad :)
     
  16. angelita

    Thread Starter Member

    May 29, 2009
    25
    0
    i want to try it with winpic - pic programmer but but there is a message says: couldn't initialize programmer

    what shall i do
     
  17. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Solve most all of your problems

    Everybody that gets one kicks themselves for trying to build a $25 hack that works with a handful of PICs when a $35 perfect unit can be purchased. In addition to programming, a PicKit 2 acts as a TTL serial interface and a logic analyzer to boot!
     
  18. nerdegutta

    Moderator

    Dec 15, 2009
    2,515
    785
    I'm using the Piccolo with Asix UP programming software.

    http://tools.asix.net/products_museum_piccolo.htm

    I've successfully managed to program both the F84 and the F628.

    It's old, but stable. I'm also using the ISCP-function, with success. :)
     
  19. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    The JDM programmer type take power from the serial port. And many modern serial ports. Do not have have enough juice for that task. So the the programming voltage may be to low during programming. I have also read that some USB to serial converters mess up the timing.
     
Loading...