Go Down

Topic: running out of pins (Read 649 times) previous topic - next topic

mcreefer

I have an uno and this shield
http://www.dfrobot.com/wiki/index.php/Arduino_LCD_KeyPad_Shield_(SKU:_DFR0009)

And I need to dim 5 LEDs with MOSFETs via PWM. Am I stuck with using 2 arduinos or is there another way around this?

Grumpy_Mike

A link to a page with actual content would help.
You can use alternat pins for you key pad and that will free up the five out of six PWM pins you need for your LED dimming.
Alternately use a shiftbregistervto give you more pins and use shiftPwm libary to control them.

BillHo

The LCD keypad shield used
* LCD RS (Data or Signal Display Selection) pin to digital pin 8
* LCD Enable pin to digital pin 9
* LCD D4 pin to digital pin 4
* LCD D5 pin to digital pin 5
* LCD D6 pin to digital pin 6
* LCD D7 pin to digital pin 7
* Backlit Control to Digital pin 10
* Button (select, up, right, down and left) to Analog pin 0
You left with Digital 2,3,11,12,13 and Analog pin 1 to 5
You can use this TLC5940 for your LED

Grumpy_Mike

Quote
You left with Digital 2,3,11,12,13 and Analog pin 1 to 5

So that is 11 digital I/O. Re assign these to the shield and use the PWM for the LEDs.
No need for any other chips.

Drew Davis

Could you get an Arduino with with more pins... like the Mega?

mcreefer


A link to a page with actual content would help.
You can use alternat pins for you key pad and that will free up the five out of six PWM pins you need for your LED dimming.
Alternately use a shiftbregistervto give you more pins and use shiftPwm libary to control them.

For some reason the last ) is left out of the link.

I'll read more on this method since I'm stuck using an UNO and no expansion boards.

Go Up