lecture-week8

lecture-week8 - 2/18/2009 Input Capture Capture the times...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
2/18/2009 1 CprE 288: Introduction to Embedded Systems 1 Zhao Zhang Spring 2009 Iowa State University Input Capture Capture the times of events Many applications in microcontroller applications: Measure rotation rate 2 – Measure rotation rate – Remote control – Sonar devices – Communications Generally, any input that can be treated as a series of events, where the precise measure of event times is important Input Capture An event is a transition of binary signal Example: How many events make up the following waveform? 3 following Input Capture An input digitalized and then times captured Example: The input is understood as 220, 221, 223 226 and 227 with initial state as high 4 223, 226, and 227 with initial state as high Application: Speedometer How to detect the speed of a treadmill? r L 2 5 Magnet sensor Microcontroller Waveform Application: Sonar Device Ping))) sensor: ultrasound distance detection device 6
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2/18/2009 2 Application: Remote Control 2 .4 m s 0 .6 1.2 m R em ot e 7 2.4m s 0.6m s 1.2m s Input Capture: Design Principle Time is important! How could a microcontroller capture the time 8 of event, assuming a clock count can be read? – Keep polling the input pin? – Use interrupt? Hint: Precise timing is needed Input Capture: Design Principle Time value (clock count) is captured first then read by the CPU TCNT 9 ICR Edge Detector Noise Canceller TCNT: Timer/Counter ICR: Input Capture Register To CPU Interrupt Input Capture: Design Principle 10 Interrupt CPU Interrupt processing CPU Foreground computation
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

lecture-week8 - 2/18/2009 Input Capture Capture the times...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online