Using the S08RN60 MCU for controlling a DC motor with Touch electrodes.

Document created by vicentegomez Employee on Sep 15, 2014Last modified by Diana Torres on Feb 28, 2017
Version 3Show Document
  • View in full screen mode

This example application based on Processor Expert runs on a TWR-S08RN60 board and implements Touch Sensing electrodes for controlling the enable, speed and direction of a DC motor.

The touch electrodes are controlled using the Touch Sensing Software v3.1, included on PEx:

 

 

  • TOUCH_PAD0 reduces the speed of the motor.
  • TOUCH_PAD1 increases the speed of the motor.
  • TOUCH_PAD2 changes the motor direction.
  • TOUCH_PAD3 enables/disables the motor movement.

 

 

The motor direction is controlled by two GPIOs connected to an H-bridge mounted on a TWR-PROTO, and the speed is controlled by PWM channel 0 of FlexTimer 1.

Besides, the RN60 is controlling eight multiplexed 7-segments displays to indicate the percentage of speed. The frontplanes and backplanes are implemented with GPIOs, and the time base for the multiplexing is provided by the MTIM0 module.

 

 

The code was generated and compiled on CodeWarrior for Microcontrollers v10.6 and Processor Expert 10.3 for the Freescale HCS08 series of microcontrollers.

1 person found this helpful

Attachments

Outcomes