LEDs
- Blinkenlights make life better
- Original Rott-bot had just three LEDs (Rx alive, X centered, Y centered)
- LEDs driven directly (with current-limiting resistor) from PIC pins
- Rott-bot 2000 retained those LEDs, plus:
- "Bar graphs" to show speed (four per wheel)
- Bi-color LEDs, green for forward, red for backward
- Added "heartbeat" LED as well
- And a few more in case I thought of something else
- Twenty-four LEDs in all -- not enough pins on the PIC.
- Solution: shift registers
- 74HC164 has two inputs (data and clock) and eight outputs
- Three of these chips:
- their outputs wired to LEDs
- their clock inputs wired to a PIC pin
- the data input of the first '164 wired to another PIC pin
- the data input of shift register #n hooked up to O7 of #n-1
- Twenty four bits clocked out, the LEDs show their states
- Improvement: transistor on ground path
- Turn off LEDs while data being clocked in
- Or if I'm worried about wasting power
This page works best with Lynx.
mail me
or go home.