beautypg.com

Digital lines chapter 6 – Remote Processing RPC-150 User Manual

Page 18

background image

DIGITAL LINES

CHAPTER 6

Page 16

RPC-150

The logic a t J2 port B, with the high c urre nt outputs
installed is just the reverse. A ' 1' at a line causes the
module to turn ON. The OPT O comm and sets the
output to the pr oper po larity wh en U13 is r eplaced w ith
a dip shunt jumper.

High cur rent outpu ts at J2 port B ar e optionally
configurable as TTL I/ O by replacing U13 with a DIP
shunt jump er. This will kee p the logic com patible with
ports A and C . If opto chan nels 0-6 are used as inputs,
then U13 must be replaced by a DIP shunt jumper.

Interfacing to switches and other devices

The STB-26 terminal board provides a convenient way
of interfacing switches or other digital I/O devices. Lines
at J2 and J3 are connected to the STB-26 with a CMA-26
ribbon cable. D igital devices are then connected to the
screw term inals on the STB-26.

Switches m ay be conne cted direc tly to a line. 10K pull-
up resistors on board set all inputs high, or 1. A switch
closure to ground at a line is read as a 0.

Configuring digital I/O lines

Lines are configured during progr am execution using the
CONF IG PIO command. On power up or reset, all lines
are inputs.

When a line is configured as an output, it can sink a
maximum of 2. 5 mA at 0. 4V and can source a minimum
of 2.5 ma at 2. 4V. W hen driving opto modules, the
outputs sink 15 mA at 1.0V.

Digital I/ O prog ramm ing exam ple

The follow ing exam ple read s a switch at po rt A, bit 3
(J2-25), reads an opto module at channel 1 and writes an
opto module at channel 5. A LE D is controlled at J2-10
(port B, bit 0).

200 D = BIT(0,3)

:'Read switch status, port A

210 F = OPTO(101)

:'read opto module, ch. 101

220 OPTO 3,ON

:'write module, channel 3

230 BIT 1,0,0

:'turn on led at J2-10

240 BIT 1,0,1

:'turn off led at J2-10

250 A = LINE(103)

:'Reads pin 3 at J2

260 LINE 114,1

;'Set line 114 high

Conne ctor pin ou t - J2

Pin #

82C55

Description

Opto

Port

Channel

19

Port A, line 0

108

21

Port A, line 1

109

23

Port A, line 2

110

25

Port A, line 3

111

24

Port A, line 4

112

22

Port A, line 5

113

20

Port A, line 6

114

18

Port A, line 7

115

10

Port B, line 0

High current

100

8

Port B, line 1

High current

101

4

Port B, line 2

High current

102

6

Port B, line 3

High current

103

1

Port B, line 4

High current

104

3

Port B, line 5

High current

105

5

Port B, line 6

High current

106

7

Port B, line 7

not available

13

Port C, line 0

Shared with J5

116

16

Port C, line 1

Shared with J5

117

15

Port C, line 2

Shared with J5

118

17

Port C, line 3

Shared with J5

119

14

Port C, line 4

Shared with J5

120

11

Port C, line 5

Shared with J5

121

12

Port C, line 6

Shared with J5

122

9

Port C, line 7

Shared with J5

123

26

Ground

2

+ 5V

Opto Channel is computed by adding 100 to the number
on the MPS rac k. The position number is preceded by
the letter 'M ' on the rack.