Why not use a PIC12CE518? You can put the ID in eeprom using a one switch procedure. Leo van Loon SBB simpeltronics Netherlands tel +31 (0481) 450034 fax+31 (0481) 450051 mail sbb.simpeltron@tip.nl url http://www.sbb-simpeltronics.nl SBB simpeltronics ontwikkelt technische projecten voor basisschool en basisvorming. SBB simpeltronics develops technical projects for children in primary and secondary education. -----Oorspronkelijk bericht----- Van: Shahid Sheikh Aan: PICLIST@MITVMA.MIT.EDU Datum: zondag 28 juni 1998 7:20 Onderwerp: Assisgning an ID to a PIC using as few input pins as possible >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 > >