Published:2009/7/12 21:03:00 Author:May | From:SeekIC
Decoding RS-232 signais is a job for a microcontroller (single-chip computer). Fortunately, you don't have to program the microcontroller yourself; you can get a PIC 16C54A microcontroller already programmed for exactly this job from Stone Mountain Instruments. Shown is the circuit and the BASIC program to demonstrate how it works. Each SMI101B has eight logic-level outputs.Further, you can connect up to seven SMI101Bs to a single serial port. The three N pins give each SMI101B a distinctive identifying number, from 0 to 6. If all three are grounded, the identifier is 0; if N1 is connected to +5 V, the identifier is 1, etc. At power-up, all the data outputs are off (logic 0). To turn an output on, send a command of the form xNy, where x is the identifier of the SMI101B and y indicates which data output you want to switch, To turn the outputs back off, use an F in place of an N (e.g., OF3). All communication is done with 8 data bits and no parity bits. The baud rate is 9600 baud with a 4-MHz crystal, or 1200 baud with a 500-kHz ceramic resonator. As shown in the diagram, each relay requires a transistor to drive it, along with a resistor and a protective diode. To cut down the total number of components, you can use a relay driver chip, such as the Allegro UDN2987, which contains everything necessary to drive eight small relays from logic-level signals.
Reprinted Url Of This Article:
http://www.seekic.com/circuit_diagram/Control_Circuit/COMPUTER_SERIAL_PORT_RELAY_CONTROLLER.html
Print this Page | Comments | Reading(3)
Code: