Brushless 2 Click Board
Brushless 2 Click Board
Regular price
£24.00
inc VAT
£20.00
exc VAT
Regular price
Sale price
Unit price
per
£24.00
inc VAT
£20.00
exc VAT
Order NOW to ship within 10 working days
The Brushless 2 Click Board™ is fitted with the DRV10964 BLDC motor controller with an integrated output stage. The Click Board™ is designed to run on either 3.3V or 5V power supply.
It communicates with the target microcontroller over the following pins on MikroBUS: AN, RST, CS, PWM, INT.
Software Support
Code examples for the Brushless 2 Click Board™, written for MikroElektronika hardware and compilers are available on Libstock.
CODE SNIPPET
This code example shows how to change the speed and direction of the motor by pressing buttons on the development board.
01 uint8_t const maxPwmDuty = 255; 02 uint8_t currentDuty = 20 ; 03 uint8_t oldstate = 0; 04 05 void systemInit() 06 { 07 ANCON0 = 0x00; 08 ANCON1 = 0x00; 09 ANCON2 = 0x00; 10 PWM2_Init(5000); 11 PWM2_Start(); 12 PWM2_Set_Duty(currentDuty); 13 MOTOR_DIR_PIN_Direction = 0; 14 } 15 16 void Brushless_2_Init() 17 { 18 MOTOR_DIR_PIN = 1; 19 } 20 21 void Brushless_2_Task() 22 { 23 if (Button(&PORTB, 1, 1, 1)) 24 { 25 currentDuty++; 26 PWM2_Set_Duty(currentDuty); 27 if (currentDuty > maxPwmDuty) 28 currentDuty = 0; 29 30 } 31 32 if (Button(&PORTB, 5, 1, 1)) 33 { 34 oldstate = 1; 35 } 36 if (oldstate && Button(&PORTB, 5, 1, 0)) 37 { 38 MOTOR_DIR_PIN = ~MOTOR_DIR_PIN; 39 oldstate = 0; 40 } 41 } 42 43 void main() 44 { 45 systemInit(); 46 Brushless_2_Init(); 47 48 while( 1 ) 49 { 50 Brushless_2_Task(); 51 } 52 }
Brushless 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.