MCC iPort/AFM MIIC-203 User Manual

Rs-232 to i2c host adapter with ascii fast mode interface
Table of Contents

Advertisement

Quick Links

User's Guide

!479 ,12
TM
2
RS-232 to I
C Host Adapter
with ASCII Fast Mode Interface
with iPort Utility Pack for Windows
www.mcc-us.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the iPort/AFM MIIC-203 and is the answer not in the manual?

Questions and answers

Summary of Contents for MCC iPort/AFM MIIC-203

  • Page 1 User’s Guide !479 ,12 RS-232 to I C Host Adapter with ASCII Fast Mode Interface with iPort Utility Pack for Windows www.mcc-us.com...
  • Page 2 I C Bus. This user’s guide describes the installation and operation of the iPort/AFM (#MIIC-203) RS-232 to I Host Adapter with ASCII Fast Mode Interface and iPort Utility Pack Software for Windows. MCC products are licensed to use the I²C Bus.
  • Page 3: Part

    Copyright© 2002 by Micro Computer Control Corporation. All rights reserved. No part of this publication may be reproduced by any means without the prior written permission of Micro Computer Control Corporation, PO Box 275, Hopewell, New Jersey 08525 USA. DISCLAIMER: Micro Computer Control Corporation makes no representations or warranties with respect to the contents hereof and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose.
  • Page 4: Table Of Contents

    Table of Contents: Part 1 RS-232 to I C Host Adapter w/ASCII Fast Mode Interface Overview ............. . 8 iPort/AFM Adapter .
  • Page 5 Master Operations ..........26 To Master Transmit Data .
  • Page 6 iNterrupt Signal Assert ......... 46 iNterrupt Signal Release .
  • Page 7: Rs-232 To I C Host Adapter W/Ascii Fast Mode Interface

    Part 1 Model MIIC-203 RS-232 to I C Host Adapter w/ASCII Fast Mode Interface Model MIIC-203...
  • Page 8: Overview

    RS-232 to I w/ASCII Fast Mode Interface Overview The MCC iPort/AFM (#MIIC-203) RS-232 to I Fast Mode Interface allows any PC, Host Computer, or Data Terminal with an RS-232 port to become an I receiving I C messages to one or more I PRODUCT FEATURES Turn ANY Computer’s Serial Port into an I...
  • Page 9: Packing Slip

    Packing Slip This package includes the following items: • iPort/AFM (#MIIC-203) RS-232 to I Interface. • 4 Foot I C Interface Cable. (#CAB4) • 1Ft. /INT-Trigger Cable (#AXM-12G) • Serial Port Cable, 9F/25M, 1 Foot Long. (#C9F25M1) • 1Ft. /INT-Trigger Cable (#AXM-12G) •...
  • Page 10: Serial Port Pinout

    DB-25 Serial Port Pinout DB-25 Pin 2, Transmit Data from the Host Computer to the iPort DB-25 Pin 3, Receive Data from the iPort to the Host Computer. DB-25 Pin 4, Request to Send from the Host Computer to iPort. DB-25 Pin 5, Clear to Send from the iPort to the Host Computer.
  • Page 11: I 2 C Interface Connector

    3. I C Interface Connector The iPort/AFM Host Adapter includes a four wire, positive locking, modular connector (see Appendix A for more info on these parts) for interfacing to an external I C Bus. Lines provided include I C Clock (SCL), Data (SDA), Ground, and +5VDC.
  • Page 12: Hardware Configuration

    2. Use external SMBus rated (approx. 15k ohm) pull-up resistors. Hardware Set-Up 1. Attach your iPort/AFM (#MIIC-203) to an open ComPort on your computer. If your ComPort has a DB9 connector, use DB-9F to DB-25M Serial Port Adapter Cable included with your iPort/AFM to connect.
  • Page 13: Part

    Part 2 iPort Utility Pack for Windows...
  • Page 14: Introduction To Utility Pack

    iPort Utility Pack for Windows 1. Introduction to Utility Pack This product includes two (2) Windows applications (Message Manager and Message Center) that help a user get started sending and receiving I C Bus messages quickly. iPort Message Center The iPort Message Center operates with all versions of the iPort I C Bus Host Adapter.
  • Page 15: Iport Message Manager

    iPort Message Manager The Message Manager operates with all versions of the iPort I C Bus Host Adapter. Using this program you can perform all four (4) modes of I C Bus messages activity, including: • Master Transmit • Master Receive •...
  • Page 16: System Requirements

    One of the following: 1. iPort (#MIIC-201) Windows to I 2. iPort/AI (#MIIC-202) RS-232 to I Interface 3. iPort/AFM (#MIIC-203) RS-232 to I Fast Mode Interface. b. Windows 95 or higher c. 1 free RS-232 Serial Port. 3. Software Installation Windows 95 and Above: 1.
  • Page 17: Introduction To Message Center

    iPort Message Center for Windows Introduction to Message Center The iPort Message Center supports I C Master Transmit and Receive activities for all versions of the iPort I C Bus Host Adapter. With this program you can create, save, and execute scripts of I C Master messages.
  • Page 18: I 2 C Message Operations

    C Message Operations In order to communicate with another I C device, a user must take the following steps: 1. Start Programs iPort Utility Pack iPort Message Center 2. Select which device you are operating with by choosing the corresponding image (Opening Screen), or the correct checkbox on the main application.
  • Page 19 3. Select the PC ComPort where the iPort is connected to your computer. 4. Use the Options menu to override default Baud Rate and I rate settings. 5. Establish a link to the iPort with the Open button. The iPort Message Center software sets the iPort’s own I 6.
  • Page 20 You can insert a new message between existing messages by clicking once on message below where you want to insert, press the “Insert” button on your keyboard, this will bring up the I information and click OK. 7. On the main screen, click on Send to transmit the current list of I Master messages, with the option to auto repeat upon completion, or send on INT assert (low).
  • Page 21: Introduction To Message Manager

    iPort Message Manager Software for Windows Introduction to Message Manager The MCC iPort Message Manager Software, when used in conjunction with an MCC iPort allows a PC to become an I C Master or Slave device, transmitting or receiving I C messages between the PC and one or more I devices across an I C Bus.
  • Page 22: I 2 C Message Operations

    C Message Operations In order to communicate with another I following steps: 1. Starting the program: Start Programs iPort Utility Pack 2. Select iPort Device Select which device you are operating with by choosing the corresponding image (Opening Screen), or the correct checkbox on the main application.
  • Page 23: Basic Set-Up

    Basic Set Up Screen Basic Set-up Select the PC ComPort attached to your iPort and the baud rate, then click OK. The Communications Events window on the Main Screen should report “I C Open Successful”. If this message does not appear, check the iPort connections and power.
  • Page 24: Advanced Set-Up

    Advanced Set-up On the Advanced Set-up screen you can set the following parameters: 1. iPort I2C Slave Address Select iPort’s I C slave address. iPort will acknowledge messages sent to this address. 2 .iPort General Call Enabled allows iPort to respond to the I General call is used to broadcast an I 3.
  • Page 25: Diagnostic Set-Up

    Diagnostic Set-up (iPort Only) On the Diagnostic Set-up screen you can set the following parameters: 1. iPort Log File Level Select iPort logging level.1 gives minimal info, 4 is verbose. Use the log file to troubleshoot communication problems. 2. Log File Name iPort log file name if enabled.
  • Page 26: Sending Messages

    Sending Messages Master Operations 1. To Master Transmit Data On the main screen, set the Master Tx Message Bytes edit box to the data you want to send by single clicking on the box. For example: To send a 0x05(hexadecimal) to the device, enter ~05 in the edit box. Click Ok and then the Master TX button to send the message.
  • Page 27: To Master Receive Data

    2. To Master Receive Data On the main screen, use the I C Destination Address list control to set the slave address of the device you want to communicate with. Main Application Screen On the lower part of the main screen, set the Bytes to MasterRx edit box to the number of bytes you want to read.
  • Page 28: Slave Operations

    Slave Operations To Slave Transmit a message: Enter data to be transmitted in the Slave Tx Message Bytes control by single clicking. Binary data bytes are entered using a three character Hex-Equivalent format (~00 ... ~FF), you may also type in ASCII text. These bytes are automatically transmitted when a Slave Transmit Request is received from a Master device.
  • Page 29: Programmer's Reference

    Part 3 Programmer’s Reference ASCII Command Interface Definitions...
  • Page 30: Quick Start

    Follow these steps to start sending and receiving I 1. Install iPort/AFM as directed in the “Installation Instructions” section of this User’s Guide. 2. Use a terminal emulator program (like the Windows Terminal Program or Windows Hyperterminal) to get started. Remember to select the correct Com Port (COM1, COM2,…) and set the terminal emulator to 19200 Baud, 8 Data Bits, No Parity, and 1 Stop Bit.
  • Page 31: Ascii Command Interface Definitions

    Note: [CR] = Carriage Return Code or Enter Key. Syntax: [Select], (Optional), xx = [00..FE], n = [0..32767] Command Description Ctrl/R,Ctrl/R,Ctrl/R iPort/AFM Reset This command resets the iPort/AFM to its default state. //[CR] Status Display Display iPort/AFM status information. /B[0|1|2][CR] RS-232 Baud Rate Control Set the RS-232 Baud rate (0 = 19.2, 1 = 57.6, 2 = 115.2 Baud) Close I...
  • Page 32: Synchronous Interface Events

    /N( [0|1|A|R] )[CR] iNterrupt Signal Monitor/Control/Status Sets Monitor/Control/Status of INT line. [0 = Disable, 1 = Enable, A = Assert, R = Release/CR=Status] /O[CR] Open I Activates iPort/AFM as an I /(*)Rn[CR] Master Read Message Read the specified number of data bytes from the current Destination I Slave device.
  • Page 33: Status Display

    Command: Ctrl/R,Ctrl/R,Ctrl/R ‘iPort Reset Response. * Default Setting: Status Display This command displays current iPort/AFM status. Command: //[CR] 'Status Display Response: iPort/AFM I C Host Adapter w/ASCII Fast Mode Interface Vxx.xx Copyright © xxxx, Micro Computer Control Corp. Visit our Web Site at: http://www.mcc-us.com RS-232 Baud Rate (19.2KHz) Destination I C Slave Address (4EH)
  • Page 34: Close I 2 C Connection

    Close I C Connection This command disconnects iPort/AFM from the I Command: /C[CR] Response: /CCC[CR] Default Setting: Set Destination I C Slave Address This command sets the destination I subsequent Master Transmit or Receive operation. Command: /Dxx[CR] Response 1: * Response 2: /I89[CR] Default Setting: 00 Echo/Prompt Control...
  • Page 35: I 2 C General Call Control

    The RTS/CTS protocol uses two additional wires in the cable connecting communicating devices. The RTS wire is an output signal. It indicates that the device generating the signal has buffer space available, and can receive. The CTS wire is an input signal. It indicates that the other device has buffer space available, and can receive.
  • Page 36: Slave Address

    Command: /H[0|1][CR] Response: * Default Setting: Set iPort/AFM’s Own I This command sets iPort/AFM's own I C messages to this address will cause iPort/AFM to become an active Slave device on the bus. Command: /Ixx[CR] Response 1: * Response 2: /I89[CR] Default Setting: 6E C Bus Clock Rate Control Set the I...
  • Page 37: Set Destination I 2 C Slave Address

    Status Display /B[0|1|2] RS-232 Baud Rate Control (0=19.2, 1=57.6, 2=115.2KHz) Close I2C Connection /Dxx Set Destination I2C Slave Address /E[0|1] Echo/Prompt Control (0=Disable, 1=Enable) /F[0|1] Flow Control (0=XON/XOFF, 1=RTS/CTS) /G[0|1] General Call Control (0=Disable, 1=Enable) /H[0|1] Hex Only Display Control (0=Disable, 1=Enable) /Ixx Set iPort/AFM’s Own I2C Slave Address /K[0|1|2|3]...
  • Page 38: Master Read Message

    Master Read Message This command causes iPort/AFM to read the specified number of data bytes from the currently selected Destination I C Stop condition after the last byte is received. Enter Byte Count (Decimal 0...32767) then Press Enter, or ESCape to Cancel. A Byte Count of Zero (0) represents a Variable Length message, where the first byte read from the I C Slave device indicates the number of additional trailing bytes are...
  • Page 39: Slave Transmit Message

    Slave Transmit Message This command should be issued to iPort/AFM in response to a Slave Transmit Request (/STR). This command causes iPort/AFM to write the specified data bytes to the requesting I C Master Receiver device. Enter Message Bytes (1 or more Printable ASCII or Hex-equivalent ~00..~FF), then Press Enter, or ESCape to Cancel.
  • Page 40: Master Transmit Message

    /Sab~7Ecd[CR] ‘Tilde embedded in ASCII Printable characters /S12~0D24[CR] ‘Carriage Return embedded in ASCII Printable characters Master Transmit Message This command causes iPort/AFM to write the specified data bytes to the currently selected Destination I C Slave Address with or without generating an I condition after the last byte is transmitted.
  • Page 41: Set I 2 C Bus Time Out In Msec

    Default Setting: Examples: /Tabcd1234[CR] ‘ASCII Printable characters "abcd1234" /T~00~01~02[CR] ‘Binary data bytes 00, 01,02 /*T~00~01~02[CR] ‘Binary data bytes 00, 01,02 with No Stop /Tab~7Ecd[CR] ‘Tilde embedded in ASCII Printable characters /T12~0D24[CR] ‘Carriage Return embedded in ASCII Printable characters Set I C Bus Time-oUt in msec Set bus time-out in msec (0=disable) The iPort/AFM reports a bus time-out if no bus activity for the specified time occurs...
  • Page 42 Command: /X[S|~xx|R|r|P|0|1|?|D|d|C|c|L|A| |"]..., then Press Enter or ESCape Enter /X followed by zero or more sub-commands, the [CR] Response: /XCC(see commands below)[CR] High Level Sub-Commands: S = Send Start ~xx = Send Byte (xx = 00...FF)(response = A or N) R = Read Byte with Ack (response = ~xx) r = Read Byte with Nak (response = ~xx) P = Send Stop...
  • Page 43 Mid Level Response: /XCC0000[CR] Low Level Command:/X dc dCcDCcdCcdCcDCcDCcDCcdCc DCAc dCcdCcdCcdCcdCcdCcdCcDCc DCAcdCcdCcdCcdCcdCcdCcDCcdCc DCAc dCcdCcdCcdCcdCcdCcdCcDCc DCAc dCD[CR] Low Level Response: /XCC0000[CR] Master read three bytes from slave address 0x4F. First two bytes are acknowledged by master. Command: /X S ~4f Rrr P [CR] Response: /XCCA~xx~xx~xx[CR] Master transmit a Write WCR command to a Xicor X9241 at slave address 0x50.
  • Page 44: Display Tx Byte Count

    Display Tx bYte Count (requires V2.00+) Returns the number of bytes received by the slave device in the last master transmit message. Command: /Y[CR] Response: /TBCn[CR] 'Tx bYte Count 'n =00000...32767...
  • Page 45: Asynchronous Interface Events

    Asynchronous Interface Events Asynchronous Events are those iPort/AFM interface activities initiated by the iPort/AFM I C Host Adapter in response to activities on the I Slave Transmit Request This event is caused by the reception of an I at the current iPort/AFM’s own Slave address. Prompt: /STR[CR] Command: /Stext[CR] The normal Host computer response is to send a Slave Transmit Text (/Stext[CR])
  • Page 46: I 2 C Bus Time-Out Detected

    The received text is a representation of the data bytes within the Slave Receive message. The format of this data is controlled by the current setting of the Hex Only Display Control . Prompt: /GRCtext[CR] Command: C Bus Time-out Detected Prompt: /I85[CR] Cause: iPort/AFM issues this response when an I 1 second.
  • Page 47: Iport/Afm Prompts

    iPort/AFM Prompts iPort/AFM Prompts are messages generated by iPort/AFM in response to Host computer commands. iPort/AFM Ready Prompt: * Cause: iPort/AFM is ready for the next Host command. Slave Not Acknowledging Prompt: /SNA[CR] Cause: There is no response (I Transmit or Receive operation from an I C Address.
  • Page 48: Iport/Afm Connection Closed

    iPort/AFM Connection Closed Prompt: /I88[CR] Cause: Host is attempting to perform an I iPort/AFM Connection is Closed. The Host should issue an Open I command before attempting to perform I Invalid Command Argument Prompt: /I89[CR] Cause: This event normally indicates the value of a Host command argument was out of range.
  • Page 49: Example Code

    Example Code The following examples are written in MS Visual Basic V3 for Windows using the serial communications control (MSCOMM.VBX). It can be used as a guide in implementing iPort/AFM interface programs in other programming languages and operating environments. Note: This example code is available online at: http://www.mcc-us.com/202ug.htm#ExampleCode. iPort/AFM Reset Comm1.Output = Chr$(18) Comm1.Output = Chr$(18)
  • Page 50 If Msg$ = Chr$(13) Then Msg$ = "" If Msg$ = Chr$(10) Then Msg$ = "" If Msg$ = "*" Then Msg$ = "****" CharIn$ = Chr$(13) End If LineBuf$ = LineBuf$ + Msg$ If CharIn$ = Chr$(13) Then iPortResp$ = Left$(LineBuf$, 4) ' Test for iPort/AFM Synchronous Interface Events If (StrComp(iPortResp$, "/OCC") = 0) Then ' Open Connection Complete Processing...
  • Page 51 ElseIf (StrComp(iPortResp$, "/BC2") = 0) Then ' iPort/AFM Baud Change 2 {115.2K} TextBox.Text = "iPort/AFM Baud Change 0 {115.2K} " ' Test for iPort/AFM Asynchronous Interface Events ElseIf (StrComp(iPortResp$, "/SRC") = 0) Then ' Slave Rx Complete Processing TextBox.Text = LineBuf$ ElseIf (StrComp(iPortResp$, "/GRC") = 0) Then ' General Call Rx Complete Processing TextBox.Text = LineBuf$...
  • Page 52 TextBox.Text = "/I83 Arbitration Loss" 'Update Display ElseIf (StrComp(iPortResp$, "/I84") = 0) Then TextBox.Text = "/I84 I2C Bus Error Detected" ElseIf (StrComp(iPortResp$, "/I85") = 0) Then TextBox.Text = "/I85 I2C Bus Time-out Detected" ElseIf (StrComp(iPortResp$, "/I88") = 0) Then TextBox.Text = "/I88 iPort/AFM Connection Closed" ElseIf (StrComp(iPortResp$, "/I89") = 0) Then TextBox.Text = "/I89 Invalid Command Argument"...
  • Page 53: Iport/Afm Revision Report

    iPort/AFM Revision Report This section defines revisions and changes made to the iPort/AFM interface: Revision: 1.02 Initial Release Revision: 2.00 1. Add Firmware Version Command. 2. Add eXtended Commands. 3. Add Tx bYte Count Command. Additional Information For additional information on the I C Bus, please refer to the following: “The I C and How to Use It”...
  • Page 54: Software License Agreement

    Software License Agreement BY INSTALLING THIS SOFTWARE, YOU ARE AGREEING TO BECOME BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, PROMPTLY RETURN THE ENTIRE PRODUCT WITHIN 7 DAYS WITH ALL ITS CONTENTS TO THE PLACE OF PURCHASE, WITH A NOTE THAT YOU RETAIN NO COPIES OF THE SOFTWARE OR PRINTED MATERIALS, FOR A FULL REFUND.
  • Page 55: Limitation Of Remedies And Damages

    implied, included but not limited to the implied warranties of merchantability and fitness for a particular purpose. The Purchaser assumes entire risk as it applies to the quality and performance of the Software. Should the Software prove defective, the Purchaser (and not MCC, authorized MCC distributors, or dealers) assume the entire cost of all necessary servicing, repair or correction.
  • Page 56: Appendix A

    Interface Connector and Plug Information MCC uses two (2) different connectors and plug assemblies. These parts are all compatible with one another and are interchangeable. Connectors Molex SEMCONN ACCESS.bus Receptacle Connector AMP SDL (Shielded Data Link) Connectors for ACCESS.bus Plugs Molex SEMCONN ACCESS.bus Plug AMP SDL (Shielded Data Link) Plug for ACCESS.bus Additional Cables Available...

Table of Contents