Jump to content
mikew

16F886 Programmer

Recommended Posts

Hi,

This is really a question for future reference. I have often used the 16F876 for projects, but it's now obsolete. I have a friend who has used a PICAXE, and that has a 16F886. So, I thought, that's probably one to try. However, I discover that neither of my programmers support this PIC, and my minimal research suggests that it's programming algorithm is somehow different from the rest.

So, my question is, what is peculiar about this PIC? How is the programming different? And how might I modify a programmer to support it? BTW, I've been on to the makers of one of my programmers that I think would only require a firmware update, only to be informed that "no updates are planned in the foreseeable future", but no other information forthcoming.

 

Any suggestions?

 

M.

Share this post


Link to post
Share on other sites

Hi

 

I don't have a straight answer for you, but in the Microchip site there are documents were the programming algorithms for each family of PICs are despicted in detail. This documents are not the specific PIC datasheet, but often the link for them is available at the bottom of the PIC page.

 

By the way, in the terms you put your question about departing from the PIC16F876 to a new device and the associated problems in terms of updated/new programmer.

I would suggest you take a good look at the PIC16(L)F1xxx family. They are the most recent PICs are loaded with peripherals and internal resources and, in general, cheaper than the older devices with similar characteristics.

Other interesting features are the new instruction set and new addressing modes (partly inerithed from the PIC18 range) that allow for more eficient code generation from high level language compilers.

Also in terms of "silicon bugs" they seems to be in a all new league.

 

Best regards

Jorge

Edited by JorgeF

Share this post


Link to post
Share on other sites

I may be hi-jacking this thread, apologies if so.

My attempts to create a working program in Boost C for the 16F886 have met with dismal failure. I'm hoping that someone more versed in the use of this PIC may be able to help. I'm quite familiar with the 16F876, but my problem seems to be in configuring the '886 clock source, as well as the other features that are not present on the '876.

 

I wish to use the internal clock running at 1MHz and have used what seem to be correct values in OSCCON, CONFIG1 and CONFIG2, but the result is a seemingly 'dead' PIC. Incidentally, I know it's not faulty as a hex file I found on another project page for the '886 works fine. I even tried using the values in this code, but no different result.

 

I have this nagging suspicion that there is something about this PIC that I'm missing, but despite studying the data sheet from start to finish it has eluded me!

 

Any suggestions welcome...

 

M.

Share this post


Link to post
Share on other sites

Hi

 

Maybe I can give you a hand.

My first trial run with Sourceboost C and NOVO was made using a Microchip LPC board with a PIC16F886.

Played with the LEDs, push-button and potentiometer, and later on moved to I2C and ported the Microchip PKSD-02 sample code to it.

 

I never used such a low clock freq, but I also had some initial dificulties with the clock set-up and sorted them out, so ...

 

Would you like to share some sample code that I can take a look at, or even I trial run on my LPC board.

I only have access to my MCHP dev boards and code later on at home, I'll try to find something you can use.

 

 

. . . . . . later . . . . . .

EDIT

 

I'm back.

 

Looking at some old projects I found this basic configuration that I've been using for almost everything.

 
// PIC16F886 with clock from internal oscillator
// Configuration bits (aka fuses)
#pragma    DATA    _CONFIG1, _INTRC_OSC_CLKOUT & ......<other options> ....
or
#pragma    DATA    _CONFIG1, _INTRC_OSC_NOCLKOUT & ......<other options> ....
 
// Select clock frequency with Oscilator Control register
osccon = 0x4f;       // 1MHz
osccon = ox6f;     // 4MHz (default)
osccon = 0xff;      // 8 MHz

I found one project that you can use as a starting pont on configuring the internal osc of the PIC16F886.

In fact its an example from the Souceboost NOVO manual.

You can find it attached to this post.

 

HIH

 

Best regards

Jorge

PIC16F886_INT_OSC.zip

Edited by JorgeF

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×