Cant get my PIC running


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Try the attached HEX file. If it works your programmer is probably OK. If not, check everything else.

    Note this will blink an LED on RB0.
    Attached Files Attached Files
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Join Date
    Aug 2008
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Hi Viberer,
    I do not use LVP, I have a six dollar JDM clone from Bulgaria I bought on eBay, and I use ICPROG a freeware programming software. Recently I began programming 16F88 for the first time, and my programmer balked and complained and refused to verify the chips, of coarse I thought, darned sample chips, darned cheap programmer . . . What I found works is to power the PIC from a 5 volt supply while programming and viola' it programs fine.
    HTH
    JS
    Oh, that is cheap! I ordered the components and circuit board separately and it cost about 25 euros. Im not really sure what you mean by "power the PIC from a 5 volt supply while programming" but this has to do something with not using LVP?


    Quote Originally Posted by Bruce View Post
    Try the attached HEX file. If it works your programmer is probably OK. If not, check everything else.

    Note this will blink an LED on RB0.
    I tried the code, it uploaded to the chip and program said it was successfull, like before. But that damn LED didnt ligth up and no sign of life there. Now i tried to read the memory from chip with programmer, it looks like this:

    :1000000000000000FF3FFF3FFF3F8F3FFF3FFF3FEC
    :10001000280EF23F060883169F00831206089F00F1
    :100020000608840087018801890106088600060801
    :1000300085000608650006088316870083120608F7
    :1000400083168800FF3FFF3FFF3FFF3FFF3FFF3F1B
    :10005000FF3F0800FF3FFF3FFF3FFF3FFF3FFF3FE6
    :10006000FF3F8312FF3FFF3FFF3FFF3FFF3FFF3F49
    :10007000FF3F0610FF3FFF3FFF3FFF3FFF3FFF3FB8
    :10008000FF3F2C28FF3FFF3F4028FF3FFF3FFF3F40
    :10009000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F70
    :1000A000FF3F0A12FF3FFF3FFF3FFF3FFF3FFF3F82
    :1000B000FF3F0A12FF3FFF3FFF3FFF3FFF3FFF3F72
    :1000C000FF3F2108FF3FFF3FFF3FFF3FFF3FFF3F55
    :1000D000FF3F0800000000000000000000000000DA
    :1000E0000000000000000000000000000000000010
    :1000F0000000000000000000000000000000000000
    :1001000000000000000000000000000000000000EF
    :1001100000000000000000000000000000000000DF
    :1001200000000000000000000000000000000000CF

    Theres a quite a few 3FF:s that seems suspicious. Here is the viberer.hex:

    :100000002828A301A200FF30A207031CA307031C9A
    :1000100023280330A100DF300F200328A101E83E90
    :10002000A000A109FC30031C1828A00703181528FC
    :10003000A0076400A10F152820181E28A01C222844
    :1000400000002228080083130313831264000800B1
    :100050008601831686018312061483160610831206
    :100060000330A300E8308A01022006108316061030
    :1000700083120330A300E8308A0102208A012C2871
    :0600800063008A01402824
    :02400E00F23F7F
    :00000001FF

    I assume that the codes are not supposed to be clone of each other, but can you say from this if it is corrupted?

    Another assume i made is that if i upload a longer program to the chip and then a shorter one, part of the longer program still remains in the memory but this is not issue since the new shorter code has its end coded or a infinite loop at the end. Is this rigth?

    I assumed this becouse there are no option to empty the memory in the program. If i want to "clear the memory" is it ok to program this kind of .hex to the chip:

    :1000000000000000000000000000000000000000F0
    :1000100000000000000000000000000000000000E0
    :1000200000000000000000000000000000000000D0
    :1000300000000000000000000000000000000000C0
    :1000400000000000000000000000000000000000B0
    :1000500000000000000000000000000000000000A0
    :100060000000000000000000000000000000000090
    :100070000000000000000000000000000000000080
    :100080000000000000000000000000000000000070
    :100090000000000000000000000000000000000060
    :1000A0000000000000000000000000000000000050
    :1000B0000000000000000000000000000000000040
    :1000C0000000000000000000000000000000000030
    :1000D0000000000000000000000000000000000020
    :1000E0000000000000000000000000000000000010
    :1000F0000000000000000000000000000000000000
    :1001000000000000000000000000000000000000EF
    :1001100000000000000000000000000000000000DF
    :1001200000000000000000000000000000000000CF
    :1001300000000000000000000000000000000000BF
    :1001400000000000000000000000000000000000AF
    :10015000000000000000000000000000000000009F
    :10016000000000000000000000000000000000008F
    :10017000000000000000000000000000000000007F
    :10018000000000000000000000000000000000006F
    :10019000000000000000000000000000000000005F
    :1001A000000000000000000000000000000000004F
    ................ and so?

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


    Did you find this post helpful? Yes | No

    Default

    Another assume i made is that if i upload a longer program to the chip and then a shorter one, part of the longer program still remains in the memory but this is not issue since the new shorter code has its end coded or a infinite loop at the end. Is this rigth?

    I assumed this becouse there are no option to empty the memory in the program.
    I am not sure if it will cause a problem, but I think it will if the chip is not erased.

    In MPLAB on the toolbar, configure, settingins, and the the Program Loading tab. Clear everything.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Aug 2008
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    I am not sure if it will cause a problem, but I think it will if the chip is not erased.

    In MPLAB on the toolbar, configure, settingins, and the the Program Loading tab. Clear everything.
    Oh, but there is only one problem: My programmer is not a standard model and mplab doesnt support it :/ , so im unfortunately not able to do it that way

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


    Did you find this post helpful? Yes | No

    Default

    OOPS, I thought you were using MPLAB.
    Now I read closer and see the link you provided. The link does not work.

    A hex from a blank chip will have FFFFFFF not 0000000 as you example.

    And you might try ICPROG for the program to load the chip. It might work with your programmer (it works with several)and I think it has an erase feature.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Aug 2008
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    OOPS, I thought you were using MPLAB.
    Now I read closer and see the link you provided. The link does not work.

    A hex from a blank chip will have FFFFFFF not 0000000 as you example.

    And you might try ICPROG for the program to load the chip. It might work with your programmer (it works with several)and I think it has an erase feature.
    Strange, it works for me :S

    When i read the chip, i will get 00000 not FFFFF, there is possibility that programmer or program converts the bits? sounds wierd, are you sure about this? And after writing program and reading I will get hex like this:
    :1000000000000000FF3FFF3FFF3F8F3FFF3FFF3FEC
    :10001000280EF23F060883169F00831206089F00F1
    :100020000608840087018801890106088600060801
    :1000300085000608650006088316870083120608F7
    :1000400083168800FF3FFF3FFF3FFF3FFF3FFF3F1B
    :10005000FF3F0800FF3FFF3FFF3FFF3FFF3FFF3FE6
    :10006000FF3F8312FF3FFF3FFF3FFF3FFF3FFF3F49
    :10007000FF3F0610FF3FFF3FFF3FFF3FFF3FFF3FB8
    :10008000FF3F2C28FF3FFF3F4028FF3FFF3FFF3F40
    :10009000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F70
    :1000A000FF3F0A12FF3FFF3FFF3FFF3FFF3FFF3F82
    :1000B000FF3F0A12FF3FFF3FFF3FFF3FFF3FFF3F72
    :1000C000FF3F2108FF3FFF3FFF3FFF3FFF3FFF3F55
    :1000D000FF3F0800000000000000000000000000DA
    :1000E0000000000000000000000000000000000010
    :1000F0000000000000000000000000000000000000
    :1001000000000000000000000000000000000000EF
    :1001100000000000000000000000000000000000DF
    :1001200000000000000000000000000000000000CF

    as i earlier said. the remaining space is filled with zeros like those in the last lines above, is this normal? Should those zeros be F's too?


    ICPROG unfortunately doesnt work with my programmer, however i found out that writing a new code to the chip "automaticly" erases the old one, so that should not be problem then.
    Last edited by Viberer; - 29th August 2008 at 20:13.

Similar Threads

  1. pic first build test board not running
    By comwarrior in forum Schematics
    Replies: 11
    Last Post: - 29th June 2009, 16:48
  2. 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
  3. Crystal osc running but PIC not using it
    By p15218 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 18th February 2007, 22:33
  4. Pic 16f628a running at lower than 4.5V
    By MegaADY in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th April 2005, 18:40
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

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