Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

icprog - osc settings

Status
Not open for further replies.

Adam

New Member
I am using pic basic with the pic16f627, at first I couldn't get the int osc to work by messing about with the settings in icprog, and I ended up putting the following in the top of the code

Code:
@ device INTRC_OSC_NOCLKOUT

this worked, but nor I want to use an external 3 pin 20mhz ceramic resonator (the '627 is of the 20mhz variety), none of the setting in icprog which look like they might be right work

does anyone know which setting it should be out of LP, XT, HS, ExtClk, IntRC I/O, IntRC Clockout, ER I/O, ER Clockout, i've tried ExtCLK and ER I/O, or could it be whatever I choose it is not being written, so in which case I'd need a line that goes at the top of the code. at the moment all i've got there is
Code:
define osc 20

Thanks

Adam
 
thanks for the info, I will give it a go now, but I am interested to know the logic behind it being HS if you know??
 
It's explained somewhere in the datasheets
LP = Low power crystal/resonator
XT = normal crystal/resonator up to 4Mhz
HS = high speed crystal/resonator 4Mhz +
ExtClk = external clock source on ClkIn
IntRC I/O = internal RC oscillator (only on some pics), oscillator pins can be used as normal IO
IntRC Clockout = internal oscillator, oscillator pins output the clock generated by the internal oscilator

never used ER actually :?
 
ER is an RC oscillator option, using just an external resistor - this allows you to vary the oscillator frequency over a fairly wide range - something you can't do with the internal RC oscillator. However, it does use at least one PIC pin, and could use 2 (if you use the CLKOUT setting).

You should really set all the fuse options in your source code, you don't mention what you are using to write your code, but my tutorials use assembler and set the options with a '__config' statement. It's all explained in the MPASM help file.

Just like Exo, I've never used the ER option either, I've never had the need - but it's always there if needed.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top