AT8236 2-Channel Motor Driver Module

1. Learning Objectives

Use AT8236 motor driver module to drive the motor.

2. Hardware connection

Pin connection between MSPM0G3507 and AT8236

image-20241210105955329

L1 motor:

MSPM0G3507AT8236
PA12AIN1
PA13AIN2

L2 motor:

MSPM0G3507AT8236
PA26BIN1
PA27BIN2

R1 motor:

MSPM0G3507AT8236
PA21AIN1
PA22AIN2

R2 motor:

MSPM0G3507AT8236
PA0BIN1
PA1BIN2

Motor and voltage regulator board pin connection:

AT8236Motor
AO1Motor power +
AO2Motor power -

AT8236 motor driver module voltage regulator board pin description:

2

3. Program description

Define four motor control functions.

The L1_control function is used to control the speed and direction of the L1 motor by adjusting the duty cycle of the PWM signal.

motor_speed and dir represent the motor speed and motor direction of the motor respectively.

Note: The project source code must be placed in the SDK path for compilation,

For example, the path: D:\TI\M0_SDK\mspm0_sdk_1_30_00_03\TB6612

4