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.

Take analog input 0-5V accordingly vary Ton peroid of LED connected to ATmege32 MCU

Status
Not open for further replies.

shashi.lahade

Newbie level 3
Joined
Jan 25, 2012
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,316
With the variable analog input,with PWM Ton peroid of LED should vary.T=Ton+Toff=5sec
say, 1V -Ton 1sec & Toff 4sec ,
2V - Ton 2sec & Toff 3sec
..
For ATmege32 microcontroller & AVRGCC compiler.
 

Can you put your question properly....I am not able to understand what you are looking for
 

He wants to change the on/off timing of a led based on a 0-5v input voltage read by the ADC.

The question is have you written any code or you expect us to provide a ready solution?
Post your code.
 

Sir,Thank you for reply
The external DC signal 0-5V is taken as input through the port avillable on the Embedded board. With the help of ADC this signal is to be converted in to digital form to blink the LED. We take T=Ton + Toff = 5sec

if i/p is 1V => LED will ON for 1 sec and OFF for 4 sec,This cycle remain continue..
if i/p is 2V => LED will ON for 2 sec and OFF for 3 sec,This cycle remain continue..
if i/p is 3V => LED will ON for 3 sec and OFF for 2 sec,This cycle remain continue..
if i/p is 4V => LED will ON for 4 sec and OFF for 1 sec,This cycle remain continue..

i am asking for the logic behind coding ..
 

Feed 1V to the ADC and read the value from ADC, may be by sending it to ur pc through serial port. Note down this value. Then repeat this by giving other volts 2,3,4 etc and read adc values. then select a range between the values of adc and make ur led blink accordingly.
Hope it helps :)
 

thank you 4 the reply..
i Provide the DC signal as Input through the serial port PORT A, that is use for the same..
wether we have to connect 2 pins from DC source to the 2 channels of PORT A..
I have refer the programs for temperature measurment using LM 35, light intensity using LDR, in which we provide signal from these sensor to only one channel of PORT A, other terminal is grounded...
should i connect the ground terminal form DC source to the ground of Embedded board..
 

always keep grounds common to make the reference same.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top