mctrivia said...
you can always use the id object in the obex: obex.parallax.com/objects/410/
Excellent find. In reading the comments of the random number generator, established by Chip Gracey, this is actually the first time that I have seen a "truly random" random number generator.
Chip Gracey said...
This object sets up a cog's CTRA PLL to run at the main clock's frequency. It then uses a pseudo-random sequencer to modulate the PLL's target phase. The PLL responds by speeding up and slowing down in a an endless effort to lock. This results in very unpredictable frequency jitter which is fed back into the sequencer to keep the bit salad tossing. The final output is a truly-random 32-bit unbiased value that is fully updated every ~100us, with new bits rotated in every ~3us. This value can be sampled by your application whenever a random number is needed.
to boot n devices from 1 eeprom you need to do 1 of the following:
1) dedicate pins for ID
1.A) binary input requires quite a few pins(log n/log 2)
1.B) analog input using RC timing effect. With properly chosen RC components several(x) symbols can be defined and accuraetly measured reducing pin count needed( 2*log n/log x)
1.C) pwm input. through the use of a 555 timer you can provide a pwm signal that is uniqe to every device. requires only 1 pin for most smaller applications but do to tolerances of components more may be needed(log n/log x)
2) Serial Boot. For devices that do not reboot often you can use 1 address of memory as an id number. the first prop boots from eeprom and gets its id increments the number and then resets the next prop. This will cause the eeprom to wear out after about 1,000,000/n boots and will take an extremely long time to boot up for large values of n. requires only 1 pin. also id of each device will not necessarily be the same each time.
3) Broken Ring Bus. By having the first device receive a low or high on its RX at all times it can determine it is the first device. Shortly after startup each device(except first) will receive its id number from the previous increment it and then transmit it to the next. Requires only 2 pins on each device, faster then a full serial boot, and id numbers will always be the same each time.
4) Random Generated ID. If each prop needs a uniqe id but it does not need to be the same each time you can use real random object to calculate a random id. if you use an id of large enough size then no 2 props will likely have the same id. if you must have absolute sertenty of different ids serial communication technics can be used on scl,sda to check integrity of ids. I would recommend using an id at least log n/0.075 bits long. Requires no extra pins.
humanoido i wrote it a while back when I had need of unique ids. Unfotunetly obex search engine sucks and if you type in "id" you will find it a long way down a long list of results instead of at the top where a 100% match to the title should be.
Excellent! We now have numerous ID choices for varied circuit/interface/operating designs with multiple Propeller chips. Thanks much to everyone that put thought into this post. Of course, any new techniques or ideas, please continue to post.
Comments
MC,
That only works for one propeller on an eeprom, with multiples loading the same code from one eeprom, that wouldn't work.
James L
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James L
Partner/Designer
Lil Brother SMT Assembly Services
Are you addicted to technology or Micro-controllers..... then checkout the forums at Savage Circuits. Learn to build your own Gizmos!
1) dedicate pins for ID
1.A) binary input requires quite a few pins(log n/log 2)
1.B) analog input using RC timing effect. With properly chosen RC components several(x) symbols can be defined and accuraetly measured reducing pin count needed( 2*log n/log x)
1.C) pwm input. through the use of a 555 timer you can provide a pwm signal that is uniqe to every device. requires only 1 pin for most smaller applications but do to tolerances of components more may be needed(log n/log x)
2) Serial Boot. For devices that do not reboot often you can use 1 address of memory as an id number. the first prop boots from eeprom and gets its id increments the number and then resets the next prop. This will cause the eeprom to wear out after about 1,000,000/n boots and will take an extremely long time to boot up for large values of n. requires only 1 pin. also id of each device will not necessarily be the same each time.
3) Broken Ring Bus. By having the first device receive a low or high on its RX at all times it can determine it is the first device. Shortly after startup each device(except first) will receive its id number from the previous increment it and then transmit it to the next. Requires only 2 pins on each device, faster then a full serial boot, and id numbers will always be the same each time.
4) Random Generated ID. If each prop needs a uniqe id but it does not need to be the same each time you can use real random object to calculate a random id. if you use an id of large enough size then no 2 props will likely have the same id. if you must have absolute sertenty of different ids serial communication technics can be used on scl,sda to check integrity of ids. I would recommend using an id at least log n/0.075 bits long. Requires no extra pins.
did I miss any?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder.
HOW TO GET THE SERIAL NUMBER (AND MORE) FROM AN FTDI CHIP
http://forums.parallax.com/showthread.php?p=863510