MikroElektronika PIC Microcontrollers PIC18 Manuale Utente Pagina 49

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 88
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la 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)
Vedere la pagina 48
1 2 ... 44 45 46 47 48 49 50 51 52 53 54 ... 87 88

Commenti su questo manuale

Nessun commento