Electronic – Serial Communication over 1 Pin

cmicrocontrollerpicserialspi

Okay guys, I'm in a bit of a pickle here. I have the following circuit:

Schematic

As you can see, pin 3 is my only output. I've actually already had this board printed, so there's not much room for modification. I'm taking a reading from an analog pressure sensor, doing an A/D conversion and then I want to send that value to an Arduino. Is there ANY way I can send this over just pin 3? If so, how? If not, can someone give me a quick SPI or Bit Bang code example? I'm using a PIC12F675.

Edit: Here's a link to the full size image.

Best Answer

I am not a PIC person, but normally for serial standard you need three lines:

  • Send (TX)
  • Receive (RX)
  • Ground (GND)

Since you dont need RX, you could use the circuit ground and use pin 3 for TX, if your Arduino and your PIC agree on the baud rate, and other parameters related to serial comms (stop bits, parity bits, etc). This in theory could be standard serial comms if you can get your PIC to do it.

SPI is not going to be possible, since SPI requires an independent clock line.

Another thing to consider would be Dallas 1-wire protocol, however, in practice it will be tougher to implement than either real or hacked serial.