Assign an identifier to a PCB
AdamantiumOgre
Posts: 31
I'm looking for a hardware solution to assign a unique identifier to a board. I'm a software guy learning the hardware side on my own. I'm thinking about building a software driven KVM and need to know what board I'm talking to. I may never get to that project, but this problem is weighing on my mind.
The best I can come up with is a ripple counter with some jumpers. The jumpers would dictate how far the counter would go before reset. A prop chip would control the circuit, just maybe not the prop chip on the board, so I would like to get by with as few ports as possible. I could get by with 2 for sure, one for output (to cause the ripple counter to increment) and one for input (to get the count from the counter). In this scenario, all the Q pins would have to be wired to a single prop port. I would continue to tally the number while I got high voltage from the counter. I could probably get by with a single prop port, by switching between input and output appropriately and also inserting diodes into the design to prevent voltage from washing back to the Q pins on the counter.
My main requirement is the ability to use the same hardware design and just be able to set the unique number by using jumpers.
Thoughts on the design, or more efficient suggestions are extremely welcome.
Thanks I advance
AO
The best I can come up with is a ripple counter with some jumpers. The jumpers would dictate how far the counter would go before reset. A prop chip would control the circuit, just maybe not the prop chip on the board, so I would like to get by with as few ports as possible. I could get by with 2 for sure, one for output (to cause the ripple counter to increment) and one for input (to get the count from the counter). In this scenario, all the Q pins would have to be wired to a single prop port. I would continue to tally the number while I got high voltage from the counter. I could probably get by with a single prop port, by switching between input and output appropriately and also inserting diodes into the design to prevent voltage from washing back to the Q pins on the counter.
My main requirement is the ability to use the same hardware design and just be able to set the unique number by using jumpers.
Thoughts on the design, or more efficient suggestions are extremely welcome.
Thanks I advance
AO
Comments
When we connect wired, the PC assigns a virtual com port. This works ok for a couple boards, but doesn't move eaisly between machines, as each pcu assigns the com ports whatever way.
When we use HC05/HC06 bluetooth, we can program a familliar name into the bluetooth. This works with as many devices as we can get running, and can talk to any device in the lab. Some will also talk between rooms and between floors. The bluetooth method is handy, if a board get killed or otherwise goes bad we can swap the BT and the rig's SD to a new quickstart, and be back in business. About $6 per BT module.
I like the idea of using resistors or caps. Can the prop detect more granular than High and Low (0.0) voltage? I assumed I was limited to binary in Spin.
This is a possibility. What's a good source for a $6 BT module?
Loading a program just overwrites the lower 32K.
You waste no pins and will need a eeprom anyway.
Enjoy!
Mike
EBAY search for HC05 and HC06 Bluetooth. There's the module itself, for like $4, and the carrier board for like $2, and there sthe module already mounted on the carrier board for like $8, at least the last time I bought them. The price should be lower now, look for a lot of ten or more peices. The price can be very high for a 1-off, so just get a whole pile. be sure they have the pins and module soldered to the carrier, sometimes they try to trick you.
Erco's suggestion is the simplest hardware wise, and requires only one propeller pin to ID the board. It would work by timing how long it takes for the capacitor to charge/discharge through the resistor so it could provide quite a few distinct ID,s. Some equipment I serviced used this type of circuit to determine which capacity of load cell was connected to it.
BTW, I'm assuming this is for one keyboard/video/mouse to connect to multiple PC's. How many outputs do you want?
Ahh time to discharge the cap would yield a lot of results. Got it. The only thing I don't understand is why it would only take 1 pin. If I'm hooked to the power rail, the cap would never discharge. Unless I keep the charge low and the discharges higher than the charge. Wouldn't I need one pin to charge the cap and another to meter the discharge?
Sorry for the electronics 101 lesson for me.
10 outputs would be plenty.
Connect a small capacitor from the pin to ground and a resistor from the pin and cap to VDD, presumably 3.3V on a Prop.
Step 1, make the pin and output and set low. Do this sufficiently long enough to discharge the cap to close to 0V.
Step2, Switch the pin to an input. Keep reading and incrementing a counter until it reads high. The value in the counter is proportional to the values of the resister and the capacitor.
Easy enough to do.
Duane J
http://www.maximintegrated.com/datasheet/index.mvp/id/2903 (pre-set ID)
or
http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=7046&mid=&lang=en&utm_source=MicroSolutions&utm_medium=&utm_term=&utm_content=MPD&utm_campaign=Unique+ID+EEPROM+Ad (write your own ID to the device)
Appreciate all the help.
AO