MikroElektronika PIC Microcontrollers PIC18 Manuel d'utilisateur Page 49

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 88
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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)
Vue de la page 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 87 88

Commentaires sur ces manuels

Pas de commentaire