# Duty cycle

Hi to all!
I'm trying to make a device with one input and two outputs. The input receives a rectangular signal whose frequency is from 1 to 100 Hz. before the output is activated when the duty cycle is less than 40%, if it is higher than 60% the second is 1. If there is no signal or if the signal is squared, the two outputs to 0,what the program I should use for this device .. THANKs

abdelnq:
what the program I should use for this device ..

One that does what you describe. What have you tried?

abdelnq:
Hi to all!
I'm trying to make a device with one input and two outputs. The input receives a rectangular signal whose frequency is from 1 to 100 Hz. before the output is activated when the duty cycle is less than 40%, if it is higher than 60% the second is 1. If there is no signal or if the signal is squared, the two outputs to 0,what the program I should use for this device .. THANKs

The one you create and write for the arduino. The board does nothing if you don't program it to do what you wish.

Use the pulseIn( ) command to measure the high and low times of the signal.
Add the two together to determine the period,
compare one to the period to determine the duty cycle.
Once you know those, digitalWrite (pinX, HIGH); or digitalWrite (pinX, LOW); for the outputs.

Start at the Reference tab and Learning tab above.

Please don't cross post. Especially when your original topic is already being discussed.

Hi to all!
I'm trying to make a device with one input and two outputs. The input receives a rectangular signal whose frequency is from 1 to 100 Hz. before the output is activated when the duty cycle is less than 40%, if it is higher than 60% the second is 1. If there is no signal or if the signal is squared, the two outputs to 0, How can I write this program foe arduino .. THANKs

thanks CrossRoads

please also don't copy and paste the same thing.

He didn't Nishant, that was left after a merge of 2 topics.

Okay Sir.