1 / 22

Hybrid I/O – Pulses

Hybrid I/O – Pulses. Digital or Analog?. +5 V. 0 V. It depends on how data is encoded . Analog Signals that Look Awfully Digital…. Pulse Generation Pulse-Width Modulation (PWM) Pulse-Width Measurement (PWM) Event counting Period Measurement Input capture Output compare

llewellyn
Download Presentation

Hybrid I/O – Pulses

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hybrid I/O – Pulses

  2. Digital or Analog? +5 V 0 V It depends on how data is encoded.

  3. Analog Signals that Look Awfully Digital… • Pulse Generation • Pulse-Width Modulation (PWM) • Pulse-Width Measurement (PWM) • Event counting • Period Measurement • Input capture • Output compare For a microcontroller – all involve creative use of clocks and counters

  4. Applications of These Signals Applications: • Pulse Generation (sensors, motors, general control) • Pulse-Width Modulation (PWM) (DC Motors) • Pulse-Width Measurement (PWM) (sensors) • Event counting • Period Measurement (frequency measurement/modulation) • Input capture (pattern recognition) • Output compare (timed patterns)

  5. Magnetic Fields Direction of Field: North  South

  6. Right Hand Rule Electric Currents  Magnetism!

  7. Right Hand Rule Electric Currents  Magnetism!

  8. Electromagnet North/South Pole?

  9. Stepper Motor

  10. Stepper Motor

  11. Stepper Manipulation • Controlling a stepper involves turning these electromagnets on and off • This must be done in order to create rotation. • i.e. can’t go from top one high to bottom one high • Microcontroller will want to set up its outputs to go through these steps in order by generating pulses on multiple pins • Number of steps (resolution) can actually be doubled with creative pulsing • i.e. top and right on give you a position going “NE”

  12. Right Hand Rule # 2 Electric Currents & Magnetism  Force Force Current Magnetic Field

  13. Force in a Conductor

  14. Force in a Conductor

  15. Diagram of a Simple DC Motor

  16. Commutator

  17. DC Motor Velocity • The velocity of the motor is (roughly) proportional to the force exerted • The power of the force acting on the motor is directly proportional to the magnetic field that is causing the force • The magnetic field intensity is directly proportional to the current that creates it (from running through the wires) • The current is directly proportional to the Voltage across the lines (V = IR) Therefore: The speed of the motor is directly proportional to the Voltage How do I output a voltage?!?

  18. Pulse Width Modulation (PWM) Effective Voltage = Duty Cycle x Supply Voltage

  19. Single Pulse Applications • Sensors: • Ultrasonic range-finders require a pulse to start ranging, and report results based on a pulse length • Servo Motors: • Pulse width describes position

  20. Generating Pulsed I/O on the MPC555 • “Obvious” answer is to use straight GPIO (digital I/O), like the port we used in the QADC, then use the PIT to do timings • While possible, to do a continuous pulse we have to interrupt the processor every ½ period! • Timing is also slightly less accurate (going to an ISR takes time) • The MPC555 has a “MIOS” unit (Modular Input/Output System) • Combines counters and clocks to generate a wide range of pulse widths and periods. • Does so without the need for interrupts

  21. MDASM Modes • Disable mode • Pulse width measurement • Period measurement • Input capture mode • Single pulse generation • Continuous pulse generation

More Related