Keelan Lightfoot wrote: > > Just pondering the 150 pair cable connecting the console on my 1970's era > PBX to the main cabinet, and after a look through the schematics, I think it > would be possible to reduce this whole deal to a piece of category 5, using > a PIC. > > There are 180 12v lamps on the console, 20 spst switches, and a 3x4 key > matrix -- 180 inputs for the console and 27 outputs. > > What would be the best way to get all this data onto 1 twisted pair that > could be around 1000 feet long (What serial protocol? RS-422?), with a > reasonable refresh rate that would not miss any button presses? > > What would be the best way to control 180 outputs with a PIC, and drive 180 > 'common anode' 12v lamps? My PBX uses 3 8" x 9" boards covered with a 4x10 > grid of transistors and resistors. > > I would actually have to input 180 12v signals at the PBX end, send the data > over the serial link, then output to 180 12v lamps! > > With the 27 switches I would have to read 27 12v signals at the console end, > send the data over the serial link, then output as 12v signals to the PBX. > > The other 3 cat 5 pairs would be used for the voice link to the console. > > ----+ +---------+ > PBX |=+---------------+ +---------------+=| Console | > |=| PIC Interface |xxxxxxxxxxxxxxxxxxxxx| PIC Interface |=| | > |=+---------------+ Serial Link +---------------+=| | > ----+ +---------+ > > Which PIC would be the best for this application? > > I am thinking that I could have a PIC controlling a fistfull of shift > registers, loading them all at once then shifting the data into the PIC for > transmission. The receiving end would do the reverse. Also, what would be > the best way to convert a 12v signal to a 5v signal suitable for use as a > TTL input, with the least amount of parts? (While simulating the load of a > '51A' (Not Amps :) telephone console lamp.) > > All help is greatly appreciated, > - Keelan Lightfoot Some PBX circuits check for lamp continuity, so if it is true, you will need to simulate each lamp load, if not, just apply a resistor (from 1k to 10k Ohms) in each lamp position. If the Lamp driver at the PBX is a drain to ground, just use two resistor forming a voltage divider, lets say 6.8 kOhms (to +12V) and 4.7 kOhms (to ground), and the lamp driver goes in the middle of both resistors, by this way you will have 4.9V at that point when the driver is off (lamp off), and zero volts when lamp would be on. Use a noisy filter if necessary (cap in parallel with the 4.7k Ohms resistor). The transmission could be in any way, the shift register technique is good, but you need some check character to make sure the PIC at the console received it correctly, so I would suggest the PIC at the PBX to collect the serial data from the shift registers, and include some CRC at the end of the 23 bytes. The receiver PIC would check the CRC and if it's correct, just drive those 180 bits (23 bytes) to the shift registers (drives). You could save some money if you could move the 4x10 board (resistors and transistors) from the PBX to the Console, so your PIC and shift registers could drive that board, and the lamps. The 27 console keys would use similar fashion, Console PIC would scan the keys via shift register, send it back in 4 bytes (check character required again) to the PBX's PIC... Wagner