Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: galannthegreat on December 01, 2009, 02:41:18 PM

Title: Data Processing LED's
Post by: galannthegreat on December 01, 2009, 02:41:18 PM
Can I tap into MISO and MOSI on an AVR for data processing LED's? I just need confirmation on if those are the places to see what's going on.
Title: Re: Data Processing LED's
Post by: SmAsH on December 01, 2009, 02:56:45 PM
Yup, do you mean straight on the line with an led or using a transistor?
Title: Re: Data Processing LED's
Post by: galannthegreat on December 01, 2009, 02:57:51 PM
Not inline, but in parallel with. Or should I just put it inline?
Title: Re: Data Processing LED's
Post by: SmAsH on December 01, 2009, 03:06:07 PM
yeah, i know what you mean but are you going to use a transistor or just an led?
Title: Re: Data Processing LED's
Post by: galannthegreat on December 01, 2009, 03:13:07 PM
LED with a current limiting resistor, if needed.

Another question, which side is 5V on MOSI and MISO and which side is 0V? (ie. anode to controller or anode to programmer side)
Title: Re: Data Processing LED's
Post by: chelmi on December 01, 2009, 03:36:14 PM
 :o What the hell are you trying to do here? :D

MOSI and MISO are SPI (Serial Peripheral Interface). If you just want to switch a led on and off, any GPIO will do.

Chelmi.


Title: Re: Data Processing LED's
Post by: galannthegreat on December 01, 2009, 03:40:47 PM
I am trying to put LED's in my circuit to show data processing, more simply put, when my programmer is programming the chip I want the LED's to light when data is being transfered to the chip. Flicker, stay on, whatever is happening, I want to see it.
Title: Re: Data Processing LED's
Post by: chelmi on December 01, 2009, 03:48:20 PM
Woops, sorry I really didn't mean to be rude! English is not my first language and it's sometimes hard to communicate the right expression...
I re-read your first message and it's clearer now. What confused me was the data processing part. There is no data processing, only data transfer.

When programming a device, I think that the programmer is the Master and the device the slave.
MOSI is Master Out/Slave In. Since programming is essentially sending data from the programmer to the slave, this is the pin your are interested in.
Check the datasheet to be sure.

And regarding the "tapping",  I don't see why you couldn't but I might be wrong...
Title: Re: Data Processing LED's
Post by: galannthegreat on December 01, 2009, 04:02:21 PM
No worries there. So, just anode to MOSI for one LED and the other LED's anode to MISO with current limiting resistor then to ground?
Title: Re: Data Processing LED's
Post by: SmAsH on December 01, 2009, 11:39:58 PM
Yep, both leds should have their own resistor though.
Title: Re: Data Processing LED's
Post by: galannthegreat on December 02, 2009, 11:47:58 AM
Perfect, that's what I assumed, just wanted to be %100 sure. Thanks.