Ttelmah
Joined: 11 Mar 2010 Posts: 19552
|
|
Posted: Wed Nov 02, 2016 2:07 am |
|
|
This is a 'help' forum, not a 'write it for you' forum.
This is easy to drive. It accepts TTL serial. Direct connection to the PIC's RX/TX (RX on PIC to TX on the unit, and vice versa). Look at the UART examples with the compiler for how to setup the UART. Then just print the controls to the UART. Remember things take time, so the motor can't go straight from forwards to back instantly.
The commands are simple, but will depend on your motor. So "S\x80" will start the motor, and run it, but the actual speed will depend on your motor.
printf(">A\x01\xFF\x05");
This will set the direction to 'forwards' (which way this is will depend on your motor), start at speed '1', then accelerate to speed '255' (xFF), ramping the speed at rate '5'. |
|