Oops,
Forgot to mention, the output RA4 Open Drain pin on a PIC16F628A already is implemented to do the 'invert' of the logic, so operates in TRUE logic.
The only thing to be aware of here, is that when the PIC first fire's up, (and especially if you are using the Start Up Delay), the output is ON until the first initialisation / drive to PORTA, hence you do get a 'blip' on the output from a HIGH to a LOW.
Not a problem on LEDS etc, but may be a problem if driving into other logic.
Then turn all your LEDs around.
Thinking about it, your method is quite ingenious and makes the logic simpler. A high output always turning the LED on even though RA4 is OC. Clever.
It's a standard technique, and has been used for many decades, long before micro-controllers or LED's
Are you saying that people shorted out incandescent bulbs to turn them off?
It's a standard technique, and has been used for many decades, long before micro-controllers or LED's
Nigel Goodwin said:No
But shorted out all sorts of things in electronics, an obvious example being shorting the input to a transistor out to turn it off - but there have been many such uses over many years.
For a pretty identical example check the bottom of my page at
Cybot Motor Driver Board
Cheers All,
As Nigel indicated, I have been doing this for years with Micros especialy using transistors/switches to discharge capacitors on Micro Reset circuits before we had WDT chips available.
Thanks for all your posts ....
Roy
.The only thing to be aware of here, is that when the PIC first fire's up, (and especially if you are using the Start Up Delay), the output is ON until the first initialisation / drive to PORTA, hence you do get a 'blip' on the output from a HIGH to a LOW.
What does it mean?"Not a problem on LEDS etc, but may be a problem if driving into other logic."
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?