Difference between revisions of "Microcontroller User Interfaces"
Russ hensel (talk | contribs) (→LCD) |
(fill in some details) |
||
Line 7: | Line 7: | ||
*Pro Cheap, simple, uses only 1 bit port | *Pro Cheap, simple, uses only 1 bit port | ||
*Con If you use a bunch uses a lot of port bits | *Con If you use a bunch uses a lot of port bits | ||
+ | |||
+ | === Toggle switch === | ||
=== Rotary Switch === | === Rotary Switch === | ||
Line 28: | Line 30: | ||
*Pro | *Pro | ||
*Con | *Con | ||
+ | |||
+ | === TV remote control and IR remote receiver === | ||
+ | * Pro: lots of pretty buttons, relatively low-cost -- under $2 for the IR remote receiver module, then use TV remote control you already have or a $10 remote; uses only 1 port pin | ||
+ | * Con: may be difficult to program and debug; you never know when the batteries will die. | ||
== Output == | == Output == | ||
Line 35: | Line 41: | ||
In its simplest form either on or off, slightly harder to read are various patterns of blinks. | In its simplest form either on or off, slightly harder to read are various patterns of blinks. | ||
− | *Pro | + | * Pro: easiest to program and lowest-cost user interface: from under $.10 for a tiny LED to a few dollars for a high-intensity LED. Can "read" from all the way across the room. |
− | *Con | + | * Con: only shows 1 bit of information at a time |
=== Multiple Led === | === Multiple Led === | ||
*Pro Cheap, simple, easy to drive. One port bit per led ( untill you get to large numbers where ticks kick in ) Match with a pushbutton and state of the microcontroller and means to change it is simple. | *Pro Cheap, simple, easy to drive. One port bit per led ( untill you get to large numbers where ticks kick in ) Match with a pushbutton and state of the microcontroller and means to change it is simple. | ||
− | *Con Can use more port bits than you have. | + | * Con: Can use more port bits than you have. Some LEDs may be dimmer than others. Uses more power than most other user interfaces. |
+ | |||
+ | A shift register can make driving a large number of LEDs easier. | ||
+ | |||
+ | === POV display === | ||
− | + | [[POV display]] | |
+ | * Pro: learning experience; easy to make large displays | ||
+ | * Con: uses more power than most other user interfaces; complicated and difficult to debug; can hurt you. | ||
=== 7 Segment Led === | === 7 Segment Led === | ||
− | *Pro | + | * Pro: All segments matched brightness and packaged nicely. |
− | *Con | + | * Con: difficult to display letters |
− | === LCD === | + | === character LCD === |
In the nibble mode mode needs a total of 7 port bits. Some displays are backlit, others are not. | In the nibble mode mode needs a total of 7 port bits. Some displays are backlit, others are not. | ||
− | *Pro Can have lots of characters, small displays are often 2 x 16. Cost is about 10 bucks. | + | * Pro: Can have lots of characters, small displays are often 2 x 16. Cost is about 10 bucks. Perhaps the simplest and lowest-power way to display text. |
*Con Cost is about 10 bucks. You may not have the 7 port bits available. | *Con Cost is about 10 bucks. You may not have the 7 port bits available. | ||
+ | |||
+ | === graphical LCD or OLED === | ||
+ | * Pro: | ||
+ | * Con: graphics often fill up and overflow whatever memory you have available. The person programming the system often spends huge amounts of time tweaking the graphics. | ||
=== PC on Serial Port === | === PC on Serial Port === |
Revision as of 06:02, 8 July 2009
The intent of this page is to document different styles of user interfaces for microcontrollers together with code ( any language ) to drive them. We could use some contributions, can you help?
Contents
Input
Momentary Button
- Pro Cheap, simple, uses only 1 bit port
- Con If you use a bunch uses a lot of port bits
Toggle switch
Rotary Switch
- Pro
- Con
Can be self decoding: position of switch indicates state of microcontroller.
Rotary Encoder
- Pro
- Con
Potentiometer
Use to feed a voltage to an analog to digitial converter. You sould be able to get quite a few discrete values out of this while still having it easy to use. Instead of a pot you can use a rotary switch with fixed resistors switched.
- Pro Uses only 1 pin if using an AtoD converter.
- Con Readint takes a AtoD converter ( or standard io port(s) with software. Takes a bit of time.
Keypad
- Pro
- Con
TV remote control and IR remote receiver
- Pro: lots of pretty buttons, relatively low-cost -- under $2 for the IR remote receiver module, then use TV remote control you already have or a $10 remote; uses only 1 port pin
- Con: may be difficult to program and debug; you never know when the batteries will die.
Output
Single Led
In its simplest form either on or off, slightly harder to read are various patterns of blinks.
- Pro: easiest to program and lowest-cost user interface: from under $.10 for a tiny LED to a few dollars for a high-intensity LED. Can "read" from all the way across the room.
- Con: only shows 1 bit of information at a time
Multiple Led
- Pro Cheap, simple, easy to drive. One port bit per led ( untill you get to large numbers where ticks kick in ) Match with a pushbutton and state of the microcontroller and means to change it is simple.
- Con: Can use more port bits than you have. Some LEDs may be dimmer than others. Uses more power than most other user interfaces.
A shift register can make driving a large number of LEDs easier.
POV display
- Pro: learning experience; easy to make large displays
- Con: uses more power than most other user interfaces; complicated and difficult to debug; can hurt you.
7 Segment Led
- Pro: All segments matched brightness and packaged nicely.
- Con: difficult to display letters
character LCD
In the nibble mode mode needs a total of 7 port bits. Some displays are backlit, others are not.
- Pro: Can have lots of characters, small displays are often 2 x 16. Cost is about 10 bucks. Perhaps the simplest and lowest-power way to display text.
- Con Cost is about 10 bucks. You may not have the 7 port bits available.
graphical LCD or OLED
- Pro:
- Con: graphics often fill up and overflow whatever memory you have available. The person programming the system often spends huge amounts of time tweaking the graphics.
PC on Serial Port
Control with a terminal program or a custom application. PC provides both input and output.
- Pro 2 bit only. Can have very fancy smart interface. Can be very useful for debugging.
- Con Needs PC. May need custom application. For good flexibility needs a uart on the chip.