Shop OBEX P1 Docs P2 Docs Learn Events
auto-configuring attached hardware... — Parallax Forums

auto-configuring attached hardware...

bcw1011bcw1011 Posts: 8
edited 2006-11-14 16:13 in BASIC Stamp
I plan on building controller that, when powered up will do a 5-4-3-2-1 count on a large 7 segment display.· this is going to be used as a start light for a rc car race.· but in the long run the display will have several types to mimmic different styles of racing.· I'm using a basic stamp as the brains.· the display is to be housed in a seperate remote enclosure, using a 9 pin cable to connect it to a controller.· so to keep operator ease at mind i want to have the display "auto configure" using a minimum of components.· I also want the stamp to be able to tell if the display has power or not.·in addition this needs to be fairly reliable too

my thoughts were to use 2 pins as inputs one would read resistance (with a certain value resistor assigned to each display) and using a LOOKDOWN commmand would be albe to tell what type of display it was.· and a second pin as digital "fault"· ex.· high indicates ok, low lindicates a problem.··

this sound like a good plan, or is there a better way to go about this?

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-11-12 07:38
    Have you considered using individual pushbuttons or switches for the different styles?

    Button1 = 5 count
    Button2 = 10 count
    Button3 = Timeclock
    etc...

    For the button pushers, you could print up & laminate a quick reference card.
  • ZootZoot Posts: 2,227
    edited 2006-11-12 08:41
    You could also think about a few more pins on your connector -- say 3 pins for the countdown mode for that display. In the display itself tie those 3 pins to either Vdd or Vss. The connector to your stamp can check those three pins:

    000 = NO POWER
    001 = 5 count
    010 = 10 count
    011 = TimeClock
    etc...

    That might be easier than using resistance which could vary.

    If you've got all zeros on the three "display mode/status" pins, then you know you've got no power in the display.

    The pin scenario presumes you've actually got *different* displays -- it's unclear from your post if you are talking about different displays that, by the very act of plugging them into your controller, configure themselves and report power status.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-11-12 10:09
    bcw1011 -

    By using a hex rotary switch (see attached) you can get 16 unique codes from·4·data lines·connected to your various displays. In addition, there will be no response if nothing is connected.

    Regards,

    Bruce Bates
  • bcw1011bcw1011 Posts: 8
    edited 2006-11-12 10:41
    Zoot said...
    You could also think about a few more pins on your connector -- say 3 pins for the countdown mode for that display. In the display itself tie those 3 pins to either Vdd or Vss. The connector to your stamp can check those three pins:

    000 = NO POWER
    001 = 5 count
    010 = 10 count
    011 = TimeClock
    etc...

    That might be easier than using resistance which could vary.

    If you've got all zeros on the three "display mode/status" pins, then you know you've got no power in the display.

    The pin scenario presumes you've actually got *different* displays -- it's unclear from your post if you are talking about different displays that, by the very act of plugging them into your controller, configure themselves and report power status.

    that is basically what I'm working with right now for the prototype, i'm just using 2 wires instead of 3... right now only one type of display exists (its basically a large 7 seg. display with out the DP)· each display has a red & green light for a "go" "no-go" type of signal, the other 2 that are planed is one that uses a servo as a "clock" and another that has a 6 segment bar that builds up...signalling the start.· you understood correctly that I want the displays setup so that the controller will know which one is plugged in by whatever method it is
    I originally liked the idea of using resistance to detect the display but it looks like there are some better methods out.

    thanks for the advice!
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-11-12 11:20
    How many different displays do you anticipate using?
  • bcw1011bcw1011 Posts: 8
    edited 2006-11-13 00:39
    1 for now....and most likely 3 total in the near future
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-11-13 10:49
    You could consider something like adding some form of serialized ID chip to the display interface. Then when you plug in the connector, the Stamp could read the ID, and run the appropriate subroutines.

    Another option, since you only have a few displays, would be to build a seperate controller for each display. If you use something like an SX protoboard, it wouldn't be too expensive. The SX boards are $10, and you could get a programmer (without debug) for $30, or (with debug) $50. You could build the controller standalone, or interface it with the BS2, and use the BS2 for choosing the display.
  • bcw1011bcw1011 Posts: 8
    edited 2006-11-14 06:46
    I wound up makeing a code that would flash individual segments as a chase effect prior to a countdown, by doing this I couldnt use a standard BCD Decoder. I've never done any work with a serial display controller, if I could find one that can control each of the seven segments seperately with some sort of ID that would be awesome, I wouldnt have a clue on where to look for this, other than to use another stamp or PIC
  • bubbleheadbubblehead Posts: 36
    edited 2006-11-14 16:13
    Set up an RC circuit, such that one of the components--either the resistor or capacitor is different for each board. Then use the RCTIME command to distinguish the boards.

    Post Edited (bubblehead) : 11/14/2006 4:42:58 PM GMT
Sign In or Register to comment.