B&B Electronics 232DRIO manual Board Layout Opto-isolated Input

Page 17

This chapter will explain "HIGH" and "LOW" states and show some general examples of how to interface to the I/O lines. Caution must be taken not to exceed 232DRIO specifications listed in Chapter 1 when interfacing to external devices. Failure to stay within these specifications could result in damage to the unit and will void warranty.

Figure 4.1 – Board Layout

Opto-isolated Input

As stated earlier, the opto-isolated input line is CMOS/TTL compatible and can also handle voltages from 0 to +30 Vdc or Vac.

The isolated input is used to sense a HIGH or a LOW state. This can be accomplished via switch closures, contact closures, or a solid state digital signal. When this input senses a voltage level +5Vdc/Vac or above, it will be considered "LOW" and its input state will be read as a "0" to the PIC® microcontroller. Conversely, when an input senses a voltage level below +1.50Vdc/Vac, it will be considered "HIGH" and its input state will be read as a "1" to the PIC microcontroller. Correspondingly, the PIC will then evaluate the incoming input and declare it as a “HIGH” if it is a “0” (at least +5V) and as a “LOW” if it is a “1” (less than +1.5V).

232DRIO-0308 Manual

15

B&B Electronics -- PO Box 1040 -- Ottawa, IL 61350

PH (815) 433-5100 -- FAX (815) 433-5104

Image 17
Contents Electronics Mfg. Co. Inc Model 232DRIODesigned and Manufactured Ottawa, Illinois InternetPage Table of Contents Appendix B Table of Contents 232DRIO-0308 ManualIntroduction 232DRIO FeaturesNon-polarized, Optically Isolated Input 232DRIO-0308 Manual 232DRIO SpecificationsRelay Outputs Power SupplyCommunications EnvironmentOpto-isolated Input black terminal blocks ConnectionsRelay Outputs blue terminal blocks GroundSerial Port Connections RS232 Connector Pinout232DRIO Terminal Blocks 232DRIO To DCE Connections Power Supply Connections232DRIO To DTE Connections Comp = not x and &HFF #0R01FE Function Command Response 232DRIO CommandsEquivalent Values SyntaxData Bytes Bit Assignments for I/O LinesInput #1 Relay #2 Relay #1 Example Set Output Lines Data Byte Relays Binary DecimalRelay #2 Relay #1 Set Output Lines Command Read I/O Lines Command0R00000000 Shown in bold face0S03 Argument … shown in bold face0S00000011 …~… shown in bold faceBoard Layout Opto-isolated Input Switch Input Isolated Mechanical Input Relay Outputs 232DRIO External Circuit Digital I/O Mask Values SymbolOpening a COM Port Closing a COM PortRead I/O States Command Using the 232DRIO.LIB with QuickBasicSet Output States Command QuickBasic DEMO232.EXE and DEMO232.BAS#include232DRIO.H void main ++ DEMO232.EXE and DEMO232.CPPQuickBasic Running Demonstration ProgramAppendix a Decimal to HEX to Ascii Conversion Table Appendix a 232DRIO-0308 ManualAppendix B Appendix B 232DRIO-0308 Manual Decimal to Hexadecimal Conversion