How to say which board was the first to detect a transition

Discussion in 'Embedded Systems and Microcontrollers' started by atferrari, Aug 23, 2007.

  1. atferrari

    Thread Starter AAC Fanatic!

    Jan 6, 2004
    PIC micro 16F family.

    There are four boards, each one detecting the high to low transition in the eight pins of PORTB from the micro in charge, with weak pull ups enabled..

    Depending of which board detects a change first, the rest should react differently to further changes in their "own" pins.

    My question is: How could I make any of the boards to tell the others "I got a change in one of my pins", so the rest knows that they are not the first anymore in detecting a change?

    I started to consider something like a common point for all boards, linking their open drain RA4 pins. What I can not see is how could I use that pin also for polling any change or signaling "mine was first" from the other boards.

    Or should I use a second pin in every micro for the polling?.

    My last point is: would all this change if I do it with three instead of four boards? A resistor, common to all of them or "distributed" should change value accordingly, I think.

    To be honest I couldn't progress much in solving this. Help appreciated.
  2. n9352527

    AAC Fanatic!

    Oct 14, 2005
    How about, like your idea, a common node which is pulled up with a resistor to Vcc and connected to one pin (configured as an input, high impedance) on each board. When a board detect a high to low transition, it then pull the common node down. All the other boards have to do is to check this common node after detecting a high to low transition and act accordingly.

    Of course, there is a minimum time between the H to L where the boards will detect the difference. If this time is less than the time needed to pull the common node down and the other boards to read the node, then this would not work.
  3. nanovate

    Distinguished Member

    May 7, 2007
    You can use a "interrupt on change" configuration.

    How fast is your system?