Yes, the four states can be obtaind with only one pin. Very nice!
Now, if you use the red-green LED that I mentioned above a cool project can be made.
http://futurlec.com/LED/LED3RG.shtml
Since red + green = yellow, then with only one pin in the MCU we can obtain four different states in the LED: off, red, green, or yellow. Also, by varying the percentage duty cycle of the square wave different shades of yellow can be obtained. I haven't tried this yet but it might be a cool project.
Robert






Bookmarks