Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Hybrid I/O: Understanding Pulse Generation, PWM, and Magnetic Fields for Microcontrollers, Slides of Microcontrollers

An in-depth exploration of hybrid i/o signals, focusing on pulse generation, pulse-width modulation (pwm), and pulse-width measurement. Learn about their applications in sensors, motors, and general control, as well as the relationship between magnetic fields, electric currents, and force.

Typology: Slides

2012/2013

Uploaded on 04/24/2013

ballari
ballari 🇮🇳

4.6

(9)

122 documents

1 / 22

Toggle sidebar

Related documents


Partial preview of the text

Download Hybrid I/O: Understanding Pulse Generation, PWM, and Magnetic Fields for Microcontrollers and more Slides Microcontrollers in PDF only on Docsity! Hybrid I/O – Pulses Docsity.com Digital or Analog? 0 V +5 V It depends on how data is encoded. Docsity.com Magnetic Fields Direction of Field: North > South Docsity.com Right Hand Rule Electric Currents > Magnetism! | / jf () Docsity.com Right Hand Rule Electric Currents > Magnetism! Magnetic field Docsity.com Stepper Motor off off f on mes a a + ott Docsity.com 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” Docsity.com F o rc e Right Hand Rule # 2 Electric Currents & Magnetism  Force Docsity.com Diagram of a Simple DC Motor Armature Brushes — 7 Voltage source ® Docsity.com Commutator Lead wires to armature coil Commutator Docsity.com 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?!? Docsity.com 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 Docsity.com 16-bit Counter Bus 22 (€B22) ‘channel and WO Pins: 34 Pins yo” Moasin | Double Action moat L 5; MHCSM2z " SxDASM woaig Ff erkdue Courter MOASMIS: {| Double Action ql MOASRET 1€-Blt Counter Busé =~ Double dation (cBsy 7 ' SXDASM moe iL MNCSME OASIS moat ic Modulus Courter >| Double diction MPWMEMD PAM Comer : 4xPWMSM lech - : MPWMEM] i PWM Modular /O Bus (MIOB) MPWEES (To all Submadules) PAM { 4KPWMSM : en fer] ~ PAM MoPsM Bus Interises | Interrupt Unt Submedule | Submeddes le wacaz T MprosMa2 : : 18-bit Port 1D. J : MPIOI2EAS MBS Clock IMB3 (Favs) Docsity.com MDASM Modes • Disable mode • Pulse width measurement • Period measurement • Input capture mode • Single pulse generation • Continuous pulse generation Docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved