1. New to Christmas lighting? Get started with the AusChristmasLighting 101 Manual:
    auschristmaslighting.com/wiki/AusChristmasLighting-101

Trouble programming the PIC for the LED strobe

Discussion in 'Strobes - LED or Others' started by rkhanso, Oct 24, 2010.

  1. rkhanso

    rkhanso New Elf

    Joined:
    Jun 25, 2010
    Messages:
    24
    Likes Received:
    0
    Building the LED strobes in this very recent group buy....

    I'm trying to flash the PIC with PicKit2 v.2.61, but get an error message: Invalid OSCCAL Value detected: To abort, click 'Cancel' To Continue, click 'OK'

    I click OK and get an error:
    Program failed at programming memory address 0x00000000

    I'm using a clone Pickit 2 and choosing the 10F200 pic processor. The LED on the strobe flashes pretty faintly a couple times when it's trying to program, but after I program the PIC, I verify and get a fail. After attempting to write the firmware and I do a blank check right away, the PIC is still blank.

    If I try MPLAB instead of PICKit2 software, MPLAB does auto-detect the PIC as a 10F200, but I can't get MPLAB to flash the PIC either.

    In no way am I knowledgeable about microprocessors or how to write programs or debug. I'm a direction follower.
    Any suggestions?
     
  2. budude

    budude Way behind schedule - again...

    Joined:
    May 13, 2010
    Messages:
    127
    Likes Received:
    0
    Location:
    San Jose, CA
    Try closing/restarting the PICkit programmer. My scenario was I programmed the first one OK yesterday, I had hibernated my PC, then reopened today and tried programming another today (without cloding the program). I got the same error as you show. Also make sure the "VDD PICkit 2" is "On" so that it supplies power to the board. After doing the restart I was able to program 10 in a row with no issues. The neat thing is that since it supplies power, right after programming, the LED should start strobing so you know everything is working.
     
  3. OP
    OP
    rkhanso

    rkhanso New Elf

    Joined:
    Jun 25, 2010
    Messages:
    24
    Likes Received:
    0
    Brian,
    Tried as you suggested - no help. Get the same error message. I actually just rebooted the computer and immediately ran the PICkit software to program the PIC.

    I am posting screenshots of what I get when programming.
    First is the error message.
    The second is after opening the .hex in PICkit 2 software (pay attention to the code in the window)
    The third is after trying to program the PIC, then reading the code off the PIC. Notice how above the red arrows I added, the columns are zeroes? While some of the columns are the correct code. I thought this may help someone smarter than me figure this out.
    Any ideas?

    [​IMG]

    [​IMG]

    [​IMG]

    Should I just build another one and see if I get the same problem?
     
  4. budude

    budude Way behind schedule - again...

    Joined:
    May 13, 2010
    Messages:
    127
    Likes Received:
    0
    Location:
    San Jose, CA
    I'm sure it's probably some silly setting somewhere - but - yeah - I would build a second or third one and confirm it either does or doesn't work the same. From memory, I think the OSCCAL value was 0036 but I'll double check mine to confirm. Once it was working, I just pulled out the header, popped it into another and hit Write and it worked every time. I've been building more non-PIC versions but I'll give one of the PIC versions a look-see and hopefully determine why it does this...
     
  5. OP
    OP
    rkhanso

    rkhanso New Elf

    Joined:
    Jun 25, 2010
    Messages:
    24
    Likes Received:
    0
    I tried it on a different computer and get the same results. Something must be messed up with the PIC.
    I'll build another strobe on Monday and give it a shot.
     
  6. Superman

    Superman I Have C.L.A.P and its very infectious Global Moderator

    Joined:
    May 29, 2010
    Messages:
    1,627
    Likes Received:
    15
    Location:
    Ipswich-QLD
    Find Me On:
    I'm with you rkhanso. I managed to get a few of these built today (thanks budude) and i am having much the same joy with the OSCCAL value error on the strobes I built.
     
  7. OP
    OP
    rkhanso

    rkhanso New Elf

    Joined:
    Jun 25, 2010
    Messages:
    24
    Likes Received:
    0
    I also built another strobe, and am still getting the OSCCAL error.
    Any other suggestions?
     
  8. fasteddy

    fasteddy I have C.L.A.P Global Moderator Generous Elf

    Joined:
    Apr 26, 2010
    Messages:
    6,487
    Likes Received:
    19
    Location:
    Albion Park NSW
    Find Me On:
    Are you guys using clones for your pickits, are you all using pickit 2 clones. wondering if there is something common here.
     
  9. OP
    OP
    rkhanso

    rkhanso New Elf

    Joined:
    Jun 25, 2010
    Messages:
    24
    Likes Received:
    0
    I'm using a Sure Electronics PicKit2 clone. It's worked just fine for me on the 16F88s
    This is the first time programming any other type of PIC
     
  10. Superman

    Superman I Have C.L.A.P and its very infectious Global Moderator

    Joined:
    May 29, 2010
    Messages:
    1,627
    Likes Received:
    15
    Location:
    Ipswich-QLD
    Find Me On:
    I'm using a microchip PICKIT 2 Sttarter pack .its comes with a test board with a PIC16F690 on it which I can get to work with there test HEX files.
     
  11. fasteddy

    fasteddy I have C.L.A.P Global Moderator Generous Elf

    Joined:
    Apr 26, 2010
    Messages:
    6,487
    Likes Received:
    19
    Location:
    Albion Park NSW
    Find Me On:
    anyone else having issues programming these with a picit 2?

    Who else has had success programming the strobes and what picit are you using 2 or 3
     
  12. Superman

    Superman I Have C.L.A.P and its very infectious Global Moderator

    Joined:
    May 29, 2010
    Messages:
    1,627
    Likes Received:
    15
    Location:
    Ipswich-QLD
    Find Me On:
    I just tried some half done boards they have the PICs, Nud's and the 3 resisters on them.it didn't come up with the OSCCAL error and competed the write after that i did a read of the PIC and it's only wrote upto line 040 out of 080. does this mean anything to anyone? when is the earliest we can program the pics on the boards?
     
  13. JonB256

    JonB256 Full Time Elf

    Joined:
    Sep 3, 2010
    Messages:
    123
    Likes Received:
    0
    Location:
    Granbury, Texas
    Find Me On:
    Are you programming the chip on the strobe board itself or on the PICKIT dummy sockets? Or have you tried both?

    (oops - see below, this isn't a socketed chip)
     
  14. budude

    budude Way behind schedule - again...

    Joined:
    May 13, 2010
    Messages:
    127
    Likes Received:
    0
    Location:
    San Jose, CA
    I have programmed 10 boards now with my genuine PICkit2. You can only program these on the board itself since they are SMD. As I mentioned above, I did see this error for a bit but a restart of the PICkit programmer and it came up OK after that. This did not help rkhanso though. I'll see if I can sneak a look tonight but might be iffy since I have a $%@) conference call at 10:30pm... I am using the latest PICkit SW from the Microchip website - don't recall off-hand the version number.
     
  15. OP
    OP
    rkhanso

    rkhanso New Elf

    Joined:
    Jun 25, 2010
    Messages:
    24
    Likes Received:
    0
    I'll try like Steve did.....
    According to the schematic, it looks like the only component needed on the board to program the PIC is the PIC itself. I'll rattle off 10 of them and give it a go in the morning.
     

Share This Page