Home

User manual in PDF format (DACIO_300_v1_01 0.6 mb)

image

Contents

1. ec i lag shiney 22 APPENDIX A RESPONSE ERROR CODEG ccccccccceeeeeeeeeeeeceeeeesesesesaesesesesesesaeananananaeenseaes 23 APPENDIX B BOARD IMAGE AND LEGEND eee eeee eene 24 APPENDIX ASCI CHART i cerca eR ES 25 APPENDIX D PINOUT AND SIGNALS FOR THE RS232 CONNECTOR 26 APPENDIX E DECIMAL HEXADECIMAL CONVERSION 27 DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 1 DACIO User Guide 1 Important Information Notices and Acknowledgements No parts of this work may be reproduced in any form or by any means graphic electronic or mechanical including photocopying recording taping or information storage and retrieval systems without the written permission of the publisher and author All rights reserved 1 1 Trademarks Products that are referred to in this document may be either trademarks and or registered trademarks of the respective owners The publisher and the author make no claim to these trademarks 1 2 Disclaimer Information furnished is believed to be accurate and reliable However the publisher and the author assume no responsibility consequential or otherwise for errors or omissions or use of such information contained in this document or from the use of programs and source code that may accompany it In no event shall the publi
2. End of Transmission 36 24 68 44 D 00 64 5 5 Aid ENQ Enquiry 37 5 69 45 01 65 6 6 oF ACK Acknowledgement 38 26 amp 70 46 E 02 66 7 7 ec BEL Bell 39 22 71 47 6 DENISE 8 8 H BS Backspace 40 28 72 48 H 04 68 9 9 eT HT Horizontal Tab 41 29 73 NONEM UD 59935 0 A J LF Line Feed 42 2A 74 J 06 6A 3 i e VT Vertical Tab 43 2B va p gt 07 6B Be 2d FF Form Feed 44 2C 76 4C L 08 6c 1 S D M CR Carriage Return AS 2D 77 09 6D m 4 E N SO Shift Out 46 2E s 78 4E N 0 6E n Bb E o SI Shift In 47 2 9 1 6 6 0 P DLE Data Line Escape 48 30 0 80 50 P 2 70 p 7 T 56 DC1 Device Control 1 49 ou 1 00 9 8 2 R DC2 Device Control 2 50 32 2 82 52 R 4 72 r 9 3 55 DC3 Device Control 3 bal 33 3 SENE S S bU S 20 4 AT DC4 Device Control 4 52 34 4 84 54 T 6 74 t Balk 5 e NAK Negative Ack 53 5 BS 55 U PUTS 22 6 V SYN Synchronous Idle 54 36 6 86 56 V 8 76 v 248 7 W ETB End of Transmit Block 575 37 7 87 57 W 9 77 24 8 X CAN Cancel 56 38 8 88 58 X 20 78 x 25 o EM End of Medium 5 9 29 IY 21 TiS v 26 77 SUB Substitute 58 3A 90 5A 2 22 2 27 IB Sat ESC Escape EE 3B g 53 28 QU AX FS File Separator 60 3C lt 92 5C 24 4G 29 B j GS Group Separator 61 OD 93 Hi 2 s 30 RS Record Separator 62 3E gt 94 SE 26 7E Sul p
3. Reply is x lt OD gt where x is 1 0 Read byte from PORTB Reply is xxx lt OD gt where is 000 255 Example 1 1B0 Read bit 0 of PORTB 11 lt 00 gt Reply logic high on bit 0 Example 2 Read 1045 lt 0D gt Reply PORTB 45 Example 3 B Read PORTB I2D 0D Reply PORTB 45 Equivalent hex commands Bx and B Available ports PORTB PORTC Read channel x 0 7 from the analogue port Reply is xxxx lt 0D gt where is 0000 1023 To work out the voltage Va on the input channel use the following formula Va X Vr 1023 where X is the number returned by the module and Vr is the reference voltage Note a As the analogue port is read only the module will accept a command even if the read operator is not used The commands A2 and IA2 achieve the same result b Maximum sample rate is approximately 1163 sps samples per second using hexadecimal commands Conversion time is 20us Example 1 IA2 Read PORTA channel 2 DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 13 DACIO User Guide 10511 0D Reply A D channel 2 511 Assuming analogue source impedance is lt 2 5 kQ and reference voltage used is 5 volts then the voltage on channel 2 is 511 5 1023 2 5 volts approx Equivalent hex command Ax Available ports PORT
4. DACIO User Guide Appendix C ASCII Chart ASCII the American Standard Code for Information Interchange was developed in the 1960 s as a standard 7 bit code for identifying letters numbers symbols and special characters in the English language It was later expanded as Extended ASCII to include additional symbols and foreign language characters Standard ASCII consists of 128 characters ranging from 0 to 127 which be broken down into the following subgroups 0 to 31 127 Control codes includes null backspace line feed and others 32 to 47 58 to 64 81 to 86 123 to 126 Punctuation marks mathematical and other symbols 48 to 57 Numbers 0 through 9 65 to 80 Capital letters A through Z 87 to 122 Lower case letters a through z Standard ASCII Chart The standard chart includes the ASCII character or control and their related decimal and hexadecimal values Also shown are the control key sequences for the control codes Note to obtain codes 0 to 31 console Control Key is pressed while simultaneously pressing a Letter Key e g J is the line feed character Control Key subtracts decimal 64 40h from Letter Key pressed A pec Hex ascrr NUL 32 96 0 0 Null 20 Space 64 40 e 60 ili 1 SOH Start of Heading 9 21 65 41 EON l 2 2 STX Start of Text 34 22 iu 66 42 B 98 62 b 3 3 AG ETX End of Text 232 d G7 C 99 2 c 4 4
5. US Unit Separator o5 27 Delete Legend Key Control Key Letter Key combination except 30 1E hex Control caret DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 25 DACIO User Guide Appendix D Pinout and Signals for the PC RS232 Connector DB9 RS232 Port IBM PC XT AT 1 5 DB9 pin D SUB male B 9 in Signal Name Direction DCE CD Carrier Detect RXD Receive Data TXD Transmit Data DTR Data Terminal Ready GND System Ground DSR Data Set Ready RTS Request to Send CTS Clear to Send RI Ring Indicator Note a Signal names with respect to the computer PC b Direction is from peripheral modem DCE to the computer DTE e g RXD is the computer s input pin DB25 RS232 Port 1 13 000009009200 DB25 pin D SUB male 14 25 Pin Signal Name Direction DTE DCE 1 SHIELD Shield Protective Ground 2 TXD Transmit Data gt 3 RXD Receive Data 4 RTS Request to Send gt 5 CTS Clear to Send 6 DSR Data Set Ready 7 GND System Ground 8 CD Carrier Detect 9 nic 10 nic 11 12 13 14 15 16 17 18 19 20 Data Terminal Ready 21 nic 22 RI Ring Indicator 23 nic 24 nic 25 nic Note a Signal names are with respect to the computer PC b Direction i
6. DACIO 300 DC Characteristics VIL Input Low Voltage GND 0 75 V VIH Input High Voltage 2 0 5 V VOL Output Low Voltage 0 6 V Current sink 1 10 mA VDD 5V Output High Voltage 4 3 V Current source 1 10 mA VDD 5V IPURC PORTC Weak Pull up 50 250 400 Current Notes a VDD is 5V 1 b Data in Typ column is at 25 C c Figures are quoted for operating temperature range 0 C to 70 C Absolute Maximum Ratings 1 Ambient temperature under 10 C to 70 C Storage temperature 2 1 4 4411 44244 1 20 C to 85 C Voltage on any pin with respect to GND except VDD 0 3V to VDD 0 3V Voltage VDD with respect to 0 3 to 6V Maximum current into VDD 250 mA Maximum output current sunk by any 1 25 mA Maximum output current sourced by any I O pin 25 mA Maximum current sunk by PORTB 200 mA Maximum current sourced by PORTB 200 mA Maximum current sunk by 200 mA Maximum current sourced by PORTC
7. are two 8 bit digital ports called PORTB and PORTC on a 0 1 pitch header or optional ribbon cable socket PORTC is an 8 bit port accessible via connector J2 The pin numbers and signal descriptions are as follows 10 VDD Regulated supply voltage 9 GND Signal ground 8 C7 PORTC Bit 7 7 C6 PORTC Bit 6 6 C5 PORTC Bit 5 5 C4 PORTC Bit 4 4 C3 PORTC Bit 3 3 C2 PORTC Bit 2 2 C1 PORTC Bit 1 1 CO PORTC Bit 0 DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 6 DACIO User Guide PORTB is an 8 bit port accessible via connector J1 The pin numbers and signal descriptions are as follows 10 VDD Regulated supply voltage 9 GND Signal ground 8 B7 PORTB Bit 7 7 B6 PORTB Bit 6 6 B5 PORTB Bit 5 5 B4 PORTB Bit 4 4 B3 PORTB Bit 3 3 B2 PORTB Bit 2 2 B1 PORTB Bit 1 1 BO PORTB Bit 0 Note that each bit of PORTB or PORTC is individually configurable under software control as either an input or an output line In addition the module features an internal programmable weak pull up to VDD on PORTC See Figure 4 below This feature may be used to read the state of switches without requiring the use of external pull up resistors Assuming PORTC is configured as an input port the switches can be directly connected to the I O pins on PORTC with the other end to ground This is shown in Figure 5 below Reading the input pins will rea
8. but received B8 1 The module will output E lt 0D gt Error code overflow condition E g writing 256 to 8 bit M Error code I O configuration mismatch E g writing a 1 logic high to any bits that are defined as inputs Example Take the first command to be SB 15 set bits BO B3 as inputs and B4 B7 as outputs The following three commands illustrate its use a If followed with B3 1 an I O mismatch error will be generated because an attempt was made to write a 1 to B3 which is defined as an input line b If followed with B 3 an I O mismatch error will be generated as BO and B1 are defined as inputs The command 0 will not generate an error as writing 0 has no effect on an input line Error code unrecognised command This is returned when commands are too badly formed to given an error code The command string may be too long e g B 25090 DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 23 DACIO User Guide Appendix B Board Image and Legend Optional Ribbon Cable Connector 55mm DACIO V1 3 emm 1 4 f O arty 4 us TN gt RESET 0 oo 6 config JUL ERR Ber 000090 TRONIX M s EE 85 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved
9. command expression characters specify the expression to be processed by the module It is similar to a high level programming language expression and is easy to remember All command expressions must be terminated with a termination end character The general command string is formed as follows e Start Character All commands to the module must begin with either an exclamation mark or a hash The start character is also used to specify the radix number base of input parameters 4 for decimal and for hexadecimal The examples given below will demonstrate which to use e Command Expression a With all except the configuration and miscellaneous commands the next one or two character s specifies the port e g for PORTA B for PORTB etc or bit e g AO for bit 0 of PORTA b An operator symbol is then required to write to read etc The next character s if required is used to provide an input parameter e End Character All commands must end with a semicolon If a valid command is received the module will normally reply with an exclamation character The module will then output the data requested if any and end with a carriage return 0D On error the module will normally reply with a question mark and end with a carriage return OD Command expression 255 Example command string End character Start character Port or bit being accessed Operator Input
10. error code can be given to indicate the reason for the error Alternatively the module can even be prevented from replying at all Set the Response Level to define how the module will respond 8 Set response level to x where x is ASCII 0 1 2 D or E See descriptions in Table 4 below ISRL Read the response level Reply is lt 0 gt where x is the response level and y indicates whether I O MISMATCH DETECTION is enabled or disabled Equivalent Hex Command for setup SRL x Equivalent Hex Command reading SRL Table 4 Output Response Error Checking Levels 0 SILENT MODE The module will execute all valid write commands but will not reply to any valid or not This mode allows easy use of the module where only output write commands are used and feedback is not required It will also reliably allow multiple write commands to be sent as one long string E g IB 1 B gt B gt B B gt is 19 character long command string consisting of five individual commands Notice that the fourth command is not valid the module will just ignore it and execute the next command The final value written to PORTB assuming it is configured as an output port will be decimal 8 1 1 CHARACTER default This is the default mode Basic one character lt 0D gt based responses Use this mode for basic feedback on whether commands sent to the module have been a
11. notes below Digital PORTC Number of lines 8 bits wide bi directional port Data direction output by default each line individually configurable Output current source sink up to 25mA per line however see notes below Notes a Ensure that the total current sourced or sunk by PORTB is less than 200mA b Ensure that the total current sourced or sunk by is less than 200mA c Ensure that the total current sourced or sunk by PORTB and PORTC combined is less than 200mA In other words PORTB and PORTC combined can source or sink safely a maximum of 200mA in total Do not exceed this amount As an example a total of 16 LEDs may be driven at 12 5mA via PORTB and using current limiting resistors Alternatively up to 8 LEDs can be driven at 25mA from say PORTB only PORTB and PORTC outputs have direct LED drive capability but ensure that the limits described above are not exceeded Always use appropriately calculated current limiting resistors when using standard LEDs or use a nominal value of 360 Ohms DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 10 DACIO User Guide The module input supply Vin is normally regulated by a precision on board voltage regulator The regulated operational voltage used internally by the module microcontroller and other on board peripherals is called VDD The following Electrical Characteristics are for the microcontroller operating at VDD at 5V
12. parameter In the command shown above the module is being instructed to write a decimal byte value of 255 to PORTC An equivalent hex command would be C FF UE Hex input Specifies input in heX Y 255 decimal 11111111 binary DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 12 DACIO User Guide There are two main groups of commands accepted by the module decimal radix amp hexadecimal radix commands Commands starting with 4 are the decimal radix commands Commands starting with are the hexadecimal radix commands The two groups have similar commands however in hex radix mode all 16 bit operations are implemented The main difference is that the input parameters and the data from the module replies are given in either decimal or hex The instruction set is described below Most instructions commands are described for PORTB only but may be equally applied to the other available ports in a similar fashion Boldface lower capitals x denote a required input parameter Remember that all characters sent to the module must be in uppercase For clarity commands may sometimes be shown in quotation marks e g IB 15 but the quotation marks are not part of the actual ASCII command string sent to the module Similarly the same is true for replies from the module A carriage return char hex OD is shown as 0D 3 1 Basic Instruction Set Read bit x 0 7 from
13. set by the module using the following commands IXLED1 x Set Red Error Status LED to 0 OFF 1 ON where x 0 or 1 12 Read Enabled Disabled state of internal pull ups Reply is 1 lt O0D gt for ON or 0 lt 0 gt for OFF Equivalent Hex Command for setup XLED1 x where x 0 or 1 Equivalent Hex Command reading XLED1 Note The Red status LED may be set automatically by the module on a hardware communication error DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 20 DACIO User Guide Quick Start Demonstration and Trace Mode The module is normally in Running mode where commands are sent to the module to control or read the state of the I O lines The module may be placed into a special Demonstration Mode This will allow the use of any terminal emulator to activate demonstration modes and test the features of the module using the trace option all without writing a single line of code 3 5 Enabling Demonstration Mode The module can be placed in Demonstration Mode using the following steps Connect the module using a serial cable to a computer s serial port e g 1 Ensure a jumper is placed across J5 CONFIG for baud rate 9600 Run the DACIO RS232 Terminal or a terminal emulator such as HyperTerminal configured to use e g COM1 and with line settings of 9600 baud 8 data bits no parity and no handshaking If th
14. 200 mA Maximum current sunk by PORTB and PORTC combined 200 mA Maximum current sourced by PORTB and combined 200 mA T NOTICE Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the on board microcontroller and other devices This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operation listings of this specification is not implied Exposure to maximum rating conditions for extended periods may affect device reliability DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 11 DACIO User Guide 3 Module Protocol and Control Commands There are two digital I O ports called PORTB and PORTC and one analogue input port called PORTA All bits of PORTB amp PORTC are individually configurable as input or output On first applying power by default PORTB is configured as an input port and PORTC as output port Computers equipped with an RS232 COM port can control a connected module by sending command strings i e a recognised sequence of ASCII characters The command string consists of three parts as shown below COMMAND STRING Start End Character Character The whole command string can consist of 4 9 ASCII characters depending on the function being performed The first character is the start character to inform the module of the type of command expression coming up The
15. A only IBzxxx 1 0 Example 1 Example 2 Write the decimal byte value xxx to where is a 1 to 3 digit number ranging from 0 255 Write 1 0 to bit x 0 7 of PORTB IB 15 Write 15 to PORTB lt 00 gt Reply acknowledged IB4 1 Write logic 1 to bit 4 of PORTB lt 00 gt Reply acknowledged Note commands B 015 and B 15 have the same effect Equivalent hex commands B xx and Bx 1 0 where xx are hex digits 0 FF Available ports PORTB PORTC Example 1 Example 2 Invert all bits in PORTB change all 1s to Os and vice versa Invert bit x 0 7 of PORTB IB Invert PORTB lt 00 gt Reply acknowledged IB3 Invert bit 3 of PORTB lt 00 gt Reply acknowledged Equivalent hex commands B and Bx Available ports PORTB PORTC Example 1 lt 0 gt Shift right PORTB towards LSB Shift left PORTB towards MSB IB gt shift right PORTB Reply acknowledged Equivalent hex commands B gt and B lt Available ports PORTB PORTC DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 14 DACIO User Guide 3 2 Setup Configuration Commands There are various setup options available online The module can be input output direction analogue setup etc The full list of configuration commands is given below On
16. Advanced Data Capture Control Systems Tronisoft Limited Email sales tronisoft com Web www tronisoft com DACIO 300 Series User Guide RS232 Controlled Digital amp Analogue Input Output Modules P N 9601 Document version 1 01 Date Jan 2009 Information furnished is believed to be accurate and reliable However Tronisoft Limited assumes no responsibility consequential or otherwise of use of such information Email support tronisoft com with suggestions or to report document inaccuracies omissions and errors Specifications mentioned in this publication are subject to change without notice This publication supersedes and replaces all information previously supplied Copyright 2009 Tronisoft Limited Printed in England United Kingdom All Rights Reserved http www tronisoft com DACIO User Guide 1 IMPORTANT INFORMATION NOTICES AND ACKNOWLEDGEMENTS 2 dT ATRADEMARKS ais dade cde TOU Ro acuden st oe do 2 1 22 JDISGEAIMBRUS nea dar tee ile th ak aah tk dfe peti odes esi aca sien a UT 2 125 SAFETY AND REGULATORY COMPLIANCE 2721 tint chats cta aberit dence 2 7 4 DOCUMENT REVISIONS oca roa ARE 2 INTRODUCTIO N oc 3 25 JEBATURESLDISToS tata tao can E 3 1 6 BLOCK DIAGRAM DACIO MODULE 300 SERIES sss 4 2 HARDWA
17. B and PORTC as inputs Equivalent hex commands for setup SGx I O and SG xxxx xxxx are hex digits 0 Equivalent hex commands reading SG Reply is xxxxx lt 0D gt are hex digits 0 DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 17 DACIO User Guide ISRM x Set radix mode to either decimal hexadecimal or both where x is the character D H or B Setting the radix mode to D decimal allows the module to respond only to the decimal radix commands i e commands starting with Similarly only hex commands are accepted when in radix mode H Set radix mode to B both if the module is to respond to all commands Default radix mode is set to B ISRM Read radix mode Reply is x 0D where x is D H or Example 1 ISRM D Set radix mode to decimal Only decimal radix commands will now be recognised by the module Equivalent Hex Command for setup SRM x Equivalent Hex Command reading SRM This sets the level of response the module provides to indicate a good or a bad command Normally if a command other than a data read command is executed then the module just replies with a simple acknowledgement e g for the command B 255 the module will reply with either lt OD gt or lt 0 gt to indicate success or failure respectively If the module did not accept the command then an
18. Hex Command SMID The DACIO modules are based on microcontrollers and run firmware to achieve specific functionality To obtain the current version number of the DACIO firmware use the following command ISVER Reply is XY lt 0D gt where X and Y are ASCII digits 0 9 X is the major release number and Y is the minor number The minor number changes with minor improvements or bug fixes Version numbers are usually written in the form X Y Note This command may be used to automatically check for version changes if modules are replaced Software on the computer could alert the user if the new module has a different firmware version than the replaced module The user should then read about the changes associated with the new module and decide if any action has to be taken Example 1 10 lt 0 gt indicates software version 1 0 Equivalent Hex Command SVER DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 19 DACIO User Guide 3 4 Extended Commands Customer feedback and general enhancements to the module s features may be incorporated over time This section will list such commands and features Note that some features may be in beta and as such may not be supported in future revisions of the board Check the manual for the documentation of your firmware revision The error status Red LED status see section 2 7 Status LEDs may be set intentionally read or reset if
19. RE DESCRIPTION 5 enirn eter eaa viru eue v nex adada d AEAN aa ciere nep ccce Dre Een 5 2d POWER SUPPLY V D RS cashes 5 2 2 ANALOGUE DIGITAEPOR TA ierant veers orsa a cad 5 2 3 DIGITAL PORTB 22 0002 020000 0000000000000000000000000 6 23 8 2 5 OTHER CONNECTIONS 0 o ice dudit ile Nit b E Ss ace eee hae ata 8 20 RS292INTEREAGE scito eee ia ete ea 9 2 eaten tette ste iae a dede im Eit uei qu EE 9 2 8 MODULE SPECIFICATION ESO EM eter dil 10 MODULE PROTOCOL AND CONTROL 5 4 4 444111 12 3 1 BASIC INSTRUCTION BET 13 3 2 SETUP CONFIGURATION COMMANDS an Festis adt Da t de te radere 15 3 3 MISCELLANEOUS COMMANDS ta qus 16 3 4 623256 246 seh luc ante Cute at tied Mta qat 20 QUICK START DEMONSTRATION AND TRACE 21 3 5 ENABLING DEMONSTRATION MODE 21 3 6 ENABLING RUNNING MODE irc
20. annels to computers equipped with a spare RS232 COM port The advanced design features unmatched power and ease of use at a budget price It is useful for applications requiring a serial to parallel and parallel to serial converter It is ideal for use in computer controlled systems for digital analogue data acquisition robotics automatic testing equipment process control or for experimental and educational purposes This document is applicable to the DACIO 300 and DACIO 303 versions of the interface boards Table 1 highlights the main differences Table 1 DACIO 2XX Variations DACIO 300 16 8 or 7 1 reference input CMOS TTL 5V DACIO 303 16 8 or 7 1 reference input 3 3V 1 5 Features List A brief list of some of the features included in the DACIO module is given below e Two 8 bit digital ports 5V or 3 3V options e Each input output line is individually software configurable amp controllable e The DACIO 300 features 8 10 bit A D input channels or 7 A D 1 reference channel e Single DC supply 6 to 10V wide input 5V or 12V versions available on request e Flexible and easy to remember instruction set Bit byte or 16 bit operations e Micro based design with small PCB footprint 84x55mm e High performance PC interface Industry standard RS232 line drivers with 9600 and 115200 bps others available on request e Full but suppressible error reporting Two status LEDs e Quickstart guid
21. ccepted Example response lt 00 gt DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 18 DACIO User Guide 2 2 5 Two characters lt OD gt command responses Example responses x lt 0D gt or x lt OD gt where x is a response error code See Appendix A Response Error Codes for a full list This level may be useful for debugging communication problems or syntax errors D DISABLE I O MISMATCH DETECTION Default mode Disable detection of input output configuration mismatch errors If an I O mismatch does occur an error will not be generated though the command will be safely albeit partially executed For example the command SB 15 followed with B 255 will result in PORTB written with the decimal value of 240 because bits BO B3 have been configured as inputs E ENABLE I O MISMATCH DETECTION Enable detection of input output mismatch errors See above for more information Other DACIO modules with different feature sets but using similar hardware may exist in the future For internal use and for assisting software configuration modules will store a module type ID to differentiate between them and can be read using the following command ISMID Reply is lt 00 gt where A B and C are ASCII digits 0 9 or A Z Example 1 1300 lt 00 gt indicates a DACIO 300 series module Equivalent
22. d as 1 when the switch is open and 0 when the switch is closed The internal pull ups on all lines may be enabled or disabled under software control via commands Figure 4 Simplified Diagram of PORTC with Figure 5 Connecting Switches to Programmable Internal Pull ups Input Pins on C7 if pull up is enabled 8 bit I O To C7 Press for logic 0 Note Internal pull ups are disabled automatically for I O lines configured as outputs So set relevant bits to inputs then enable the internal pull ups lt lt gt Module MCU Internals External I O DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 7 DACIO User Guide 2 4 Reset Pins The module may be reset by shorting the jumper pins on J6 together for at least 1ms Jh Normally open Short pins to initiate hardware reset to the module 2 5 Other Connections The DACIO module may power certain devices via its RS232 interface via J9 pin 9 See below which shows how to set the jumper pin settings Disconnected no power on J9 pin 9 A VDD routed to J9 pin 9 An additional general purpose port is accessible via connector J7 for future expandability This is currently unimplemented DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 8 DACIO User Guide 2 6 RS232 Interface The module connection to a host computer is via J9 J9 is a 9 way D type socket connector A standard serial
23. e default settings LED demo and powerful trace feature gets you up and running in minutes Intelligent on board micro communicates with a Terminal program on the host computer allowing you to run demos or try out all the features by typing commands manually e Very low power consumption typically 10 15mA no load DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 3 DACIO User Guide 1 6 Block Diagram DACIO Module 300 Series Figure 1 Module Block Diagram DACIO uController PORTA PORTC Up to 8 A D Input 8 Digital I Os channels multiplexed PORTB 8 Digital I Os Command Processor Firmware Status LEDs Serial Port RS232 ial General CMOS TTL Line Driver C Seria ue vO Logic Level TTLGRS232 Port COM1 Configuration The module provides two digital I O ports called PORTB and PORTC and one analogue input port called PORTA The PC computer interface is a serial port connection via RS232 line drivers into the module s microcontroller providing the input output lines Computers equipped with an RS232 COM port can control the connected module by sending commands in ASCII which are processed by the module s internal Command Processor firmware Status LEDs indicate communication to the unit and are also used to indicate errors The module can be configured for baud rate selection via configuration jumper pins DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All R
24. e Channel 3 Optional Reference Input 5 A5 Analogue Channel 5 6 A6 Analogue Channel 6 8 AT Analogue Channel 7 9 A8 Analogue Channel 8 9 VDD Regulated supply voltage 10 GND Signal ground DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 5 DACIO User Guide The on board Analogue to Digital Converter ADC allows conversion of an analogue input signal to a corresponding 10 bit digital number The 8 channels are multiplexed Any one of the 8 analogue input channels when read give a value of 0 1023 where 0 represents OV and 1023 represents the reference voltage e g VDD of the module The analogue port may be configured under software control as 8 analogue input channels with VDD e g 5V as the voltage reference or as 7 analogue channel input channels with channel A3 JO pin 4 as the reference input signal If channel A3 is used as the reference signal ensure the voltage on this line is between VDD and VDD 2 Analogue to Digital A D resolution is 10 bit Accuracy is within 1 bit but that can be made worse depending on the analogue source and voltage reference used Keep the source impedance low lt lt 2 5 kQ If required pass the analogue source through a voltage follower Figure 3 below shows the use of a unity gain buffer as a voltage follower to provide a high input impedance to an analogue voltage source Figure 3 Unity Gain Buffer 2 3 Digital PORTB and PORTC There
25. e module is powered up and running then reset it by either shorting J6 RESET e g by placing a metal tipped flat blade screwdriver across the pins or remove power from the module for at least 2 seconds and then reapply Within 10 seconds of step 4 press the space bar twice in DACIO RS232 Terminal or HyperTerminal The LEDs on the module should start to flash indicating that the module is in demonstration mode You will be presented with a menu option for selecting simple LED based demonstrations or choosing the trace feature T DACIO RS232 Terminal File Edit View Settings Comms Help 2 3 DACIO 300 V1 3 Tronix co uk LED Demo FLASH C7 LED Demo on PORTC A D CHO on PORTC Trace Enter Connected 00 00 11 ASCII Terminal Line 1 Bytes Out 2 In 126 Total 128 The trace option press 4 allows you to enter commands into the module and see the responses You will also get logic level port dump for digital I O ports DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 21 DACIO User Guide Trace output port dump 1 LED Demo FLASH C7 1Hz 2 LED Demo on PORTC 3 A D CHO on PORTC 4 Trace Enter 44 Running option 4 Radix Mode Hex amp Dec Analog Mode 5 9 ch PORTC Pull up Off O Mismatch Det OEE O P Supp Level i 1 char PORTC PORTB Logic Level OO OO 0 0 00000 0 9 000 000 D 0 0 099 Or 0 000 Enter C
26. ere 0 represents OV and 1023 represents the positive supply voltage VDD of the module VDD 5V for DACIO 300 is the default reference voltage The reference voltage can be changed to anything between 2 5V and VDD only if PORTA is configured to 7 channel mode where the reference voltage is applied to channel A3 ISA 7 8 Configure analogue to digital port to 7 channel with channel A3 as ref or 8 channel mode with VDD as ref ISA Read analogue to digital port configuration Reply is 7 lt OD gt or 8 lt 0D gt Equivalent Hex Commands SA 7 8 for setup or SA to query current configuration DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 15 DACIO User Guide Example ISA 8 Set to 8 channel A D use all channels as analogue inputs Note a If PORTA is set to 7 channel mode then reading channel will not give meaningful result This is because channel A3 is the reference input Reading channel A3 with itself as reference will always return the value 1023 The DACIO features an internal programmable weak pull up to VDD on PORTC See Figure 4 in section 2 3 Digital PORTB and This feature be used to read the state of switches without requiring the use of external pull up resistors To enable disable internal pull ups on all lines use the following command ISCPUZE D Enable Disable internal pull ups ISCPU Read Enabled Disabled s
27. extension cable pin 1 to pin1 pin 2 to pin 2 etc is required to connect to a host computer The module supports two baud rates 9600 and 115200 The data format is 8 data bits no parity and 1 stop bits The baud rate of the module is 115200 by default To set to 9600 place a jumper over connector J5 CONFIG on the module Table 2 below shows the different baud rate options and how to set the jumper pin settings Table 2 Baud Rate Setup Options 115200 Default A 9600 Notes a Communication speeds 9600 to 115200 bps have all been tested reliably with shielded cable lengths up to 10m Longer cable lengths may be possible but may result in unreliable degraded signal performance b The module only reads the J5 jumper pin settings on power up or when the module is reset Therefore if changing J5 configuration reset the module for the change to take effect 2 7 Status LEDs Two status LEDs are provided one for indicating valid communication with the module and the other for notifying errors Table 3 Status LED Descriptions Green This flashes during successful communication e g on receiving valid command sequences Red This is turned on for a hard communication error such as a framing or baud rate error Note that the Red LED should not light up in normal running mode unless the wrong communication settings are being used with the module or the module is being used in a very noisy envi
28. ights Reserved 4 DACIO User Guide 2 Hardware Description Figure 2 below is a simplified diagram depicting the main hardware components and input output ports A hardware description of the features is provided here followed by the software control description in section 3 Figure 2 Simplified Module Diagram 2 4 Power Supply For simple power supply reqirements the module features a built in voltage regulator for operation with a wide voltage range The input voltage Vin is regulated using a precision voltage regulator to the voltage used internally by the module called VDD VDD is 5V 1 for DACIO 300 and 3 3V 196 for DACIO 303 The module may be powered using an external power supply or battery connected via the attached PP3 connector The input voltage may be 6 to 10V for DACIO 300 and 4 to 8V for DACIO 303 Higher voltages require an adequate heatsink to be fitted to the on board voltage regulator Alternativley the voltage regulator may be removed on request for direct operation Current consumption may be as low as 10 15mA no load and as high as 210mA if all 16 digital I O lines are powering LEDs at 12 5mA each 2 2 Analogue to Digital PORTA The module has up to 8 10 bit analogue input channels accessible via connector JO The pin numbers and signal descriptions are as follows 1 0 Analogue Channel 0 2 1 Analogue Channel 1 3 A2 Analogue Channel 2 4 A3 Ref Analogu
29. ommand 3 6 Enabling Running Mode Resetting the module puts it back into Running mode by either shorting J6 RESET or removing and re applying power DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 22 DACIO User Guide Appendix Response Error Codes The following only applies if the module has been configured with the Output Response Level configuration setting set to 2 characters See section 3 3 7 Output Response Level Normally if a command is not recognised by the module it will reply with a question mark and a carriage return lt 0D gt If more information is required then the module can be configured to report an error code as described in section See section 3 3 7 Output Response Level The format is as follows x 0D where x is an error code The module responds only after it receives the end character or if a timeout occurs Valid commands are acknowledged with IA lt OD gt Note If an error code is returned then the command will not have been executed This means that the logic states on the module s I O pins will not have changed Table 5 Response Error Codes A Response code valid command acknowledged The module will output A lt 0D gt and the command will have been executed successfully E Error code expected x before or after but received y E g expected a number x in the command Bx 1 to be 0 7
30. power up the module is set to a default configuration setting and this is given after the commands have been described There are a lot of configuration options so practice using the module with the default settings first then use the commands in this section when the need arises ISBxzl O Set bit x 0 7 of PORTB as an input output line input O output 15 Set input output configuration byte 0 255 Bit 1 Input Bit 0 Output Note by default PORTB is an input port and PORTC is an output port on module powering up or after a reset ISB Read PORTB input output configuration byte 0 255 Bit 1 Input Bit 0 Output Example 1 ISB3 1 Set B3 of PORTB as an input line lt 00 gt Reply acknowledged Example 2 ISB 15 Set BO B3 as inputs and B4 B7 as outputs lt 00 gt Reply acknowledged Example 3 ISB Read PORTB direction setup 1255 lt 0D gt Reply PORTB I O direction 255 i e all bits are inputs Equivalent hex commands for setup SBx 1 O and SB xx xx is a 1 to 2 digit hex no Equivalent hex commands reading SB Available Ports PORTB PORTC There are 8 analogue input channels on PORTA The on board ADC allows conversion of an analogue input signal to a corresponding 8 bit digital number The 8 channels are multiplexed Any one of the 8 analogue input channels when read give a value of 0 1023 wh
31. ronment such that communication to the module is being corrupted DACIO_300_v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 9 DACIO User Guide 2 8 Module Specification Input Supply Voltage 6 10V for DACIO 300 optional 5V available or 12V with heatsink 4 8V for DACIO 303 optional 3 3V available or 12V with heatsink Input Current 10 15mA typically on no load and to 210mA overall on full load see section 2 8 4 Microcontroller Electrical Characteristics Internal Regulated Voltage VDD Linear 5V 1 accuracy for DACIO 300 Linear 3 3V 1 accuracy for DACIO 303 Connection RS232 serial port 9 Way D type Connector Line settings 9600 or 115200 default baud 8 data bits no parity and 1 stop bits Line Drivers Industry standard RS232 line drivers meets full EIA TIA 232D specifications Analogue PORTA A D Channels Eight multiplexed A D channels A0 A7 or 7 A D 1 reference channel Resolution 10 bit Accuracy 1 bit with low source impedance i e lt lt 2 5 kQ and accurate voltage reference Reference Voltage software configurable as VDD or channel A3 Reference Voltage Range 2 5V minimum 5V maximum for DACIO 300 2 5V minimum 3 3V maximum for DACIO 303 Digital PORTB Number of lines 8 bits wide bi directional port Data direction input by default each line individually configurable Output current source sink up to 25mA per line however see
32. s from peripheral modem DCE to the computer DTE e g RXD is the computer s input pin Do not connect SHIELD 1 to GND 7 DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 26 DACIO User Guide Appendix E Decimal Hexadecimal Conversion Chart Converting Hexadecimal to Decimal This chart shows the conversion between hex and decimal 0 1 2 3 4 5 6 7 8 9 A B D E F tj E OOQOU w000 JoUiuNImPO Usage example Hex 31 is equivalent to decimal 49 Alternatively decimal 255 is equivalent to hex FF DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 27
33. sher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document 1 3 Safety and Regulatory Compliance Tronisoft Limited takes considerable care in designing products with safety and ease of use in mind However Tronisoft s products are not authorized for use as critical components in life support or safety critical devices or systems The product s contained within this User Guide are OEM products These may be suitable only for system integrators and electronics enthusiasts By using testing or integrating the product s described in this User Guide you accept responsibility for ensuring that relevant local regulatory compliancy requirements are met depending on the country of use Follow any recommendations and take note of any cautions or warnings stated within this User Guide Generally do not use Tronisoft products without first reading their respective User Guide 1 4 Document Revision V1 00 Mar 2008 First version Documents DACIO 300 firmware v1 3 V1 01 Jan 2009 Minor update Documents DACIO 300 firmware v1 3 DACIO 300 v1 01 doc Copyright 2009 Tronisoft Limited All Rights Reserved 2 DACIO User Guide Introduction The DACIO 300 series modules are powerful new microcontroller MCU based computer interface boards A single board provides two 8 bit digital input output ports and up to 8 analogue input ch
34. t 2009 Tronisoft Limited All Rights Reserved 16 DACIO User Guide Write the decimal word value xxxxx to PORTB low byte high byte where xxxxx is a 1 to 5 digit decimal number ranging from 0 65535 6 1 0 Write 1 0 to bit x 0 9 of PORTG Example 1 G 65535 Write 255 to both PORTB and Example 2 G 2D Write hex 2D to PORTB and 0 to PORTC Example 3 G7 1 Write 1 logic high to bit 7 of PORTB Example 4 G10 1 Error The parameter x in Gx 1 0 must be a single digit Attempting to write to bit 3 of PORTC This is only possible using the equivalent hexadecimal command Example 5 GA 1 Hex command Write 1 to bit 3 of PORTC Equivalent hex commands G xxxx and Gx 1 0 16 Invert all bits in PORTG change all 1s to Os and vice versa Invert bit x 0 9 of PORTG Equivalent hex commands G Gx IG Shift right PORTG towards LSB 16 lt Shift left PORTG towards MSB Equivalent Hex Commands G gt and G lt 18 Set bit x 0 7 of PORTB as an input output line input O output ISGzxxxxx Set PORTG input output configuration word 0 65535 Bit 1 input Bit 0 output ISG Read 16 bit decimal word value of PORTG I O direction setup Reply is xxxxx lt 0D gt where xxxxx is 00000 65535 Example 1 SG FFFF Configure all lines of PORT
35. tate of internal pull ups Reply is lt 0 gt for Enabled or D lt OD gt for Disabled Equivalent Hex Command for setup SCPU E D Equivalent Hex Command reading SCPU 3 3 Miscellaneous Commands PORTB and PORTO are both 8 bit I O ports and these can be combined and thought of as a general 16 bit port or PORTG The low 8 bits of PORTG map directly onto PORTB and the most significant 8 bits map onto PORTC Instructions for operating on PORTG are similar to those already shown The only difference is that reading from or writing to both PORTB and be done using one instruction Note For the decimal radix commands shown below the parameter x is a single decimal digit 0 9 and therefore limits access to only the 10 bits of PORTG Only the equivalent hexadecimal commands will allow access to all 16 bits of PORTG as x can then be 0 9 or A F Read bit x 0 9 from PORTG Reply is x 0D where x is 1 or 0 162 Read 16 bit decimal word value from PORTG i e read both PORTB and PORTO Reply is xxxxx lt 0D gt where xxxxx is 00000 65535 Example 1 G The module will reply with a 16 bit number indicating the status of the bits of both PORTB and PORTC An example reply may be 00002 lt 0D gt which would mean that PORTB 2 and PORTC 0 Equivalent hex commands Gx and G where x is a hex digit 0 9 or A F DACIO_300_v1 01 doc Copyrigh

Download Pdf Manuals

image

Related Search

Related Contents

Kaspersky Mobile Security 7.0 Enterprise Edition    Users Manual  Speak English! - Franklin Electronic Publishers, Inc.  ホームワゴン取扱説明書[615.8 KB]  AKG K309  16” 40 V Lithium-Ion Cordless Mower  

Copyright © All rights reserved.
Failed to retrieve file