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.
 


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: 70

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…