Freezing PIC !


Closed Thread
Results 1 to 16 of 16

Thread: Freezing PIC !

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73

    Question Freezing PIC !

    Hi all,

    I run into a very strange thing and I’m stuck. The following has happened 3 or 4 times before and again today and I cannot figure out the reason why: Suddenly the PIC freezes after I transferred to it a newly compiled program. It does not help to reset or cycle power, its frozen solid. There are no errors when compiling (MCS+/MPASM) and non from the programmer and its software (WISP648/xwisp2 ver 1.9.5)! Every time it has happened I have ended up having to re-installing MPLAB, PBP and MCS. After this tedious manoeuvre I re compile the program and the PIC come to life again. This is no different with another PIC, another circuit or a different program and it can strike at any time (at least I haven’t noticed any pattern yet). I have upgraded my XPP to service pack 3 but this made no difference.

    So.. my dear friends, have anyone have experienced something similar or have got any clues?

    Thanks!

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    We have no program to view!!!
    We have no idea which PIC you are using!!!
    We have no idea what this PIC is supposedly trying to accomplish!!!
    Are you writing over the code space in the PIC (writecode, etc)?
    Are you sure your power supply is solid?
    Can you pull the PIC out, put it back in and have it work again?
    Is this device attached to a PC most of the time?
    So, while you included a lot of information, I don't think the bulk of it is of any help.

  3. #3
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73


    Did you find this post helpful? Yes | No

    Default

    Hi skimask,

    There’s no program to view since it can happen with any program from a simple blink a LED to slightly more advanced stuff.
    As mentioned it’s not device related since it happened with different PIC’s 16F648, 16F88, 16F688 and 16F886 if they have something common. I have tried to remove pull-ups and pull downs to no avail. The program is verified 100% OK by the programmer everytime.
    I am not exactly sure what you mean by “writing over the code space”, I am a rookie and I’m not challenging the boundaries in any way (as far as I know).
    The power is good and solid according to my scope and hasn’t caused any glitches before.
    I haven’t tried to pull and reinstall the PIC, it’s a proto board and the programmer is permanently connected (ICSP kind).
    It is connected to my laptop while I am trying out different programs.

    Thanks!

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


    Did you find this post helpful? Yes | No

    Default

    Does your programmer have a "erase before program" option?
    And is it set to erase?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi PICante,
    You know . . . I'm thinking. . . when you set all that stuff (programs) up in your PC it returns everything to default settings, and then you may or may not go in and rearrange things to your liking, Where am I going with this you say? Maybe your programmer is somehow getting changed from intel hex file output to something else. I think in MCS, under view, program options or whatever it says (I am using my wife's computer so I am telling you this from memory), anyway in there where you change assemblers, there are check boxes which set the assemblers output type, and maybe it is getting it's settings changed.<br>
    Edit: on my own computer now. . . Open up MCS, click on the tab marked View, Scroll down the list to "Compile and Program Options" click on this and a window will open, Under the Blue bar labled Compile and Program Options are 3 tabs. Click on the tab marked Programmer. On the lower 1/2 of this tab, right side are 3 check circles, marked as follows INHX8M , INHX85, and finally INHX32. The first one marked INHX8M should be checked.<br> Check this as the source of your problem.
    Last edited by Archangel; - 13th September 2008 at 08:02.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73


    Did you find this post helpful? Yes | No

    Default

    Hi Dave & Joe,

    No matter which tab (Compiler, Assembler or Programmer) the setting is INHX8M. The alternatives in my version are INHX8M, INHX8S and INHX32. However this felt like closing in on it since I can program the PIC successfully with any file not compiled after this “disease” strikes.

    The programmer performs a (target erase) before slamming the new stuff, the “DOS” window for the programmer looks like this:


    Code:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corporation
    
    C:\PIC>set XWISP2=port 3
    
    C:\PIC>x 64
     xwisp2 version 1.9.5 for Windows (Jan 24 2008, Open Watcom C/C++ 1.70)
    File 64.hex loaded and is Intel Hex format conforming
    Detected programmer: Wisp648, firmware version 1.23
    Target: 16F688 revision 06 (ID=1186)
    Target erased
    Transferring program to 16F688 via Wisp648
    Transferring program memory...100%
    Verifying program memory......100%
    Transferring data memory......100%
    Verifying data memory.........100%
    Transferring ID memory........100%
    Verifying ID memory...........100%
    Transferring fuses memory.....100%
    Verifying fuses memory........100%
    Write-Verify operation terminated successfully in 3.58 seconds
    Putting target in run mode
    xwisp2 terminated successfully in 5.30 seconds

    Thanks guys!

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Replies: 67
    Last Post: - 8th December 2009, 02:27
  3. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  4. 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
  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