PDA

View Full Version : auto-configuring attached hardware...



bcw1011
11-12-2006, 02:46 PM
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?

Kevin Wood
11-12-2006, 03:38 PM
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.

Zoot
11-12-2006, 04:41 PM
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 Bates
11-12-2006, 06:09 PM
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

bcw1011
11-12-2006, 06:41 PM
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 Wood
11-12-2006, 07:20 PM
How many different displays do you anticipate using?

bcw1011
11-13-2006, 08:39 AM
1 for now....and most likely 3 total in the near future

Kevin Wood
11-13-2006, 06:49 PM
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.

bcw1011
11-14-2006, 02:46 PM
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

bubblehead
11-15-2006, 12:13 AM
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