Arduino devises share pins?

Hi everyone

I’m working on a heat and furnish monitor for our house. I am having problems with too few pins on my Arduino UNO, I know I can get a bigger one but maybe there are a smarter solution. i have following device hooked up.

Arduino UNO LCD keypad ( with 6 bottoms) 4- Relays running several DS18b20 on the onewire bus. 1. MAX 6675 (measure high temperature) 1. ENC28J60 ethernet chip.

now I’m missing 1-2 digital pins. I’ve noticed that the MSX 6675 and ENC28J60 both have pins named SO, CS and SCK.

if I understood it correctly I can’t use pin 0 and 1 if I have anything serial working at the same time.

is there any of my pins that can be combined in this setup, it doesn’t seem like much I have connected, taken into consideration that I’ve seen other people make robots doing lots of stuff with an Arduino.

Are you currently using the analogue pins ? If not then they can be used as digital pins.

Hi thanks for the Anser. A0 is udes for the LCD bottoms A1-4 i use for Relay outputs = i have one avalible there.

but do you know if any of the pins can be combined?

According to the datasheet both SO and SCK can be combined. With the CS you can select which chip you want to communicate with.
Pull the CS of the MAX 6675 down and communicate with that one. Pull the other one down and the MAX high and you can communicate with the other one…

I am currently controlling 32 LEDs with three pins (I only need 2, but one is a reset line). The trick is shift registers.

Bought 4 serial-in/parallel-out registers for about a buck and a half each. They each have 8 outputs and one input. Each time you wiggle the clock, all of the outputs shift along by one and the lowest is set to your data input. Attach your relays to the outputs, and each time you send data to the thing you send all 4 bits. If you do it fast enough (and maybe put a cap across the output?) the relays wont even notice the other bits fly past.

Fun stuff, and not hard to do.

--> C-F-K sounds good, the only thing is that all comunication directly to the pins happens i Liberay. as you can hear i dont know much about programming yet, is there an example or something that i can follow? oh how to pull CS up and down manualy? Thanks a lot.

rytman: oh how to pull CS up and down manualy?


Although if the library wants to do it, then you should let the library do it.