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.

oscillator in microcontroller

Status
Not open for further replies.

Bhuvanesh123

Advanced Member level 4
Joined
Aug 29, 2013
Messages
113
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Location
Singrauli, India, India
Activity points
814
if we see in arduino we have crystal oscillator in its board.it produce square wave of frequency about 16 mhz or something else.My question is how it would be related to input.explain me basically with some examples.thank you in advance
 

what's your meanings?
what do you want to know?
the schematic of oscillator circuit? how does the oscillator work?
there is always integrate a start oscillator circuit in MCU,here is atmega series.
 

what's your meanings?
what do you want to know?
the schematic of oscillator circuit? how does the oscillator work?
there is always integrate a start oscillator circuit in MCU,here is atmega series.

this is what i exactly mean if we write a code to off some thing after 5 seconds.it will calculate time from oscillator.it off after16mhz*5 cycles am i right.please someone come forward.i am in little choas.
 

the 16mhz above you mentioned is the main clock of system,like a people's heart.
the main clock passes the divider frequency register , the frequency will be slow.
every module in a MCU drived by the different clock divided from the main clock.
the code you used in program:
delay_ms();
delay_s();
will not execute everything,the compiler will insert _nop_ command to delay
do you understand now?

- - - Updated - - -

digital circuit must be drived by clock source if it want to "run".
the clock source is oscillator.
 

you can use timer delay to do such kind.
Check whether you are using PLL or No PLL.
Check your data sheet w.r.t to register values those to be entered.

Normal steps for timer delay
Timer Delay Calculations used:
* 1. Timer Frequency Ftimer = Fcy = (Fosc*PLL/4)
* 2. Using a Prescalar 1:8, then
* Ftimer = Fcy / scalar value
* 3. Time Interval Ttimer = 1/Ftimer
* 4. To calculate the value to be filled in Timer rolling over
* register to generate a sec delay :
* No of count for x sec delay = x sec / Ttimer

- - - Updated - - -

Steps vary from processor to processor ! what processor are you using ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top