More simple questions...

Status
Not open for further replies.

2camjohn

Member
Thanks to everyone who has answered my questions so far.

I have more questions though:

What configuration do I use to set up the internal oscillator in a pic 16f628 ?
What oscillator type do I choose ?
Is the internal one just as accurate as an external crystal ?
Anything else in the configuration I need to think about ?

Secondly what does the MCLR pin actually do? I have a resistor from it to +v but space is at a premium in my design can I replace the resistor with a normal copper track ?
Can I get away with just leaving it floating ?


Thanks
John
 
2camjohn said:
Thanks to everyone who has answered my questions so far.

I have more questions though:

What configuration do I use to set up the internal oscillator in a pic 16f628 ?
It's done with the configuration word. You can eighter set it at programming time (tick the INTI selection in winpicprog) or modify your __Config statement in the source code.

2camjohn said:
Is the internal one just as accurate as an external crystal ?
No, The internal osc. is an RC oscillator, wich is not as accurate as a crystal. It will be accurate enough for most applications and, according to the datasheet, for serial communications.

2camjohn said:
Secondly what does the MCLR pin actually do? I have a resistor from it to +v but space is at a premium in my design can I replace the resistor with a normal copper track ?
Can I get away with just leaving it floating ?
The MCLR pin is a reset pin for the pic, It must be made high to make ther pic run its program, pull it low, and the pic resets itself.
The Pic16F628 you are using allows you to disable the MCLR pin (also done with the configuration word, disable MCLRE in winpicprog, or change your __config statement). Disabling this pin has 2 advantages. You no longer HAVE to connect it and secondly, the pin can now be used as an digital input

Thanks
John[/quote]
 
It's oki if you remove the resistor, but I recommend you to connect nMCLR to VDD (you don't have to put the resistor, connect it directly) incase that you don't use it as a I/O pinout.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…