SP.711: Monday, Day 3

Today in class you will use the fancy LMD18200 motor driver chip.
The advantage of this chip over the transistor you used Thursday is
 that it will allow you to drive motors in either direction, and
 provides extra features like current sensing, an electric brake,
 a warning if it gets to hot, and the ability to handle high 
  voltage (up to 55V), moderately high current (up to 3A) motors.

1) Using the high-current 12V computer power supplies we bought,
    (see separate sheet on how to hook them up: we have some
     10 ohm high-power resistors you can hook from 12V to ground)
   your PIC-and-LMD18200 circuit,
   and a provided small motor,
   control the speed and direction of a motor from your PIC.

   Note: if you want to use a PWM frequency > 1 kHz, you will
    need to add 100 nF "bootstrap capacitors" (these are small
    round disks that say "103" on them) in the places shown
    on the LMD18200 data sheet... if you have problems, try
    running your PWM at 1.25 kHz to start with (see Thursday's
    handout for details on the SETUP_TIMER_2 statement)

   A suggested "user interface": if the potentiometer is in the
    "middle position", speed should be zero. If the pot is
    all the way to one side, you should have max. speed in
    one direction, if the pot is all the way to the other
    side, you should have max speed in the other direction.

2) Repeat (1), but using the motor in your linear motion stage
   (be ready to shut off the 12V power supply if something goes
    wrong and the motorized carraige rams into the end of the
    linear stage, don't leave the motor on and pushing against
    one of the end stops)

3) Experiment with both ways of hooking up PWM on the LMD18200:
   using both the PWM and Direction pins, or only using one
   of them (see the datasheet for details)