Use timer to set period for counting when timer

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: pts, read GPIO pin counter velocity = counter ∗ “known distance per click” / “judiciously chosen period” Reset counter Pulse accumulator function Sometimes we need more . . . Options Common function Some microcontrollers have this in a single peripheral device Basically a counter controlled by an outside signal Get a microcontroller with a different mix of I/O Get a microcontroller with expansion capability Signal might enable counter to count at rate of internal clock – to measure time Signal might be the counter’s clock – to measure pulses Parallel memory bus (address and data) exposed to the outside world Serial communication to the outside world ATmega16 has external clock source for timer/counter * . 0 , # The are never enough I/O ports Techniques for creating more ports If signals all in same direction and have a separate guard signal, then able to share without glue logic Example: connect 5 LCD displays to microcontroller port sharing with simple glue logic decoders/multiplexors memory-mapped I/O port expansion units can share connections to RS, RW, and DB but not E changes on E affect display – must guarantee only one is active Direction of ports is important single direction port easier to implement timing important for bidirectional ports 6 ! solution is to insert intervening registers tha...
View Full Document

This document was uploaded on 04/04/2014.

Ask a homework question - tutors are online