12.07.2015 Views

CSA-32e.pdf 1289KB May 02 2006 12:07:50 PM - DCC Supplies

CSA-32e.pdf 1289KB May 02 2006 12:07:50 PM - DCC Supplies

CSA-32e.pdf 1289KB May 02 2006 12:07:50 PM - DCC Supplies

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

“open”, that is as long as nothing is connected to them.Now take a 10kohm resistor and connect one end to socket K9, which isground. Every time you connect the other end of the resistor to a pin on thesocket K3 or K4 (except for pins 25 on K3 or pin 9 on K4) the LED D1should turn off briefly and a new value should appear in the data field ofthe Transmit pane. Remove the resistor from the input pin again andFF FF FF FF should return.To see whether the module also operates the pins as outputs, select mode 2.Click again in the Transmit pane and hit the Insert key on the keyboard.Enter the values 3D1 (ID), 1 (Length) and <strong>02</strong> (data) and click on OK.Double click on the new line in the Transmit pane (for modules withdifferent addresses consult above table for proper ID). The module shouldconfirm this with 3E1 (ID), 1 (length) and <strong>02</strong> (Data). All outputs shouldnow be set to logic 0 (ground).You can now set each output to any bit setting by sending the followingcommand: 3D1 (ID), 4 (Length) and four values of your choice (from 00 toFF). For example: to set the outputs to “on” and “off” alternatively (Bitsettings 10 10 10......), send the following command: 3D1 (ID), 4 (Length),AA AA AA AA (Data). After the module’s LED flashed once the outputsat K3 and K4 should be configured as intended. Use a voltmeter to verifythe output voltages (a bit value of 1 sets the corresponding output to +5V. Avalue of 0, to 0V). In this example, output 1 (pin 1 of K3) should have 0V,output 2: +5V, output 3: 0V, output 4: +5V and so on.____________________________________________________________A CAN-bus command can be 8 bytes long. Each byte contains 8 bits.Rather than describing a byte as a chain of 8 zeros and ones, a system wasdeveloped that divides a byte in two groups of 4 bits. For each group anumber or letter is assigned according to its value. This is referred to ashexadecimal notation.Binary to hexadecimal conversion table:0000 = 0 0100 = 4 1000 = 8 1100 = C0001 = 1 0101 = 5 1001 = 9 1101 = D0010 = 2 0110 = 6 1010 = A 1110 = E0011 = 3 0111 = 7 1011 = B 1111 = FA group of 0000 is indicated with a 0 where 1111 = F. A byte such as10101010, separated in two groups 1010 and 1010 becomes AA inhexadecimal. Binary code 1111 1111 becomes FF.The (Length) 4 in our example indicates how many bytes are being sent(E.g. AA AA AA AA = 4 bytes at two groups each).____________________________________________________________19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!