Connecting Picaxes via I/O pins

mholguin

New Member
I'm thinking sharing simple logic between 2 (or more) picaxes , where several act as "sensors" communicating discrete events to a central (master?) Picaxe.

I'm thinking on simply connecting an outpin from one of the "sensors" to an input pin of the "master" and signaling events by simply pulling high or low the output pin.

I imagine I should pull down those connections with a relatively small resistors.

Am I reinventing the wheel here? Is it feasible?

Marino
 

Dippy

Moderator
Your 'master' PICAXE can easily detect high/low logic from another PICAXE o/p.
As an input pin high/low is basically considered as a variable 1/0 then you can use IFs and other things in your code to check the status of an input pin.
You can even use interrupts/masks where appropriate.

This is assuming your sensors are simply outputting logic low and not data.

Strictly speaking you don't need any resistors, but as you seem new to this then a small resistor between O/p pin and master input pin might save embarrassment.

PS. Logic between chips has been going on for about 10,000 years so don't worry :)
 

moxhamj

New Member
You could use 100k pulldowns. And yes, you can communicate using two pins. If you want to send simple on/off, then it will work fine. You can send analog values as well if you use a low pass filter - eg 10k/0.1uF -and pwmout and readadc in.

You can use serin and serout, though there is a huge limitation with serin as it hangs the picaxe forever till it gets the data.

Or you can write your own custom slow serial code which reads in highs and lows - slower than serin/serout but no "hangs" and you can poll many chips in parallel at the same time.

It depends on how fast you need the comms to be, how much data you are sending and how accurate the data needs to be.
 

mholguin

New Member
Thanks Dippy and Dr. Acula!!

Currently I can get away with passing highs and low from one picaxe to the other.

Let's wait for the more complicated stuff to come up!

Marino
 

manuka

Senior Member
Yikes - time flies- that was 5 years back! A similar PICAXE party trick involves passing data thru' a chain of kids holding hands,with adult "terminals" at each end to help promote electrical safety. Smart 10yo's. LOVE this - "how does it know?" questions abounding.
 
Top