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.

checking input signal time period by using 8051

Status
Not open for further replies.

dinesh401

Advanced Member level 4
Joined
Aug 21, 2010
Messages
104
Helped
3
Reputation
4
Reaction score
2
Trophy points
1,298
Location
BANGALORE
Activity points
2,077
i want to check the ON time period of 555 timer by using a at89s52 microcontroller. i.e., i want to set a pin of mc as a input and i want to check the incoming ON time period of the square ware generated by 555 timer.
simply i want , whenever a 1ms ON time period is detected by mc, then a LED must glow which is connected to another pin of mc.
is this possible?
if possbile, plz give me the simple c code.
 

...i want to set a pin of mc as a input and i want to check the incoming ON time period of the square ware generated by 555 timer.
simply i want , whenever a 1ms ON time period is detected by mc, then a LED must glow which is connected to another pin of mc.
is this possible?

Yes, you could utilize a timer module of the 8051 with an external gate input, which could effectively measure the time duration of a pulse.

The following example demonstrates such a project, delivering a more precise and quantitative result than your specifications.

However the example could easily be adapted to the much simpler requirements you have specified.

8051 Pulse Width Measurement Example - Outputs Pulse Duration to Serial Port in microseconds

BigDog
 

if i dump the program into mc. and if i apply the signal to the mc and connect the serial output of mc to the system serial port. will the time be displayed in the serial window of keil ?
 

if i dump the program into mc. and if i apply the signal to the mc and connect the serial output of mc to the system serial port. will the time be displayed in the serial window of keil ?

Yes, if compiled properly for your 8051 variant. Also, note the duration time is in microseconds not milliseconds.

While using KEIL's serial port window maybe possible, I personally would recommend using a terminal emulation program like Hyperterminal or PuTTY:

PuTTY Download Page - It's Open Source and Free

It should provide you with a much more precise measurement of the 555 timer's pulse width.

BigDog
 

A detailed description of measuring duration is given in the file attached. You will find it useful.
 

Attachments

  • Experiment 5.doc
    32.5 KB · Views: 69

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top