squeezing out the last of the pins ..

I am making a remote control with 8 bcd switches, and 4 pushbuttons. ( using a 328 chip programmed on an Arduino board, but plugged into an embedded board )
I do have a spare pcb that can handle 18 bcd switches and has lots of spare pins, but it is not practical for the enclosure I am using. ( it has 4017 chips to expand the inputs )

I have made some small bareboard pcbs that I can use, but I have used 17 pins already for the switches.

I want to use the Easytransfer library, which runs on the NewSoftSerial, which I think needs both a Tx and Rx pin declared?

Can I define the TX pin as 4, and the hardwire serial RXD pin ( pin 2 ) as the RX pin for the NSS ? I wont be using the RX pin.

NSS can use any pins so I think using pin 2 is OK with the usual caveats about it also being connected to the FTDI chip through a 1k resistor.

If you are using hardware serial to transmit then there may be clash with the Serial library. I would think in this case you would see bogus bytes if you ever do a Serial.read().

So for that matter why not just use the hardware Rx, different bit rates to Tx?


Rob

Is there any way you can add a few extra IC's. You can read 8 BCD switches with just 6 or 7 pins.

Mark

Is there any way you can add a few extra IC's. You can read 8 BCD switches with just 6 or 7 pins.

The other pcb I have spare uses just 6 pins to read 16 switches ( or any multiples of 8 switches ) but I dont want to waste it on a project with just 8 switches, as it looks like I will need that pcb for another project next week.

I will only be transmitting from the remote, so I will not even connect anything to the transceivers TX pin, I was just wondering what rules there are about mixing hardware and software serial pins when declaring the pins.

I suppose I can have a look at the easytransfer library, and see if it will work with Serail.print instead of using NSS ? Its basically just 11 bytes I want to transmit.

I have tested the transceiver just using Serial.print and it works, but I really like the checks that easytransfer uses.

OK,

NewSoftSerial mySerial(0, 15);

works fine, problem solved , I am not actually connecting anything to the RXD pin, and coms are fine with the IDE for programming.