Chapter 12 user jumpers, Description – Remote Processing RPC-30 User Manual

Page 35

Advertising
background image

CHAPTER 12

USER JUMPERS

RPC-30

Page 33

Figure 12-1 W7 user jumpers

DESCRIPTION

Five user jumpers are available at W7. These jumpers
may be read as part of a progr am to determine a boards
function or configuration. It is up to you to determine
what the jumpers mean. A common use is to set the
boards address in a RS-485 network.

Jumpers are at addre ss 17, bits 1-5. Bit 0 is used by the
system to read the serial EEPROM.

Jumper W 7 is mapped to the following bit num bers.

Jumper

Bit No.

[1-2]

5

[3-4]

4

[5-6]

3

[7-8]

2

[9-10]

1

Individual jumper status are read using the BIT function.
A ' 0' indicates a jumper is installed.

100 A = BIT(17,3) :'Reads W7[5-6]

Jumpers m ay be read to deter mine a car d address. Use
the following map to assign a value to a jumper. When
a jumper is installed, its value is 0. When r emove d, its
value is show n to the right. The pr ogram example
shows how a jumper configur ation can be c onverte d into
a number and a string.

Jumper

Value

[9-10]

1

[7-8]

2

[5-6]

4

[3-4]

8

[1-2]

16

Assume W7[7-8] and [1-2] are jumpered. The program
would return the following value.

10 A = INP(17)/2 :'Get jumper value & shift
20 A$ = STR$(A) :'Convert to a string
30 A$ = RIGHT$(A$,LEN(A$)-1) :'strip off space
40 PRINT "Jumper value is:";
50 PRINT "Jumper string is:";A$
RUN
Jumper value is: 18
Jumper string is:18

Line 30 str ips off the leading space wh en a num ber is
converted to a string.

This string could be concatenated to produce a board
identifier. See Chapter 4, Networking, for more
information.

Advertising