16F88 ADC problem


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Location
    British Columbia, Canada
    Posts
    20


    Did you find this post helpful? Yes | No

    Default

    I've been going over my code line by line. Finally found something odd. And I've come to the conclusion that this is the last time I copy lines from somebody else's code.

    I'm sure the line <b>PROTECT_ON</b> is the reason i can no longer use this chip.

    I got lazy and copied
    @ DEVICE MCLR_OFF, INTRC_OSC, WDT_ON, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_ON
    from someone else's 16f88 project without actually reading what it was set to do.

    I'll have to wait until next week when my new 16F88 chips get here I think that one is now toast. Lesson learnt.

    Thanks to everyone who helped, I'll post updates when I resume the project.
    -Justin

  2. #2
    sinoteq's Avatar
    sinoteq Guest


    Did you find this post helpful? Yes | No

    Default Protect_On

    Hi
    The chip you are using is a flash based PIC and it can be programmed many times. I don't think I have ever heard of a PIC that has been programmed too many times.

    Your problem is a different one I think. Because you use INTRC_OSC and MCLR_OFF the internal Oscilator is used in the PIC and when you try to program the chip it has already started exectution of the internal Flash program you put there the first time. Your programmer can not access the chip in this case.


    Please look at http://www.picbasic.co.uk/forum/showthread.php?t=5465
    or http://www.picbasic.co.uk/forum/showthread.php?t=7616

    and you see some more info about this problems.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by sinoteq View Post
    Your problem is a different one I think. Because you use INTRC_OSC and MCLR_OFF the internal Oscilator is used in the PIC and when you try to program the chip it has already started exectution of the internal Flash program you put there the first time. Your programmer can not access the chip in this case.

    Please look at http://www.picbasic.co.uk/forum/showthread.php?t=5465
    or http://www.picbasic.co.uk/forum/showthread.php?t=7616

    and you see some more info about this problems.
    Hey...Good Point!
    I especially like post #12 of the 2nd link...
    Seems like I end up suggesting the same thing over and over again...

  4. #4
    Join Date
    Aug 2008
    Location
    British Columbia, Canada
    Posts
    20


    Did you find this post helpful? Yes | No

    Default

    Sinoteq,
    thanks for the links. I'm thinking I should stop being so cheap and just get a programmer from microchip now. This JDM just doesn't seem to do everything I want it to do.

    Skimask,
    I have erased the chip using WinPic (or at least winpic thinks it's erasing the chip, I get no errors) but when i try to reprogram I get verify errors.

    I'm going to go back to tinkering with my 16F627A's and RF for a while until I get another 16F88. I'll stay away from using INTRC_OSC and MCLR_OFF together for now.

    At least I know what happened to my 12F675's now, too bad I bent the pins and tossed them.

    You guys are great, thanks again.
    -Justin

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by greensasquatch View Post
    I'm thinking I should stop being so cheap and just get a programmer from microchip now.
    You won't be sorry when you get it... I can guarantee it...

    Skimask,
    I have erased the chip using WinPic (or at least winpic thinks it's erasing the chip, I get no errors) but when i try to reprogram I get verify errors.
    I think that 1st link in post 11 above has the information you need to modify your programmer to get it all to work.

    At least I know what happened to my 12F675's now, too bad I bent the pins and tossed them.
    Drill holes in them and turn them into geek jewelry!

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by greensasquatch View Post
    Sinoteq,
    thanks for the links. I'm thinking I should stop being so cheap and just get a programmer from microchip now. This JDM just doesn't seem to do everything I want it to do.

    Skimask,
    I have erased the chip using WinPic (or at least winpic thinks it's erasing the chip, I get no errors) but when i try to reprogram I get verify errors.

    I'm going to go back to tinkering with my 16F627A's and RF for a while until I get another 16F88. I'll stay away from using INTRC_OSC and MCLR_OFF together for now.

    At least I know what happened to my 12F675's now, too bad I bent the pins and tossed them.

    You guys are great, thanks again.
    I have 2 JDM programmers, they are different from one another, on each of them, printed on the circuit board is the orientation of the pic chips and location, As I said, they are WAY different in respect to each other. as far as issues of MCLR on/off, INTRC vs HS, xt . . . NONE. The issue I seem to have is one of them the ZIF socket is beginning to wear (the Plating) and I got tired of having to wiggle the chips before programming, that's why I have 2. #2 came in the mail today, works fine so far using ICProg.
    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.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    The issue I seem to have is one of them the ZIF socket is beginning to wear (the Plating) and I got tired of having to wiggle the chips before programming, that's why I have 2. #2 came in the mail today, works fine so far using ICProg.
    Why not swap out the ZIF socket?

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Why not swap out the ZIF socket?
    Doable, 18 bucks delivered from CA now I have a backup. I have not yet figured out how to program 18f4550 with these, I think my PC serial port is too weak, the new programmer has a 12v input which can be jumpered in, I will try that next, and I think there is a PICKIT2 in my future, depends if my sometimes employer has caught sight of the payroll fairy, till then wallet goes under the pillow
    EDIT: 12v did not do it either.
    Last edited by Archangel; - 7th September 2008 at 10:39.
    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.

  9. #9
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by greensasquatch View Post
    ...
    I have erased the chip using WinPic (or at least winpic thinks it's erasing the chip, I get no errors) but when i try to reprogram I get verify errors.

    I'm going to go back to tinkering with my 16F627A's and RF for a while until I get another 16F88. I'll stay away from using INTRC_OSC and MCLR_OFF together for now.
    I have an MELabs programmer, and I've been very happy with it. The tech support is great, too. I had a chip with the same issue as you, so I called and asked about it. They said that the programmer relies on MCLR to program it--and since you turned it off, there is an issue. If you need to make that pin an output, you need a 1-2 second delay before setting the Tris. This might not be your exact issue since some of your settings were pasted from elsewhere, but it is something to keep in mind.

    BTW, it's nice when the tech support for your hardware and software come with the same phone call.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by greensasquatch View Post
    I've been going over my code line by line. Finally found something odd. And I've come to the conclusion that this is the last time I copy lines from somebody else's code.

    I'm sure the line <b>PROTECT_ON</b> is the reason i can no longer use this chip.
    If PROTECT_ON is used, that means you can't READ the chip, doesn't mean you can't write to it.
    ERASE the chip completely...then reprogram it...

Similar Threads

  1. PIC18F2423, ADC problem
    By mistergh in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th March 2009, 01:31
  2. Mutliple ADC problem with PIC16F877
    By andyto in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd October 2007, 17:47
  3. ADC problem with PIC16F917
    By eetech in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th March 2007, 21:22
  4. Problem with 16F88 controlling h-bridges
    By silentwol in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th March 2007, 04:16
  5. 16F88 using comparators AND the adc
    By jpeakall in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th May 2005, 01:08

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