Home
        User`s Manual - ICP DAS USA`s I
         Contents
1.     void ClearStatus void       Parameter     None      Return     None    O Relative function     3 1 11 GetStatus    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         371    3 1 13 L1Off    e Description   Turn the L1 LED off  About the position of L1 LED  please refer to the    figure 2 1 in the section 2 1       Syntax     void L1Off void       Parameter     None      Return     None      Relative function     3 1 16 L10n    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         381    3 1 14 L2Off    e Description   Turn the L2 LED off  About the position of L2 LED  please refer to the    figure 2 1 in the section 2 1       Syntax     void L2Off void       Parameter     None      Return     None      Relative function     3 1 17 L2On    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         391    3 1 15 L3Off    e Description   Turn the L3 LED off  About the position of L3 LED  please refer to the    figure 2 1 in the section 2 1       Syntax     void L3Off void       Parameter     None      Return     None      Relative function     3 1 18 L30On    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         401    3 1 16 L10n    e Description   Turn the L1 LED on  About the position of L1 LED  please refer to the    figure 2 1 in the section 2 1       Syntax     void L1On void       Parameter     None      Return     None      Relative function     3 1 13 L1Off    1 7188XBD CAN uPAC 7186EXD
2.   Afterwards  click    More       to set the    Floating  point    and    Instruction Set    parameters  the Emulation and 80186 will  be used respectively  Then  click OK to save the configuration          Jindow Help    Full menus On    Optimizations     aa SS  Messages     Names                  efines     en         Belt    Floating Point Calling Convention    Instruction Set  ebug info in OBJs     gt  a ERR    Steps  Click the    Option Debugger       to set the    Source Debugging    parameter   Here  select the    None    for the    Source Debugging    parameter        Window Help  On             Full menus    Compiler  Transfer     Make       bech              A AAA         CS       Display Swappin  See cra Heap Size    K bytes    Inspectors       I  LOOADI UAIN  UPA    LOULALDIT WAN USUL LUalnual  VOL  L UL  ivmarca 8 2007  ES 521    Step9  Click the  Option Directories     to set the    Output Directory    parameter   Here  set the    C  MyDemo    for the    Output Directory    parameter         Compiler   ransfer     Make    _nclude Directories    _ibrary Directories       Step10  After finishing all the parameters setting  click the  Compile build all    to  produce the execution file named    AC_AM exe     If users use the  AC_AM c  the program   include       lib 7188xbl lib    and  include      MibAxc1001 lib     need do modify to  include      lib 7188xbl lib    and   include      lib xc100I lib         to OBJ  EXE file       1 7188XBD CAN uPAC 7186EXD CAN use
3.   OK  CAN_ResetError  Reseting the CAN controller is fail   CAN_SetACRError  Setting the AccCode register is fail    CAN_SetAMRError  Setting the AccCode register is fail      Relative function     3 1 2  XC100Init    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         27       3 1 5 CAN_Installlrq      Description   Set the interrupt function enable  Afterwards  the CPU of l 7188 series  embedded controller can receive the interrupt signal from CAN    controller       syntax     void CAN_Installlrq void       Parameter     None      Return     None    O Relative function     3 1 6 CAN_Removelrq    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         281    3 1 6 CAN_Removelrq    e Description   Disable the interrupt function  Afterwards  the CPU of l 7188 series  embedded controller can t receive the interrupt signal from CAN    controller       syntax     void CAN_Removelrq void       Parameter     None    O Return     None    O Relative function     3 1 5 CAN Installirq    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         29     3 1 7 CAN_Resotre    e Description   Set the interrupt function disable  release all software buffer  and reset  CAN chip  This function must be called to release resource before the    program is terminated       syntax     void CAN_Restore void       Parameter     None      Return     None    O Relative function     None    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  
4.   Reseting the CAN controller is fail   CAN_ConfigError  Confuguring the CAN controller register is fail   CAN_SetACRError  Setting the AccCode register is fail  CAN_SetAMRError  Setting the AccCode register is fail  CAN_NotEnoughMemory  Create a reception transmission software   buffer for CAN messages are fail    CAN_TypeOf7188Error  The type of the 7188 is not defined of this    library       Relative function     None    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         25     3 1 3 SetCANBaud      Description   This function is used to change the CAN baud after calling XC100init    function       Syntax     int SetCANBaud unsigned long CANBaud  char BTO  char BT1     O Parameter   CANBaud  BTO  BT1  Please refer to the parameters description in the    XC100Init function in section 3 1 2     O Return   CAN NoError  OK  CAN BaudNotSupport  This baud rate is not supported   CAN ResetError  CAN controller can t enter the reset mode  So  all    parameters can t be set normally       Relative function     3 1 2  XC100Init    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         261    3 1 4 SetCANMask      Description   This function is used to change the CAN message filter after using    XC100init function       Syntax     int SetCANMask unsigned long AccCode  unsigned long AccMask       Parameter   AccCode  AccMask  Please refer to the parameters description in the    XC100Init function in section 3 1 2     O Return   CAN_NoError
5.  CAN user manual  ver 1 01  March 8 2007         41     3 1 17 L2On    e Description   Turn the L2 LED on  About the position of L2 LED  please refer to the    figure 2 1 in the section 2 1       Syntax     void L2On void       Parameter     None      Return     None      Relative function     3 1 14 L2Off    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         421    3 1 18 L3On    e Description   Turn the L3 LED on  About the position of L3 LED  please refer to the    figure 2 1 in the section 2 1       Syntax     void L3On void       Parameter     None      Return     None      Relative function     3 1 15 L3Off    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         431    3 1 19 UserCANint      Description   This function is created by users and is used to program the CAN  interrupt service routine by users  The parameter CANINT is passed  automatically when the interrupt functions are triggered  It indicates  what kinds of CAN controller interrupt are active  Therefore  users only  need to design their interrupt routine according to dealing with different  interrupt functions  If it is not used  please reverse this function in the  users     C file for avoiding the complier error  The following figure is the  general concept of the function UserCANInt    sequence    When interrupts are  triggered  the interrupt  routine will be inplemented                The types of interrupt  function are passed into the  function Userlnterr
6.  about the CANReg value meaning  please  refer to the following table        Description       Bus status  1 for bus off  O for bus on        Error status  1 for at least one error  0 for OK        Transmit status  1 for transmitting  O for idle        Receive status  1 for receiving  O for idle        Transmit complete status  1 for complete  0 for incomplete        Transmit buffer status  1 for released  O for locked       Data overrun status  1 for reception buffer overrun  O for OK              Receive buffer status  1 for at least one message stored in the  reception buffer  O for empty             OverflowFlag  CAN reception and transmission overflow flag information    For the information about the OverflowFlag value  meaning  please refer to the following table        Bit NO     Description       Others    Reserved       1    1 for reception softvvare buffer overflovv  O for normal           0  LSB           1 for transmission software buffer overflow  0 for normal          Return     None      Relative function     3 1 12 ClearStatus    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         361    3 1 12 ClearStatus    e Description   This function is used for cleaning the CAN reception or transmission  software buffer overflow flag  When one of these two buffers is full  the  corresponding overflow flag will be set to 1  In this case  users need to  use this function to clear the overflow flag to acknowledge the error    information       syntax 
7.  interrupt functions failure       15 CAN RemovelrgFailure    Disable interrupt functions failure       16 CAN Transmitincomplete    Data can t be transmitted successfully       17 CAN_TransmitBufferLocked    Previously transmission is no  completed yet       18 CAN ReceiveBufferEmpty    No message is stored in the receiv    buffer now       19 CAN DataOverrun    Data vvas lost because there vvas no    enough space in softvvare receive buffe       20 CAN ReceiveError    Receive data is not completed       21 CAN SoftBufferisFull    Software transmit buffer is full       22 CAN SoftBufferisEmpty    There is no message stored in th    user declared softvvare buffer       23 CAN BaudNotSupport    This Baud Rate is not supported       24 CAN DataLengthError    Data length doesn t match the total data  bytes       25 CAN NotEnough Memory    There is not enough memory space t  create the reception or transmission  software buffer        26 CAN TypeOf 188Error          The type of 7188 is not defined by thi  library       1 7188XBD CAN uPAC 7186EXD CAN user manual  ver  1 01  March 8 2007         461    4 Demo Programs    The following architecture is shown in the I 7188XBD CAN folder       Amanual      l 7188XBD CAN OS image       LIB100      BCPP31      AC_AM      All_ Demo      L1_L2_L3      RxInt      RxPoll      TxInt      TxPoll      Userint      TCPP31      AC_AM      All_ Demo      L1_L2_L3      RxInt      RxPoll      TxInt      TxPoll      UserInt      MSC      AC_AM      A
8.  is 1200  or between 1080 1320   The length related resistance should have  70 mQ m  The user should check the resistances of CAN bus  before install a    new CAN network   Device 1 Device 2 Device N        1202  O02     CAN L    Moreover  in order to minimize the voltage drop on long distance  the  terminal resistance should be higher than the value defined in the ISO 11898 2   The following table could be a reference                                   Bus Cable Parameters  Bus Length Terminal  el gi one Cross Section is de   mQ m   Type   0 40 70 0 25 23AWG   124  0 1    0 34mm Y22AWG   40 300  lt  60 0 34 22AWG   127  0 1    0 6mm7 20AWG   300 600  lt  40 0 5 0 6mm  150 300   20AWG   600 1K  lt  20 0 75 0 mm  150 300   18AWG           1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         11     The CAN bus bard rate has the high relationship with the bus length  The  following table indicates the corresponding bus length on every kind of baud                         rate   Baud rate  bit s  Max  Bus length  m    1M 25   800 K 50   500 K 100   250 K 250   125K 500   50 K 1000   20 K 2500   10K 5000                Note  When the bus length is greater than 1000m  the    bridge or repeater devices may be needed     1 7188XBD CAN uPAC 7186EXD CAN user manual  ver  1 01  March 8 2007         12     2 4 Terminal Resistor Jumper Selection    Remove the cover of the 1  188XBD CAN uPAC  186EXD CAN  users  can see the part of internal structure shown as following 
9.  value Meaning       0 This CAN message is not a remote  transmit request message        1 This CAN message is a remote  transmit request message                 DataLen  The pure data length of a CAN messages  The range of this  value is 0 8    Data  Store the data of CAN message  The numbers of data bytes    need to match with the  DataLen      1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         32       Return   CAN_NoError  OK  CAN_DataLengthError  CAN message data length is over 8   CAN_TransmitBufferLocked  CAN controller transmit buffer is locked   CAN Transmitincomplete  CAN controller can t send the message    successfully       Relative function     3 1 2 XC100lnit    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         331    3 1 10 GetCANMsg    e Description   Receive CAN messages from receive buffer or from CAN bus directly  If  the receive interrupt is set to enable in IntMode parameter of XC100Init  function  This function will read back the CAN message stored in the  software receive buffer  If the receive interrupt is disable  this function  uses the polling method to check if there is any CAN message in CAN    chip buffer  If yes  return the CAN message       syntax   int GetCANMsg unsigned char  Mode  unsigned long  MsglD    Unsigned char  RTR  unsigned char  DataLen    Unsigned char  Data  unsigned long  UpperTime      Unsigned long  LowerTime       Parameter    Mode  This parameter is used for get the ID type  
10. 1 7188XBD CAN uPAC  186EXD CAN    User Manual    Warranty   All products manufactured by ICP DAS are warranted  against defective materials for a period of one year from  the date of delivery to the original purchaser     Warning   ICP DAS assume no liability for damages consequent  to the use of this product  ICP DAS reserves the right to  change this manual at any time without notice  The  information furnished by ICP DAS is believed to be  accurate and reliable  However  no responsibility is  assumed by ICP DAS for its use  or for any infringements  of patents or other rights of third parties resulting from its  use     Copyright  Copyright 2006 by ICP DAS  All rights are reserved     Trademark    The names used for identification only maybe    registered trademarks of their respective companies     1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         14    Tables of Content    1    4    d e Le te d EE 4  14  e TE 4  1 2 Hardware Features a dni 6  1 3 Hardware Specifications scener 7  Hardware Configuration KEREN ENNEN 9  2 1 1 7188XBD CAN Hardware Structure scenerne 9  2 2 uPAC 71186EXD CAN Hardware Structure scener 10  2 3 CAN Network Wire Connection seeren 11  2 4 Terminal Resistor Jumper Selection            cccccccccceeeeeseeeeeeeeeeeeees 13  2 5 Wiring Diagram For Different Application                      22222222222e 14  2 5 1 Program download    seen 14  2 5 2 General application REENEN 14  2 5 3 1 7188XBD CAN DI  amp  DO channel wiring diagr
11. 10 30VDC  PC COM Port PC COM Port    2 5 2 General application    The following figure shows the wiring diagram for general application   When the COM1 of l 7188XBD CAN is used  sending data to COM1 will  transmit the data both on RS 232 and RS 485 port  One of the RS 232 and  RS 485 port receives the data  these data will be obtained by COM1 of the  l 7188XBD CAN  Therefore  it is not recommend using both RS 232 and  RS 485 functions of COM1 at the same time  If users select the RS 232  function of COM1  the RTS1 and CTS1 pins are not always necessary  It is  need to check if the connection target machine uses 3 line RS 232  communication or 5 line RS 232 communication     I 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         14     CAN CAN CAN CAN  Network Network Network Network    SLL    w w w  51    SLL       RESERVI  CAN    RESER  CAN  RESERVI       COM1 COM2        GND   GND  10 30VDC 10 30VDC    Network  RS 485 Ethernet   Network2 Internet  Network  RS 232 Intranet RS 232  Device Device    Moreover  in order to wire conveniently  the 1 7188XBD CAN   UPAC 7186EXD CAN provides not only one CAN port  but also another  bypass CAN port  There two CAN ports are the same one  The bypass CAN  port is just for wiring with another CAN device conveniently  it doesn t have any  other function             X   RESERVE    X   RESERVE    X   RESERVE    CAN L  CAN H  CAN L   X   RESERVE  CAN H    X   RESERVE  X   RESERVE    JP3    1200    1 7188XBD CAN uPAC 7186EX
12. 11 bit or 29 bit ID  of  a CAN message    MsglD  This is for obtaining the ID of a CAN message    RTR  This is for obtaining the RTR of a CAN message     RTR value Meaning    0 This CAN message is not a remote  transmit request message     1 This CAN message is a remote  transmit request messaae      DataLen  This is for obtaining the data length of a CAN message     1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         341     Data  This is for obtaining the Data of a CAN message  The Data buffer   size must be 8 bytes     UpperTime  Get the time stamp of a CAN message  The time stamp  unit is us  micro second   This parameter only show the  upper part of time stamp    Real time stamp   upper part   0x100000000UL lower part     LowerTime  Get the lower part of time stamp of a CAN message       Return   CAN_NoError  OK  CAN_ReceiveBufferEmpty  No message is in the CAN receive buffer   CAN_SoftBufferlsEmpty  No message is in the software receive buffer   CAN_DataLengthError  The Data length of received message is over    than 8       Relative function     3 1 2 XC100lnit    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         354    3 1 11 GetStatus    e Description     Read the CAN controller status and software buffer overflow flag    message       Syntax     void GetStatus unsigned char  CANReg  unsigned char  OverflowFlag       Parameter       CANReg  The pointer for obtain the current CAN controller status  For    the information
13. CAN and uPAC 7186EXD CAN functions can refer to the    following on line help      For on line help     Napdos  MiniOS7 doc eng index htm  For English   Napdos  MiniOS7 doc gb2312 index htm  For Simple Chinese   Napdos  MiniOS7 doc big5 index htm  For Transitional Chinese     For demos    Napdos 7188x minios7 7188xb demo  For   7188XBD CAN    Napdos 7188e MiniOS7 demo  For uPAC 7186EXD CAN    Napdos 7188e Tcp Demo  For uPAC 7186EXD CAN    Napdos 7188e Udp Other  For uPAC 7186EXD CAN   1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         182    3 1 Library Function Definition and Description    The functions of XC100 library file are presented in the following table  They  are provided to help users construct their characteristic CAN device  For the  detail information of each function  please refer to the following sub section     Function definition Description  CAN Reset CAN controller hardware reset          XC100Init Initialize the XC100 hardware  SetCANBaud Change CAN baud   SetCANMask Change CAN message filter   CAN Installirq Enable the embedded controller interrupt  CAN Removelrq Disable the embedded controller interrupt                   Release the resource and disable the  CAN  Restore embed controller interrupt       Change the reception and transmission  CAN_CreateBuffer butter sisas    SendCANMsg Send a CAN message to the CAN network    GetCANMsg Receive a CAN message    Obtain the CAN controller status and  reception transmission buffer st
14. D CAN user manual  ver 1 01  March 8 2007         151    2 5 3 1 7188XBD CAN DI  amp  DO channel wiring diagram    The general wire connection methods for DI channel of 1 7188XBD CAN  are shown below     1 7188XBD CAN 1 7188XBD CAN          Logic Hihg Logic Low       Dry Contact Signal Input TTL CMOS Signal Input    1 7188XBD CAN                Open Collector Signal Input    The DO channel of   7188XBD CAN wire connection is shown below     1 7188XBD CAN                   16        3 XC100 Library    The XC 100 library file  XC 100L lib  is useful to help user design various CAN  devices  Here  the library for TC  BC and MSC is provided to receive CAN  messages  transmit CAN messages  and configure the CAN controller  This  section will show you what they have and how to use them  For developing a  program  the figure 3 1 and 3 2 may be a reference  The XC100L lib is only  used for the XC100 hardware  and is for Large Mode of the C C   compiler   For the step by step information about the program procedure  please refer to  the section 4 1     Create a project file  Then  Include the XC100L lib and  7188XBL lib 7186EL lib into this project     Program the C code  saveitasa     c    or    cpp    file   and include this source file into the project file     Set the compiler parameter to the large mode  and compile  this project  Then  a execution file will be produced     Download the execution file into 1 7188XBD CAN   1 PAC 7186EXD CAN by using the 7188xw exe software        
15. E    Address    e Ci             System Tasks    mA Hide the contents of  this drive    TH Add or remove LIMSOCache  programs   MATLABSpS    y Search for files or MABRY  folders  5  ISAWIN   5  Inetpub   ican  v lt      My Installations    File and Folder Tasks A       Step2  Copy the lib folder from the TCPP101 lib100 folder  which has the  library files  XC100L lib and 1 7188XBL lib  Then  modify the name of     lib100    folder to the    lib    Copy users program in to the MyDemo folder   too     File Edit view Favorites     28         Back   ki A Y d DER     Address e C  MyDemo vl Go Edit View Favorites Tools Help e       gt     Back    3 bi A    Search    s   ED C 11 7188XBD CANYTCPP101 Y Go  AC AM C 4 EI TxPoll   C Source  5  UserInt   3 KB  jRxPoll   ED TxInt                                      1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         49      gt   IQ  A    d    i Do    a  2 HE       NANG 2       een    3  Mi Ge ada z  o ooj   o    aS 3   i i        S Se SE   i 3   E  DK   e   i L 3  j   gt  a A E i    IR    E       YS               i SS        a  e jie    S   a g   o      Cl S  gt  G     E  FO UE   3 JE a   RE    z 2 d  2 AL    al  MM Le 5 pa Io MI  ME    o  2  23509 a  ji 2 o  Dos    35     o O      SE  Mc  2 s      0 lt    d  o OO D  208   Mm EI  sL L   I os    e     K o    E  Bee 5 i  ss ME  eo 2 oT v    RE ks  el A  8      d       Step7  Click the    Options Compiler Code generation       to set the compile  mode to the large mode
16. M  512R bytes  Build in Flash Memory  EEPROM  NVSRAM  Real Time Clock  Built in Watchdog Timer  16 bit Timer    Flash Memory  e 512K bytes    Minimum erase unit is one sector  64K bytes     100 000 erase write cycles    EEPROM  e 16K bytes  64 blocks  each block has 256 bytes     Data retention  gt 100 years    1 000 000 erase write cycles    Real Time Clock  e Year 2000 compliance  e Second  minute  hour  date of the month    Month  year  valid up from 1980 to 2079  e NVSRAM  31 bytes  battery backup  data valid up to 10 years    CAN port  e Philip SJA1000 CAN controller    e Philip 82C250 CAN transceiver  e 1000 voltage protection on CAN side  e 120 terminal resister selected by jumper    16M Hz clock  COM1  e RS 232 or RS 485 Interface    e RS 232  TXD  RXD  RTS  CTS  GND  e Communication speed  115200 Max   e Program download port    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         74    COM2  e RS 485  D2   D2   e Communication speed  115200 Max   e Connect to DCON IO modules    Display  e Programmable 7 segment LEDs  e Programmable 4 LEDs  L1  L2  L3 and round LED     Digital Input  only for 1 7188XBD CAN   e 1 DI channel  e Dry Contact  Logical level 0  closed to GND  Logical level 1  open    Wet contact  Logical level 1 3 5V 30V  Logical level 0  0 1V    Digital Output  only for 1 7188XBD CAN     1DOchannel    100 mA  30V max   e Open collector output    Power Requirement    10 to 30 VDC  non regulated     Power Supply  3 0W    Application En
17. March 8 2007         30     3 1 8 CAN_CreateBuffer      Description   Call this function for changing the reception and transmission software  buffer sizes  lf users don t use this function  the default reception and    transmission software buffer sizes are both 256 records       Syntax     int CAN_CreateBuffer int BufMode  unsigned int BufferSize     O Parameter   BufMode  0 for changing reception software buffer size   Others for changing transmission software buffer     BufferSize  the new buffer sizes for software buffer       Return   CAN_NoError  OK  CAN_NotEnoughMemory  Create a reception transmission software    buffer for CAN messages are fail       Relative function     3 1 2 XC100lnit    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         31     3 1 9 SendCANMsg    e Description   If the transmit buffer is disable  this function will send a message to the  CAN network  However  if the transmit buffer is enable  this function will    send all the messages stored in the transmit buffer to the CAN network       Syntax   int SendCANMsg unsigned char Mode unsigned long MsgID  unsigned  char RTR  unsigned char DataLen     unsigned char  Data       Parameter     Mode  This parameter is used for CAN ID type        Mode value Meaning  0 Send a 11 bit ID CAN message  others Send a 29 bit ID CAN message                      MsgID  The ID of this CAN message  The ID may be a 11 bit value or  29 bit value     RTR  Remote transmits request byte        RTR
18. Run the execution file    Is the result match the your ideal     Yes    OK    Figure3 1 Program procedure    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         17     Project file    C C   language  source code    XC100L lib Compile 4 Link Execution file    7188XBL lib   7186EL lib       Figure3 2 Compile concept    Because this manual is special described for the CAN functions  if users  want to know the other functions and demos of _ the   l 7188XBD CAN UPAC 7186EXD CAN  such as the EEPROM function   7 segment function  flash ram function  real time clock function  watchdog  function  com port function  and so forth   please refer to the  l 7188XB D  I 7188EX D  user manual  Or refer to the on line help on the  7000 7188 8000 CD  In this on line help  users can find a lot of useful  information about MiniOS7 operation commands  the other functions of    7188XBD CAN  pPAC 7186EXD CAN  and the functions of download tool   7188xw exe  MiniOS7 is the operation system of the 1  188XBD CAN   UPAC 7186EXD CAN  It is a dos like operation system  The 7188xw exe is a  download tool  If users want to download users    program into the    7188XBD CAN  yPAC 7186EXD CAN  this tool may be needed  Users can  find the 7188xw exe in the uPAC 7186EXD CAN OS Image folder in CAN CD   It path is    CAN PAC uPAC 7186EXD CAN      Note  1 7188EX D  demos can be used  in the uPAC 7186EXD CAN  Users just need to compile 1 7188EX D  demos again with  7186EL lib  Both 1 7188XBD 
19. am         16  XC 100 Library E 17  3 1 Library Function Definition and Description                               19  3 1 1 CANCReSetai pl 20  3 1 2 NA SEER SEES SEER SEES SEER SEE SS SER SEES SER SES SER SEES SER 21  3 1 3 SetCANBaud ni tics 26  3 1 4 SetCANMAaSk EE 27  3 1 5 CANIS tall E 28  3 1 6 CAN Removelrq 1    scener EDER 29  3 1 7 CAN  RES OE 30  3 1 8 CAN_CreateBuffer css Eee 31  3 1 9 Send ANMSG 4 32  31 10  SGeICANMSG EE 34  SZ Dh WR E TC 36  31 42 Eer Ee 37  SAAB EO EE 38  31014    BA O i i asaba nana bana nana AAA 39  e Ja LA ee 40  3116 LION dla 41  STAT A ES 42  31 18  E 1 O   EE 43  A 44  3 2  Table of Return Code i  Nee 46  Demo e Le si a E E EE E np anggang ee el 47    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver  1 01  March 8 2007         2t    4 1    Program Download Procedure    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         31    1 Introduction    1 1 Overview    The CAN  Controller Area Network  is a serial communication bus especially  suited to interconnect smart devices to build smart systems or sub system  lt  efficiently supports distributed real time control with a very high level of security   In CAN networks  there is no addressing of subscribers or stations in the  conventional sense  but instead prioritized messages are transmitted  As  standalone CAN controller  1 7 188XBD CAN UuPAC   186EXD CAN embedded  controller represents an economic solution  It consists of one XC100 and one  l 7188XBD yPAC 7186EXD  and 
20. atus    Reset the reception and transmission buffer  status    L1Off Turn LEDO off  L2Off Turn LED1 off  L3Off Turn LED2 off  L10n Turn LEDO on  L20n Turn LED1 on  L3On Turn LED2 on  UserCANInt Design user defined interrupt routine  Table3 1 The function list of the XC 100 library file             GetStatus       ClearStatus                                  1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         19     3 1 1 CAN_Reset    e Description   Reset the CAN controller by hardware circuit  After running this function   the CAN controller will be set to initial state  For more information about  this  please refer to the SJA1000 data sheet on the web site     http  www semiconductors philips com pip SJA1000 html datasheet      syntax     void CAN_Reset void       Parameter     None      Return     None    O Relative function     None    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         20     3 1 2 XC100Init    e Description   Initialize the software buffer and XC100 hardware  which includes CAN    controller  L1 LED  L2 LED and L3 LED       Syntax   int XC100Init int TypeOf7188 char IntMode  unsigned long CANBaud   char BTO  char BT1 unsigned long AccCode     unsigned long AccMask       Parameter     TypeOf7188  define what kind of module you use   value TypeOf7188   0 For 1 7188XBD CAN   1 For UPAC 7186EXD CAN                         IntMode  Set the CAN controller interrupt mode  Each bit of IntMode    parameters indicate
21. d AccMask 1  bit7 bit5 bit2   bitO of ID  AccCode 1  and AccMask 1  bit4 RTR  AccCode 1  and AccMask 1  bit3 bitO no use       AccCode 2  and AccMask 2  bit7 bitO    bit7   bitO of 1st byte data          AccCode 3  and AccMask 3  bit7 bitO          bit7   bitO of 2nd byte data       1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         23        For 29 bit ID Message                          Register bits of register Filter Target  AccCode 0  and AccMask 0  bit7 bitO bit28   bit21 of ID  AccCode 1  and AccMask 1  bit7 bitO bit20   bit13 of ID  AccCode 2  and AccMask 2  bit7 bitO bit12   bit5 of ID  AccCode 3  and AccMask 3  bit7 bit3 bit4   bitO of ID  AccCode 3  and AccMask 3  bit2 RTR  AccCode 3  and AccMask 3  bit1 bitO no use                   Note  1  AccCode 0  means the most significant byte of AccCode and  AccCode 3  means the least significant byte of AccCode    2  AccMask 0  means the most significant byte of AccMask and  AccMask 3  means the least significant byte of AccMask     3  Bit10 is most significant bit and BitO is least significant bit    For example  In 29 bit ID message    AccCode   00h 00h OOh AOh    AccMask   FFh FFh FFh 1Fh    ID Value         7272 Ah and Bh will be accepted       don t care      Note  The mark    h    behind the value means hex format      1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         241      Return   CAN_NoError  OK  CAN_BaudNotSupport  Input baudrate is not support   CAN_ResetError
22. figure  The XC100  provides users one jumper selected termination resistor  J3   lts position is  displayed below     J3   e  transceiver    el    XC100     lt     O    controller  IE  LED2 LED1 LEDO    CAN HM    Figure2 1 XC100 I O expansion board LAYOUT       The jumper J3 is used to judge the resister of CAN network  When users  want to set the jumper JP3  the upper cover of I 7188XBD CAN   UPAC 7186EXD CAN needs to be removed  About the J3 jumper setting   please refer the following figure     Apply the termination    resistor 1200  Don t apply the termination resistor        ese  le 8 8           Table 2 1 J3 Jumper Selections    For l 7188XBD CAN  For uPAC 7186EXD CAN         ese  le 8 8           Table 2 2 J4 Jumper Selections  I 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         13     2 5 Wiring Diagram For Different Application    2 5 1 Program download    If users want to download users  program  the following structure may be  needed  Users must use the download cable  packaged with I 7188XBD CAN   UPAC 7186EXD CAN  to connect the 1 7188XBD CAN  uPAC 7186EXD CAN  COM1 with PC available COM port  Then  use the tool  7188xw exe  in  uPAC 7186EXD CAN OS Image folder to download users    program  Please  refer section 4 for more detail information     1 7188XBD CAN uPAC 7186EXD CAN        COM1 COM2       4              GN CN ON  nnooEaaSo  GREZ gt OzO  00000202020020  aee Eeee EH EH          D  y    GND    GND  10 30VDC    RX   gg DC  GND   u    
23. lers and may have a  trouble because of the long file name  The uPAC  186EXD CAN folder  architecture is similar as the l 7188XBD CAN folder architecture  Therefore  if  users use UPAC 7186EXD CAN the similar architecture described above will  be seen        Demo Content  AC_AM Use the AccCode and AccMask  All Demo   Demo the total functions provided by the XC100L lib   L1 L2 L3   Use the L1  L2  and L3 LEDs                          Rxint Receive the CAN messages by interrupt mode   RxPoll Receive the CAN messages by polling mode   Txint Send the CAN messages to the CAN network by interrupt  mode    TxPoll Send the CAN messages to the CAN network by polling mode        Userint Use the UserCANInt function to apply the users  CAN interrupt  service routine                 In order to introduce users to use the XC100 library file clearly  there is a  step by step procedure in the follovving section  It can give a good model to  show how to build an execution file with XC100L lib  download the users     program  and run it on the 1 7 188XBD CAN UPAC 7 186EXD CAN     1 7188XBD CAN uPAC 7186EXD CAN user manual  ver  1 01  March 8 2007         481    4 1 Program Download Procedure    Here  it is considered that how to build an execution file with XC100L lib  and how to run this program on the 1 7188XBD CAN uPAC 7 186EXD CAN     Step1  Create a folder named    MyDemo    in the C disk       Local Disk  C      File Edit View Favorites Tools Help    Q Back   Y Ki ES Search Key Folders P
24. ll_ Demo      L1_L2_L3      RxInt      RxPoll      TxInt      TxPoll      UserInt     gt  Users manual   gt  OS image used for testing demo     gt  BC  3 1 library folder    gt  BC  3 1 demo folder    gt  BC  3 1 AC AM demo folder    gt  BC  3 1 All Demo demo folder   gt  BC  3 1 11 12 L3 demo folder   gt  BC  3 1 Rxint demo folder    gt  BC  3 1 RxPoll demo folder    gt  BC  3 1 Txint demo folder    gt  BC  3 1 TxPoll demo folder    gt  BC  3 1 Userlnt demo folder    gt  TC  1 01 demo folder    gt  TC  1 01 AC_AM demo folder   gt  TC  1 01 All Demo demo folder   gt  TC  1 01 L1_L2 L3 demo folder   gt  TC  1 01 Rxint demo folder    gt  TC  1 01 RxPoll demo folder    gt  TC  1 01 TxInt demo folder    gt  TC  1 01 TxPoll demo folder    gt  TC  1 01 Userlnt demo folder   gt  MSC 1 52 demo folder    gt  MSC 1 52 AC_AM demo folder   gt  MSC 1 52 All Demo demo folder   gt  MSC 1 52 L1_L2_L3 demo folder   gt  MSC 1 52 Rxint demo folder    gt  MSC 1 52 RxPoll demo folder    gt  MSC 1 52 TxInt demo folder    gt  MSC 1 52 TxPoll demo folder    gt  MSC 1 52 Userlnt demo folder    1 71838XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         47     Here  the demo programs of XC100 library file with BC  3 1  TC  1 01  and MSC 1 52 are provided  The content of each demo is displayed in the  following table  When users want to compile the demo program  please move  the demo folder into a new folder named with max 8 letters  The  BC  3 1 TC  1 01 MSC6 compilers are 16 bit compi
25. provides one CAN communication ports with  5 pin screw terminal connector for the various CAN applications  Besides     7188XBD CAN UPAC 7186EXD CAN uses the new Phillips SJA1000T and  transceiver 82C250  which supports both CAN 2 0A and 2 0B specific   re transmission function  bus arbitration and error detection  Because of the  features of l 7188XBD and puPAC 7186EXD  The 1 7188XBD CAN   uPAC  186EXD CAN can be applied to communicate with several kinds of  industrial communication interface  such as RS 232  RS 485 and Ethernet of   Therefore  users can design the wide applications between different    communication protocols     1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         4t         Ethernet   Internet    CAN Device    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         5     1 2 Hardware Features    1000Vdc voltage protection    Compatible with CAN specification 2 0 parts A and B   Programmable transfer rate up to 1 Mbps    Jumper select 1200 terminator resistor for CAN channel  Programmable with the XC100 library file    Allow to design the behavior of CAN controller   Multi communication interface   Support Watchdog mechanism    Programmable Interrupt service routine and timers    Programmable by C C   language    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         6     1 3 Hardware Specifications    System  e CPU  80186  80MHz  for uPAC 7186EXD CAN   CPU  80188  40MHz  for 1 7188XBD CAN   SRA
26. r manual  ver 1 01  March 8 2007         531    Step11  Copy the file 7188xw exe into the MyDemo folder  Then  click the  7188xw to run it  The 7188xw can be found in the CD  and the file  path is    8000cd Napdos MiniOS 7 utility           DEK    File Edit View Favorites     ar         Back   i 3 d    Address ICH c  MyDemo v Go        lib100                      Ge utility SEE    File Edit View Favorites Tools Help ae    Q  tex v ba P   Search    Address    E  8000CD Napdos MiniOS7 utility e Go               gt       7188xw exe        utility  htm  HTML Document  1 KB    Step12  If the COM1 I 7188XBD CAN is connected to the PC COM1  the hint  sign    I 7188XB gt      will be shown in the 7188xw exe window after  pressing the Enter key in the 7188xw exe program  If users use  UPAC 7186EXD CAN COM1 to connect the PC COM1  the hint sign   17186EX   will be shown     7188XW 1 24  COM1 115200 N 8 1  FC 0 CTS 0  DIR E  TestArea  188XWC1    1 7188XB gt _       1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         54     Step13  Key the command     load    in the 7188xw exe program  Then  follow the  hint command to press    Alt E    and input the file name   AC AM exe    to download the execution file     urrent set  Use COM1 115209 N 8 1  AutoRun     s  None  Current work director a o fen    ha    input filet are   AC  AM exe         Step14  After finishing the download procedure  key in the command   run   to  implement the execution file AC AM exe      urren
27. s different function shown as follows                                Interrupt Type Value of IntMode  Receive Interrupt Enable 0x01  Transmit Interrupt Enable 0x02  Error Warning Interrupt Enable 0x04  Data Overrun Interrupt Enable 0x08  Wake up Interrupt Enable 0x10  Error Passive Interrupt Enable 0x20  Arbitration Lost Interrupt Enable 0x40  Bus Error Interrupt Enable 0x80                1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         21        Interrupt Type Meaning          Receive Interrupt When a message has been received without  errors  the receive interrupt will be triggered   Transmit Interrupt When a message has been successfully    transmitted or the transmit buffer is accessible  again  the transmit interrupt will be triggered        Error Warning Interrupt   If the error or bus status is set or clear  the error  interrupt will be triggered        Data Overrun Interrupt   If a message was lost because there was not  enough space for that message in the FIFO  FIFO  has 64 bytes   the overrun interrupt will be  triggered        Wake up Interrupt When the CAN controller is sleeping and bus  activity is detected  The Wake up interrupt will be  triggered        Error Passive Interrupt   If CAN controller has at least one error counter  exceeds the protocol defined level of 127 or if the  CAN controller is in the error passive status  the  Error Passive Interrupt will be triggered        Arbitration Lost Interrupt   When the CAN controller lo
28. st the arbitration and  becomes a receiver  The Arbitration Lost Interrupt  will be triggered           Bus Error Interrupt When the CAN controller detects an error on the  CAN bus  the Bus Error Interrupt will be triggered              Use one byte value to implement the interrupt  For example   if Receive and overrun interrupt are needed in the  BasicCAN CAN 2 0A  mode  Set the IntMode value to    0x09 That is 0x01 0x08       CANBaud  Use a long int to set this parameter  For example  if users    want to set CAN baud to 125K bps  Use the value    125000UL     1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         227    BTO  BT1  Set the special user defined baud rate  Users can set    arbitrary baud with these parameters  But users need to    have the background of SJA1000 CAN controller and    82C251 CAN transceiver  and calculate the values of BTO    and BT1 by themselves  The clock frequency of CAN    controller is 16MHz       AccCode  AccMask  The AccCode is used for deciding what kind of ID    For 11 bit ID Message     the CAN controller will accept  The AccMask is    used for deciding which bit of ID will need to check    with AccCode  If the bit of AccMask is set to O  it    means that the bit in the same position of ID need    to be checked  and the bit value ID need to match    the bit of AccCode in the same position                    Register bits of register Filter Target  AccCode 0  and AccMask 0  bit7 bitO bit10   bit3 of ID  AccCode 1  an
29. t set  Use COM1 115200 N 8 1    s  None  Current work director a DL Al    i   7188XB load  File will save to 8000 0000  Start  ddr      gt 7  80 FFFF    Press ALT E to download file   Input filename  AC_AM exe   Load file  AC_AM exe  crc  EBE    6006   Send file info  total 112 blocks  Block 112   Transfer time is  5 156000 seconds    i 7188 3 gt run         1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         55     
30. upt       CAN _Config 8 Configinto      void UserCANInt char CANInt        switch  CANInt     En UserCANInt CANInt    CAN Restore    A          main program      prog interrupt routine    user defined function         Use switch function or other  methods to design the action  based on different types of  interrupt       Syntax     void UserCANInt char CANInt     I 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         441    O Parameter   CANInt  The interrupt service routine will bypass the CANInt parameter  to users to indicate what interrupt is triggered  For the meanings of    CAN Int parameters  please refer to the following table                                            CANIntMode Value  Hex  Meaning  0x01 Receive a message successfully  0x02 Transmit a message successfully  0x04 Error warring  0x08 Data Overrun  0x10 CAN controller wake up  0x20 Bus Passive  0x40 Arbitration Lost  0x80 Bus Error    Return   None    O Relative function     3 1 2 XC100Init    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         451    3 2 Table of Return Code       Return  Code    Error ID    Comment       0 CAN NoError    OR       5 CAN ResetError    Enter reset mode error       8 CAN ConfigError    CAN chip configure error       9 CAN SetACRError    Set to Acceptance Code Register error       10 CAN SetAMRError    Set to Acceptance Mask Register error       11 CAN SetBaudRateError    Set Baud Rate error       14 CAN InstallirqFailure    Enable
31. vironment    Operating Temperature   25  C to  75  C  Storage Temperature   30  C to  85  C    Humidity  5  9  e Dimensions  123mm 64 5mm 19 6mm    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         gt    2 Hardware Configuration    2 1 1 7188XBD CAN Hardware Structure    CAN Bus Bypass CAN           Connector Bus Connector    Sdesssss SSS    Round LED    o Fl 7188XBD CAN        CPU  80188 40   MB CAN  Support CAN 2 0A 2 0B  E COMI  RS 232 RS 485  MCOM2  RS 485   E DO  100mA  30V max     DI  High  3 5V 30V  Low  0V 1V       7 segment  LED    DO and DI  channel    COM1  RS 232 Port  or RS 485 Port    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         gt    2 2 pPAC 7186EXD CAN Hardware Structure    CAN Bus Bypass CAN  Bus Connector    Connector       L1  L2  and  L3 LEDs                   Finios 7      Ge    PAC  7186EXD CAN Qu      CPU 80186 80  CAN  Support CAN 2 04 2 0B  El  Ethernet 10 100 Base TX   COMI RS 232  COM2 RS 485           gt   gt    gt   A         CH CH 00 0000    LCE CP     Programmable Automation Controller             ERRE E    COM2  RS 485 Port        COM1  RS 232 Port    1 7188XBD CAN uPAC 7186EXD CAN user manual  ver 1 01  March 8 2007         10     2 3 CAN Network Wire Connection    In order to minimize the reflection effects on the CAN bus line  the CAN  bus line has to be terminated at both ends by two terminal resistances as  following figure  According to the ISO 11898 2 spec  each terminal resistance 
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Stationnement et livraison dans Paris - IDFO-Tic  231-J Low231 4to1 Heavy Duty Transfer Case Instructions    User Manual - Solar Info  Hop Latent Viroid RT-PCR Detection Kit  Badu Jet Super-Sport/Classic  取り付け場戸元について  Sweex SOFT FIT HEADSET DELUXE  PDC 1050 ML ES UM.indd  Philips DLP2252    Copyright © All rights reserved. 
   Failed to retrieve file