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
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
- Fall '09
- Pulse-width modulation, Interrupt, duty cycle, rear wheel, brake pedal, rear wheel velocity