Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to find the osc frequency ?

Status
Not open for further replies.

sajeev

Advanced Member level 4
Joined
Apr 29, 2005
Messages
112
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Location
Kerala-India
Activity points
2,197
osc frequency

I am using pic16f628 in external RC mode.I am not bothered about accuracy.I need to make the board work on low power.Can I use RC ocs option to get low power consumption?Is
it a better option than ext 32khz crystal?
How to calculate the frequency
R=5K,C=22pf(got these values from datasheet)

Regards....
 

low osc frequency

I would recommend using the built-in RC oscillator rather than building your own if you're worried about the timing accuracy. The internal RC is factory calibrated and probably far more accurate than your own RC will be, unless you use very high grade components. Generall +/-1% or less is posssible, and even better over the normal temperature range.

Most PICs with internal oscillators are calibrated in the factory, so you don't have to worry about it.

If you want to see the speed, make a program to output a pulse on a pin at high speed, and count the number of cycles that it should take. (including the loop) Have a look on a digital oscilloscope that can measure the period and you'll be able to see if its the right speed, and if it drifts at all. Heat up the circuit with hot air, or cool with cold spray. Compare your own RC circuit with the internal PIC one. I guarantee yours will not be as good.

In terms of the formula for the RC timing... check out the datasheet for the PIC... it says how to figure out the values.
 

pic16f886 programs internal rc

The better option is to use the Internal Oscillator. It does not require any external components. It also has 2 speeds of 4MHz and 48KHz, which you can switch in software setting or clearing BIT3 of the PCON register.

Code:
PCON.OSCF = 0      // runs at 48KHz
PCON.OSCF = 1      // runs at 4MHz

bcf      PCON, 3     ; 48KHz
bsf      PCON, 3     ; 4Mhz
 

16f628 32 khz external circuit

Hi,
But I am planning to add an lcd interface to the pic.Presently all the pins of 16f628a are occupied.So the next option I found was 16f72.But here there is no internal 38khz osc.
Anybody knows the formula for calculating freq?
If i can get a freq lower than 32khz by using ext RC ,it will be efficient in cost and in power.
Regards....
 

frequency calibration pic16f628a

The 28pin PIC16F886 also has the low power osc, you want a PIC that's nanowatt enabled and the 16F72 is not to my knowledge.
Better to use the internal osc and sleep mode, careful use of peripherals will lower power consumption.
Here's the low power tips guide.

PS the external RC osc is very inaccurate.
 

how to calculate frequency for rc osc

An external RC circuit is not recommended. Even you have calculated the value of R and C very well, how about the tolerance of the real resistor and capacitor? Also, as you may know, the capacitance of a capacitor change substantially with the temperature!
 

internl osc what speed

blueroomelectronics said:
The 28pin PIC16F886 also has the low power osc, you want a PIC that's nanowatt enabled and the 16F72 is not to my knowledge.
Better to use the internal osc and sleep mode, careful use of peripherals will lower power consumption.
Here's the low power tips guide.

PS the external RC osc is very inaccurate.

Thanks blueroomelectronics.
I wll go through ur APP note.


Regards....
 

pic16f628 internal rc oscillator

Lucky I have the code for a 16F628A handy

Code:
        banksel  PCON
        bcf      PCON, OSCF        ; 48KHz clock
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top