You don't read ADC (feedback) whitin the while loop.
Cheers
Al.
You don't read ADC (feedback) whitin the while loop.
Cheers
Al.
All progress began with an idea
Also if you're increasing the PWM duty cycle & expecting the ADC'ed voltage to rise until a target is met, then I think you'd want it arranged like this...
while feedback<153 (in other words, while 'feedback' is less than 153 increase PWM duty cycle)
Thanx alot HankMSpank and arrati, i did what you said and my problems have been solved.
I want to add something in this code, i want after the duty cycle being constant to giveout this duty cycle for 3ms and then to put off duty cycle for 1.5ms
Please do me a favour for this too
Bookmarks