??? 01/15/07 02:50 Modified: 01/15/07 02:59 Read: times |
#130803 - Modifications Responding to: ???'s previous message |
In this schematic remove R3. Reverse the polarity of all LEDs, so that not the cathodes are connected to each other but the anodes. Connect this point (the anodes) to Vcc, not GND. Then, each LED turns-on, when the according Port0 line goes low. You can the LEDs only turn-on in this way, because the micro can sink the needed LED current, but not source! Increase R1 and R2 to 10k. Hazman, the pull-up is only needed, when you want to fabricate logic high state to the input of a following gate. Then, the pull-up is needed to generate high level, when the internal output nFET is turned-off. But, when you want to turn-on a LED, such a pull-up isn't needed at all. You confuse the things if you think, that the pull-up is needed to make the port0 line to work as output, or what so ever. Just think, that the output consists of a single nFET and think about what you have to connect externally to make it work as you intend. That's all. No magic. So, please remove R1 in the following schematic. ![]() Kai |