Can't get a 16F88 to do anything.


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    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

  2. #2
    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

  3. #3
    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

  4. #4
    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.

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, 19:29
  2. Output settings for 16F88
    By PICante in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 22nd June 2008, 15:03
  3. 16F88 RA6 and RA7 troubles
    By gandora in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 3rd August 2007, 03:57
  4. 16f88 help
    By ccsparky in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 3rd July 2004, 18:50
  5. 4 line LCD with 16F88
    By anj in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 7th February 2004, 10: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