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.

[51] C8051F380 Timer0 Time period Calculation

Status
Not open for further replies.

KVSN91

Junior Member level 2
Joined
Aug 27, 2015
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
182
Hi, I am learning 8051 Microcontroller(Choosing C8051F380 siliconlabs).Timers are used to creating frequency and time period.I didn't understand How to calculate Time period.
i understood my self to produce time period using TIMER0 , first we should know high and ,low frequencies we can produce using prescaler.
For ex my sysclok 48Mhz, i take prescaler SYSCLK/48,
ie.. 48Mhz/48=1 Mhz
for T= 1/ 1 Mhz =1us. ie.. 1sec like that

I take now prescaler Syscl/12
ie.. 48Mhz/12=4 mhz;
for T= 1/2Mhz=0.25 sec


Now please explain briefly How to calculate Time period and Frequency using Using Timer0 (13bit,16bit,8bit auto reload,two 8bit) . I am using C8051F380 controller
 

Hi,

You need to tak care about your capital letters and metric prefixes in general.

for T= 1/ 1 Mhz =1us. ie.. 1sec like that
it is not 1sec, but it i 1 microsecond = (1/ 1000000) s
48Mhz/12=4 mhz;
--> 48MHz/12=4 MHz; it is not millihertz, but megahertz
for T= 1/2Mhz=0.25 sec
--> it is not 0.25s but it is 0.25us = 250ns = 250 nanoseconds

The prescaler output is the input to the counter.
(I'm not familiar with 8051, but isn't there an additonal fixed prescaler of 4?)

In either case:
If counter input frequency is 1MHz and the counter counts 100 steps each, then the output is 1MHz / 100 = 10kHz.
A time period of 1/10kHz = 100us = 100 microseconds.

All this you can read in the datasheet and thousands of tutorials.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top