I wanna use one LED that indicates power (ON), and activity from MOSI by inverting that (ON) state.
Anyone with a genious circuit?
I wanna use one LED that indicates power (ON), and activity from MOSI by inverting that (ON) state.
Anyone with a genious circuit?
Why do you need a genius circuit when you can do it in software ?
If you must do it in hardware, buy a three-legged LED, which has two LEDs and a common pin. Connect one color of the LED such that it illuminates when power is present, the other can be driven from MOSI via a transistor buffer. Don't load MOSI down with the LED directly.
If I can program it, si senor. I built the USBTinyISP on a perfboard, now it's time to make a proper pcb. While at it why not have a visual when the programming takes place.
I suggested the two-color option because MOSI will be toggling extremely fast, so on the same LED it would likely be invisible. At least if you're flickering RED while powering Green, it'll possibly show as amber. Of course, two separate LEDs would be much better.
It would be sweet with one LED as it would go with the tiny in USBTiny, but your solution is simple and bulletproof as I don't know if a toggle of the MOSI pin to show POWER affects the SPI programming later.
The data toggling will likely make the LED brighter and dimmer at times, depending upon the ratio of 0 and 1 values, but should be observable most of the time. Remember to transistor-buffer the LED, don't overload MOSI. The Arduino will drive 20 mA, sure, but messing with loading the MOSI output could compromise signal quality for the other devices, and you don't want to be debugging that.
A separate LED connected to CS is perhaps a better alternativ.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.