Can't get a 16F88 to do anything.


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    i had 3 16f88's that no matter what i did, they would not run with internal osc. pop a crystal and 2 caps and not another problem since.

  2. #2
    Join Date
    Aug 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Joe's Code

    The code for MPASM compiled and assembled fine, but it still didn't work. Is this working for you with one of your chips or are you just thinking this should work? Just trying to determine if this is a code issue or chip or compiler version issue.

    I'll have the new compiler software and programmer on Wednesday, so I'll give it all a try again then.

    Thanks again for looking at this!

    Carl

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


    Did you find this post helpful? Yes | No

    Default

    Try this;
    Code:
    @ DEVICE MCLR_OFF, INTRC_OSC, WDT_ON, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF
    
    OSCCON = %01100000 'set int osc to 4mhz
    ANSEL = 0 'ALL DIGITAL
    CMCON = 7 'COMPARATORS OFF 
    
    TRISA = %00000000 'ALL OUTPUTS
    TRISB = %00000000 'ALL OUTPUTS
    PORTA = 0 'PORTA LOW
    
    Pause 100 'SETTLE DOWN
    
    START:
        High PORTA.6 'ON LED
        High PORTA.7
        Pause 1000
        Low PORTA.6 'OFF LED
        Low PORTA.7
        Pause 1000
        GoTo START 'REPEAT FOREVER
    
    end
    Compile & program with your setup. If it doesn't work, try the attached .hex file. It's the
    same thing as above. Make sure the config settings are the same as shown in the code
    before programming the part.

    The .hex file attached was compiled with 2.47, and verified working on an F88.
    Attached Files Attached Files
    Regards,

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

  4. #4
    Join Date
    Aug 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Talking Got Blinky!

    Thanks everyone for your help with this!!!

    Thanks for the HEX file Bruce! It worked great! Which led me back to my compiler as the possible cultprit for my woes. I felt like an idiot as I found MicroCode Studio was pointing to a PBP directory on an old back up drive with V2.45 on it, but even after switching it so that it pointed to my newer drive with V2.47 on it the compile still didn't work. So, I took it to another machine and compiled it there and once again, your code worked perfectly!

    Comparing the two systems made me look a bit closer at my screen. I noticed that MicroCode Studio had an additional tool bar (which was the lowest of all the tool bars) and two sets of compile buttons. I had updated MicroCode Studio to make sure I had the latest version before starting this and didn't notice it had turned on the ICD menu bar with its ICD compile button which look very much like the standard compile buttons. So, being a creature of habit, I have been just pointing to the lowest compile button on my screen not realizing it was the ICD compile button. The regular compile button works great, the ICD button, not so great, at least how I'm using it. On my other computer (when I turn the ICD menu bar on) it actually says "ICD Compile" next to the button (since I keep that screen at a higher resolution), but on the computer I normally use it just shows the button. I knew it had to be something idiotic I was doing since I haven't had this kind of problem programming PICs before, but I just couldn't see it and wouldn't have seen it without the troubleshooting help that was provided here.

    Finally I can (sheepishly) get back to getting some work done.

    Thanks again to everyone who chimed in on this thread!

    Carl

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


    Did you find this post helpful? Yes | No

    Default

    F9 for compile.
    No button look alikes
    Glad you got it going.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Aug 2008
    Posts
    7


    Did you find this post helpful? Yes | No

    Default Bad 16F88 and external oscillator

    Quote Originally Posted by nomad View Post
    i had 3 16f88's that no matter what i did, they would not run with internal osc. pop a crystal and 2 caps and not another problem since.
    I hope this isn't a bad batch of 16F88's. I bought 50 of these, but it was back when they first came out, so maybe. If they don't work with the new compiler etc. then I will try them with a crystal, but that won't do me much good as the board they are going into has already been produced without a section for a crystal. You might be asking, "What kind of idiot gets a board produced without having fully tested the code in a microcontroller?". Well, the board is actually designed to use either a 12F683 (which it has been using for a couple years without any problems) or a 16F88. The 16F88 brings in some advanced circuitry and options to the circuit that we haven't used up until this time, but we would like to start including those options. So, I am stuck with needing to use the internal oscillator since that is what the board is designed to use.

    Are you aware of a bad lot/date code of 16F88's?

    Thanks for your input!

    Carl

Similar Threads

  1. Code works on 16F84A but not on 16F88?
    By pharaohamps in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th November 2009, 18:29
  2. Output settings for 16F88
    By PICante in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 22nd June 2008, 14:03
  3. 16F88 RA6 and RA7 troubles
    By gandora in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 3rd August 2007, 02:57
  4. 16f88 help
    By ccsparky in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd July 2004, 17:50
  5. 4 line LCD with 16F88
    By anj in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 7th February 2004, 09:06

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