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 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.
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
Try this;
Compile & program with your setup. If it doesn't work, try the attached .hex file. It's theCode:@ 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
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.
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
F9 for compile.
No button look alikes
Glad you got it going.
Dave
Always wear safety glasses while programming.
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
Bookmarks