MikroElektronika PIC Microcontrollers PIC18 Manual de usuario Pagina 49

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 88
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 48
Robotics experiment with PIC microcontroller l 49
/********** Go Backward ************/
void Backward(char speed)
{
Motor_Init();
Change_Duty(speed);
Motor_A_BWD();
Motor_B_BWD();
}
/************************************/
/********** Spin Left *************/
void S_Right(char speed)
{
Motor_Init();
Change_Duty(speed);
Motor_A_FWD();
Motor_B_BWD();
}
/************************************/
/********** Spin Right ************/
void S_Left(char speed)
{
Motor_Init();
Change_Duty(speed);
Motor_A_BWD();
Motor_B_FWD();
}
/************************************/
/********** Stop Motor ************/
void Motor_Stop()
{
Motor_Init();
Change_Duty(0);
Motor_A_Off();
Motor_B_Off();
}
/************************************/
Listing 4-1 : The source code of motor.h library file for driving the DC motor
(final)
Vista de pagina 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 87 88

Comentarios a estos manuales

Sin comentarios