angel.angel
Member level 1
- Joined
- Jan 23, 2013
- Messages
- 36
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,288
- Location
- India
- Activity points
- 1,533
int main() // The main function
{
DDRD = 0d11111111; // Set all the pin of portD as output
DDRB = 0b00000000; // Set all the pin of portB as input
While(DDRB = 0b00001111)
{
PORTD = 0d00000101; // both motor rotate Clock Wise
}
While (DDRB = 0b00001101)
{
PORTD = 0d00000100; // left motor stop and right motor rotate CW
}
While(DDRB = 0b00001100)
{
PORTD = 0d00000110; // left motor CW and right motor counter clock wise (CCW)
}
While (DDRB = 0b00001011)
{
PORTD = 0d00000001; // left motor CW and right motor stop
}
While (DDRB = 0b00000011)
{
PORTD = 0d00001001; // left motor CW and right motor CCW
}
}
To drive two motor by ATmega8L - 8pu
int main() // The main function
{
DDRD = 0d11111111; // Set all the pin of portD as output
DDRB = 0b00000000; // Set all the pin of portB as input
While(DDRB = 0b00001111)
{
PORTD = 0d00000101; // both motor rotate Clock Wise
}
While (DDRB = 0b00001101)
{
PORTD = 0d00000100; // left motor stop and right motor rotate CW
}
While(DDRB = 0b00001100)
{
PORTD = 0d00000110; // left motor CW and right motor counter clock wise (CCW)
}
While (DDRB = 0b00001011)
{
PORTD = 0d00000001; // left motor CW and right motor stop
}
While (DDRB = 0b00000011)
{
PORTD = 0d00001001; // left motor CW and right motor CCW
}
}
I m facing an problem related to ISP data cable 10 pin name .............. can u tell me what is the meaning and word of 'NC' pin shown in figure.
Either get another model with more PWM outputs or use software PWMActualy in atmega 8l there are only 3 PWM out put pin, but I want to drive my two gear motor that need four output pin. Now What should I do?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?