8 LED and MC9S08QG8?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

8 LED and MC9S08QG8?

1,219 Views
cmg
Contributor I
Hello community, I have a question with respect to, directly connect eight LEDs to PORTB of a MC9S08QG8, basically my question is, is it possible to connect without driver involved, ie MCU> resistencisa> led `s.

Thank you.

En eapañol:

Hola comunidad , tengo una duda con respecto de, conectar directamente 8 led's al portB de un MC9S08QG8,  mi duda es basicamente, se es posible conectarlos sin driver de por medio ,  es decir MCU>resistencisa>led`s.

 

 

Gracias.

 

 

Labels (1)
0 Kudos
Reply
4 Replies

907 Views
iansmusical
Contributor V

Hi Cristian,

It's possible to connect 8 LEDs to port B, providing that all the pins on port B can be set as output and one doesn't exceed the maximum pin/port or package sink/source current. Obviously one would need current limiting resistors on each LED. I'd imagine about 5mA per LED is achievable. If say 20mA was required that one would need to use a transistor/mosfet driver etc.

Thanks,

Ian

907 Views
cmg
Contributor I
Hi Ian, grcias respond.
I'm dend the first steps in C and Freescale, along with a friend, and we will present this doubt, I provided a driver, ULN2803, which mei friend did not have and was to buy, but as we're just practicing, I found it not was need to buy it, but from your response, he informs you buy or 8 transistors or driver like that name more above any other, to make an interface between the microcontroller and the led, and thus no risk damage the micro.

Regards and thanks,

0 Kudos
Reply

907 Views
iansmusical
Contributor V

Hi Cristian,

Forgive me but I may not have fully understood your response. I understand that you and your friend are in the first steps of C programming and with Freescale devices. You have found that a ULN2803 device contains 8 darlington transistors and thus you could drive 8 LEDs from it. It's a very popular device but would be perhaps too slow if you are planning to use PWM with the LEDs.

The alternative method as your friend suggests is to simply use one NPN transistor with its respective base and current limiting resistor per LED.

You equally won't damage the micro should you directly connect the LEDs to it but you MUST ensure that you don't exceed the devices maximum current or the ports maximum current.

Hope this helps. Please ask if not! :-)

Thanks,

Ian

907 Views
cmg
Contributor I
Hi Ian, if my English is bad, I helped with the translator of google.
We are beginning with C, and Freescale is a real challenge, so the amount does not matter if we use transistors or driver, I use the driver ULN2803 because had it but could have used transistors, it is important that as you say not connect the 8 LED, directly to pueto form.

Thanks for answering, greetings from Argentina.

0 Kudos
Reply