Hi Shahid, I aggree, best price unless you use a different ROM code for each micro. Check out the Dallas touch ID range for other methods (can be duplicated on PIC) Also, some dallas products can act as addressable switches on a one wire bus. Shahid Sheikh wrote: > > Greetings everyone, > > I'm working on a hobby project using a 12C508 to turn on and off the lights > on a model train locomotive. The locomotive has an ID ( 1 ~ 80 ) on the > track. The decoder circuit based around the 12C508 needs to have ID > selection switches by which I can assign the decoder an ID. > > I can use a bigger chip and waste 4 pins just to hardwire the ID with DIP > switches or jumpers which seems a waste for such trivial thing. I was > looking at the AN512 Ohmmeter/Temperature sensor application note where I > could use a variable resistor to select the ID or the other thought was to > have a simple flasher circuit to clock the T0CK pin and then read the TMR0 > register after a fixed amount of time to get the locomotives ID. Have a > variable to vary the pulsing rate of the flasher circuit. > > Am I wasting my time with the 12C508 chip here and should just use a 16F84? > Does anyone know when the 12CE518 chip would be available? With that (and > also with the 16F84) I could write a routine to actually program and store > the decoders ID in the EEPROM by using a key sequence on the central > control unit. > > I've got a few 12C508 around right now but I dont have any 16x84's which is > why I was just trying to use the 12C508 chip. If anyone has any ideas on > implementing a way to assign the 12C508 chip an ID (1 ~ 80) through > external circuitry which the chip can pick up during its program > initialization stage, I would like to hear it. > > Thanks! > > Shahid