Manual OC32/NG
VPEB
Control your Miniature World
Page 20 of 48
Version 1.0 – December 15
th
, 2017
2017 Leon van Perlo
•
Firmware-update: With this you can provide the OC32 with new firmware. It can only be
done via the RS485 interface.
The OC32 can be controlled in 4 different ways:
•
Via a Dinamo or Dinamo/MCC system. In most cases you will use the RS485 interface.
•
Straight from a PC with the appropriate software. In this case you preferably use the
RS485 interface or, if you happen to have a COM-port and no U485, the RS232
interface.
•
By a “digital system” via the DCC protocol. Note, with this method you can only send
operational commands.
•
Autonomously or by pushbuttons/switches.
As described above the communication channels are available simultaneously. You can use
this feature for example when you control your OC32 in a Dinamo system via RS485, or in a
digital system via DCC, but require an additional channel to give operational commands to
the OC32 from a separate PC program to control day/night simulation.
5.2
Addressing of multiple OC32 modules (serial communication)
Using the serial interfaces RS485 or RS232, you can connect multiple OC32 modules to
the same communication bus. In order to determine with which module you are
communicating, each module has an address. With normal addressing you can address up to
16 modules, with extended addressing up to 96 modules.
Note that the ‘serial address’ is shared between the RS485 and RS232 channels, so if you
use both channels simultaneously, the OC32 will have the same address on both interfaces.
5.2.1
Addressing (normal)
Each OC32 receives a unique address (0..15). The address to which the OC32 reacts is set
by dip-switches. It doesn’t matter whether the communication is TTL, RS232, RS485 or a
combination of those, nor whether your central system is Dinamo or your OC32’s connected
straight to your PC.
Table 1 below shows which settings of the dip-switch correspond to which address. For the
record: this is the standard numbering starting from 0. If your software starts numbering
from 1 onwards, you have to add 1 to each address.
Address:
0
1
2
3
4
5
6
7
SW1
ON
OFF ON
OFF ON
OFF ON
OFF
SW2
ON
ON
OFF OFF ON
ON
OFF OFF
SW3
ON
ON
ON
ON
OFF OFF OFF OFF
SW4
ON
ON
ON
ON
ON
ON
ON
ON
Address:
8
9
10
11
12
13
14
15
SW1
ON
OFF ON
OFF ON
OFF ON
OFF
SW2
ON
ON
OFF OFF ON
ON
OFF OFF
SW3
ON
ON
ON
ON
OFF OFF OFF OFF
SW4
OFF OFF OFF OFF OFF OFF OFF OFF
Table 1: Address setting of the OC32
Control your Miniature World
VPEB
Manual OC32/NG
2017 Leon van Perlo
Version 1.0 – December 15
th
, 2017
Page 29 of 48
pin-hole pairs and don’t cut deeper than some 0.2mm below the surface of the PCB or you
may damage the internal layers. Use a multimeter to check that both pin-hole pairs are
actually isolated.
Now solder a 2-pin and a 3-pin 2,54mm pin header at the position of JP5.
Also solder an 8-pin IC socket at the position of IC14, observe correct polarity.
Before modification
After modification
Fig 19: Adding a second RS485 bus
Installing 2 jumpers on JP5 on postions marked “CON” will restore the old situation.
Inserting a Maxim MAX3082 or the cheaper Texas SN65HVD3082 (DIL version) in socket
IC14 will turn K2 into an RS485 channel 0
A jumper on JP5 in postion marked TD0 will activate an RS485 terminator on channel 0
As a summary you’ll now have the following selections:
•
2 jumpers on K5, position “CON”, IC14 empty:
Standard situation.
Channel 0 = RS232 (or TTL if you made the mod)
Channel 1 = RS485 available on K2, K2A, K2B
•
NO jumper on K5, RS485 driver in IC14:
Channel 0 = RS485 available on K2, no termination
Channel 1 = RS485 available on K2A, K2B
DO NOT CONNECT K1 pin 4!
•
Jumper on K5, position TD0, RS485 driver in IC14:
Channel 0 = RS485 available on K2, terminated
Channel 1 = RS485 available on K2A, K2B
DO NOT CONNECT K1 pin 4!
RS232+RS485
2xRS485
2xRS485
Original situation
No terminator on chan.0
Terminator on Chan.0
Fig 20: Selectable options for second RS485 bus
2x