B&B Electronics manual 485SDD16-1005 Manual Appendix B

Page 20

APPENDIX B

Hexadecimal/Decimal Conversions

The decimal (base 10) numbering system represents each position in successive powers of 10, with each decimal symbol having a value from 0 to 9. The hexadecimal (base 16) numbering system represents each position in successive powers of 16 with each hex symbol having a value of 0 to 15. Since each hex position must have a single symbol, the symbols "A" through "F" are assigned to values 10 through 15 respectively. Refer to Table 1. The information and examples to follow will explain how to convert from a decimal number to a hexadecimal number and vice versa.

 

Table 1.

Decimal

 

Hexadecimal

Value

 

Symbol

0

 

0

1

 

1

2

 

2

3

 

3

4

 

4

5

 

5

6

 

6

7

 

7

8

 

8

9

 

9

10

 

A

11

 

B

12

 

C

13

 

D

14

 

E

15

 

F

485SDD16-1005 Manual

Appendix B

B-1

B-2

Appendix B

485SDD16-1005 Manual

B&B Electronics -- 707 Dayton Road -- Ottawa, IL 61350

B&B Electronics -- 707 Dayton Road -- Ottawa, IL 61350

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

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

Image 20
Contents Electronics Mfg. Co. Inc Designed and Manufactured Ottawa, IllinoisInternet Sales@bb-elec.com Support@bb-elec.comTable of Contents Introduction 485SDD16 Features485SDD16 Specifications Size Power SupplyCommunications Connections Digital I/O Connections485SDD16 I/O Port Pinout Serial Port ConnectionsExample of Multi-Node Network Commands 485SDD16 CommandsEquivalent Values SyntaxBit Assignments for I/O Lines Read I/O Lines CommandSet Output Lines Command Set Module Address Command Set Turn-around Delay CommandDefine I/O Lines Command Command AddrSC ArgumentSet Power-up States Command Read Configuration CommandRead Configuration command returns the modules I/O Command AddrRC Argument None ResponseInterfacing Digital InputsIsolated Solid State Input Digital OutputsDigital I/O Mask Values SoftwareProgramming Techniques Set Output States Command MSdefs = MSdefs and mask LSdefs = LSdefs and maskMSpups = MSpups and mask LSpups = LSpups and mask MSstates = MSstates or mask LSstates = LSstates or maskDefine I/O Lines Command Set Power-up States CommandCmnd$ = ! + CHR$Maddr + SO + CHR$MSstates + CHR$LSstates Maddr =Set Module Address Command MSpups = MSpups and NOTmask LSpups = LSpups and NOTmaskCmnd$ = ! + CHR$Maddr + SS + CHR$MSpups + CHR$LSpups LSpups = LSpups or &H20Demonstration Program Running Demonstration ProgramDecimal 485SDD16-1005 Manual Appendix a119 120 121 122 123 124 125 126 127 485SDD16-1005 Manual Appendix aAppendix B 485SDD16-1005 Manual Appendix BDecimal to Hexadecimal Conversion 2523rd Hex digit 240 4th Hex digit Decimal equals 10FC hexadecimalAppendix C DBM16 Interfacing Table C.1 DTB25 ConnectionsTable C.2 DBM16 I/O Connections Figure C.4 Solid State Input 485SDD16-1005 Manual Appendix CDBM16 Specifications Lines Power Supply Input VoltageTotal Connections SizeFigure C.10 DBM16 Schematic #addrRD Msb~ I/O msbI/O lsb ~ I/O lsb00FF01FE Comp = not x and &HFFTable D-1 Extended Commands 485SDD16-1005 Manual Appendix D