Microcontroller › AVR › water level controller › ok it is fixed…. now it is
July 23, 2011 at 5:52 pm
#6509
Maneesh PK
Participant
ok it is fixed….
now it is displaying the level….
i wrote cammand to turn the motor on and of at desired levels
i am using port a for adc
port b for display data
port d for keypad
and c for lcd control and motor control…
C0, C1 and C2 are display control
and C7 as motor control
my program is like
main
{
//port initialisatn
while(1)
{
//read adc and display
//if less than lower level motor on
//if greater then upper level motor off
}
}
i defined PORTC=ctrl
PC7=motor
and wrote
ctrl=(1<<motr); to turn motor on
but when level is low the line for motor is not steady…..
i mean if i connect an led there it is blinking…
please help……