Home
        MAN - CAN AVR - UK - 5.00
         Contents
1.                                                             15  FIGURE 8  DS W2 4 WAYS DIP SWITCH TABLE                                                                                  16  FIGURE 9  DSW1 8 WAYS DIP SWITCH TABLE                                                                                  17  FIGURE 10  EXAMPLE OF RS 232 SERIAL CONNECTION                                                                     19  FIGURE 11  EXAMPLE OF TTL SERIAL CONNECTION                                                                         19  FIGURE 12  LEDs  DIP SWITCHED  ETC  LOCATION                                                                           21  Ficure 13  IMAGE OF MODULE CAN        AND CAN AVR                                                           23  FIGURE 14  CONNECTION EXAMPLE OF CAN          CAN AVR                                                   25  Ficure 15  RS 232 SERIAL CONNECTION BETWEEN    CAN AVR AND A                                          26  FIGURE 16  EXAMPLES TABLE     ccccsssssssssssccccsscsssssscscccccccssssssssscsccccsssssssssssscccescsesesssssscscesesssesssssnees 27  FIGURE  17  BOOT LOADER UTILITY                  29  FIGURE 18  LOADING A SOURCE FILE WITH BASCOM AVR                                                           30  FIGURE 19  CONFIGURATION OF COMPILER BASCOM                                                                  31  FIGURE 20  COMPILATION WITH BASCOM AVR                                                  
2.                                 2  Interfacement between Mini Module             128 and      of      40 ways socket    connectors of GMM TST 2 is performed through a specific ISP programming socket   To perform ISP programming of GMM AM 28 on socket Z1      Z2 of a        TST 2   ISP programming socket must be installed between GMM TST 2 and Mini Module   ISP programming socket must connect pins 14 and 15 of GMM TST 2 respectively to  pins 9 and 10 of Mini Module  and isolate pins 9 and 10 of GMM TST 2  as indicated  in figure B 4     A3  GMM TST 2 jumpers configuration and Mini Module Dip Switch position is the one    reported on page 24 of manual and repeated here for comfort     Configuration GMM AMI28 Configuration GMM TST 2    DSW1 1   OFF JI   2 3   DSW1 2   OFF J2   2 3   DSW1 3   OFF B   not connected  DSW14   ON J4   not connected  DSW1 5   ON J5   not connected  DSW1 6   OFF J6   not connected  DSW1 7   OFF J7   not connected  DSW1 8   OFF   DSW2 1   OFF   DSW22   OFF   DSW2 3   OFF   DSW2 4   OFF    A4  Locate on grifo   CD and save to a comfortable position on the hard disk of the PC the file    Page B 2    called  prCANAVRuk hex  following the path  English   Example Tables   Mini Module  and Mini Block examples   CAN AVR  please refer to figure 16 of manual      Next sections described a detailed configuration specific for each programmer                   n         o                  Rel  5 00             CN7 ISP  GMM TST 2 MP AVR 51     4    2    2    9     l
3.                          31  FIGURE 21  LOADING PROJECT FILE WITH ICC AVR                                                                       32  FIGURE 22  COMPILATION WITH ICC AV R                                                                                     32  FIGURE 23  TOP VIEW AND BOTTOM VIEW OF CAN AV R                                                                 35  FIGURE 24  AVAILABLE CONNECTIONS DIAGRAM                                                                               39             B 1  DIAGMAM OF INTERFACE BETWEEN GMM TST 2        MP AVR 51                          3                2  DIAGMAM OF INTERFACE BETWEEN GMM TST 2 AND        49                                   3  FIGURE B 3  COMPONENT SELECTION USING PG4U W                                                                       4  Ficure    4  ISP PROGRAMMING SOCKET FOR CAN AVR AND GMM TST 2                               B 5  FIGURE B 5  PROGRAMMER CONFIGURATION USING PG4U W                                                         B 6  FIGURE B 6  COMPONENT CONFIGURATION USING PG4U W                                                            B 6  FIGURE B 7  PROJECT CONFIGURATION USING EQTOOLS                                                               B 8  FIGURE    8  CPU SELECTION USING AVR STUDIO                                                                      B 10  FIGURE B 9  CPU CONFIGURATION USING AVR STUpIo                                                              
4.                       19 8 x                                    0       SJOJONPUODILUAS                   Ajeues                                  pue                    510 8         spiom 992 se                           SOWO 2115 119 8702     uo                                                  SI   8989   SUL                                      c    6848 24    uoneoyioeds                   A0901A0                                              0  04  01 0                       904   lt 2                jddns                                66 0                                19 8 x               Tepue eopo      sJOJONPUODIWAaS                Rel  5 00        lt   S       Page A 2             APPENDIX     ISP PROGRAMMING WITH GMM TST          In this appendix the user can find specific instructions to program Mini Module CAN AVR installed  on a GMM TST 2 using an external ISP programmer    This method to program Mini Module on board Flash and EEPROM can be considered and  alternative to the one explained in section  B  of chapater  How to start  of manual    Content of other sections in above mentioned chapter are still valid anyway    ISP programming allows also to change the value of configuration bits and security fuses  in addition  to the programming of whole Flash and EEPROM content    The Boot Loader does not allow to program the whole content of Flash  because the Boot Loader itself  resides in a Flash area which becomes protected    Also  configuration bits  that enab
5.                    55                 21                             55                                            22  USE WITH GMB HR84 MODULE                                                                                      22  USE WITH CAN GMT MODULE                                                                                       24  HOW TO START                                        26  RICOMPILATION WITH BASCOM AVR                                                                         30  RICOMPILATION WITH ICC AVR                                                                                   32  SOFTWARE DESCRIPTION                                                                                                      34                             5 00     ig                            Page I             grifo         vr ITALIAN TECHNOLOGY    PERIPHERAL DEVICES SOFTWARE DESCRIPTION                                                       36  ACTIVITY LEDS ee                                         36  DIP SWITCH en    M    36  BACKED SRAM   SERIAL RTC                                                                                        37  CPU INTERNAL PERIPHERALS                                                                                        37  BIBLIOGRAPHY m                    38  APPENDIX A  DATA SHEET                                                                                                  A 1  AT90CANI28               q pu ni          A 1  P
6.              grifo      ITALIAN TECHNOLOGY    829410                                spod   ijroods uo  poyeoydnp Ayddns mod pue                                30                     k    doo yu344n 7   Rp SH        SU                        3938 Od    AMOWAW                                                                    lel                                  10 IO 10        OF             SANTI O I LLL  IV LIOIG 07    DID VL TOA           Sopeue      OF       FIGURE 14  CONNECTION EXAMPLE OF CAN GMT   CAN AVR    Page 25          Rel  5 00                            ee                 HOW TO START       Across this chapter we presume that you             GMM TST 2 ora GMB HR84 where to install CAN  AVR     For further information please refer the specific manual of GMB HR84   CAN AVR     A  S JBIKIAIL CONNIECTUION IBIET                    A VIR                      1  To make the serial connection between CAN AVR and a PC  the structure described on  figure 15 should be built   The program delivered to the customer in the Mini Module is its test program  which  communicates through USARTO  Please remark that the test program is not designed to  work outside grifo   specific test structures  so we strongly recommend this  do not  connect any other signal exept the ones of USARTO in this phase     DB25F         3  RXD0 USARTO  set as RS232  2 3         4         0 USARTO  set as  5232                   AVR    5    9               w            s          gt             UO      
7.             15  RS 232 SERIAL CONNECTION BETWEEN    CAN AVR AND            A2  Keep ready for running a terminal emulator on PC  configure it to use the serial port where  Mini Module is connected with 19200 baud  8 data bits  1 stop bit  no parity  If you are  using BASCOM AVR  you may simply open the terminal emulator in its IDE     Page 26                                      _ Rel  5 00          ITALIAN TECHNOLOGY                       gQgrifo                                 Supply GMM TST 2 or GMB     168  Starting screen of CAN AVR test program  should appear in the terminal  Otherwise  check the connection cable and power supply        rifo       ITALIAN TC CHNOLOGY           3  5   gt                    5         MODULES AND MINI BLOCKS      eam e pe           2   2   2           r      2 EI                189051003          8051 Code  2     Arnel           9  51    01      8051 Code         Tam       189  51   lt 02       8051 Code  2   Atmel   89   5115           5 2             B   8051 Code                            ND                 7    e   e     PIC16F876A          PIC 14 Code  PHILIPS    2            2              PSSLPCS32        8051 Code       e                                              T99C51AC2            8051                ie          _    I _   _                    08        AVR Code             Atmel ATMega32    AVR Code       Mani Block     I        2 2 2 2   2   9 input opto 4  output rel      Mes Bleek 16  au       2 2    2   2 2    mput opto
8.             TECHNICAL MANUAL          Via dell  Artigiano  8 6  PERO 40016 San Giorgio di Piano  g rifo  Bologna  ITALY             TECHNOLOGY E mail  grifo  grifo it  lt   http   www grifo it http   www grifo com  Tel   39 051 892 052        FAX   39 051 893 661    CAN AVR Rel  5 00 Edition 19 January 2006   aveeo   e              grifo   are trade marks      grifo                       TECHNICAL MANUAL       Standard container with 28 pins male socket  dual in line  100 mils pitch  600 mils width   very small dimension  42 x 25 x 15 mm  single power supply voltage required in the wide  range from 5 0 Vdc  the current consumption can change according with module  connections   availability of power saving setting as Idle Mode and Power Down Mode   Atmel AT90CAN128 microcontroller with external 12 MHz crystal  128 KBytes  FLASH for code  up to SKByes FLASH can be reserved for Boot Loader  4              RAM        data  4KBytes EEPROM for data  2 analog comparators channels with  different input and output configurations options that allow to create easily bipolar A D  conversion  5 channels multiplexed A D converter  resolution 10 bits and 6 usec  conversion time  37 Interrupt sources  4 Timers Counters  up to 16 bits  with functions  of PWM  compare  capture  etc   up to 24 digital      lines available on connector  Some  of these lines have multiple functions  one hardware serial communication line with  programmable physical protocol  Baud Rate up to 115200 Baud  8 or 9 d
9.            waitstate    Framesize 64     External Access Enable         Default                X Cancel      FIGURE 19  CONFIGURATION OF COMPILER BASCOM AVR    C3 Bascom AVR c  Compile the source file by pressing the button with the icon of an  integrated circuit     bad BASCOM AYR IDE   18  x   File Edit Program Tools Options Window Help                     Compile current             FIGURE 20  COMPILATION WITH BASCOM AVR    CANAVR Rel  5 00                                         C3 ICC A VIR   kicompulatinom           A WK            ICC AVR     In standard editor  load the project      prCANAVRuk prj using the  menu Project                   DE for ICCAVR  STANDARD        View   Project Studio  BCS Tools Terminal Help Open Project        xl                                  c Cerca in         Canavr                                All Files prCANAVR  prj  Close      Files  Reopen                                                   pal Shit                                                    File          Nome         prCANAVR  pri  Tipo file   Project Files    pri  x        Apri in sola lettura    Rent Elected Eels        Options       Menual Sort Browser window              FIGURE 21  LOADING PROJECT FILE WITH ICC AVR    C3 ICC AVR b  Compile the project using the menu Project   Make project     aft IDE for ICCAVR  STANDARD     Search View Project Studios BCS Tools Terminal Help                 LJ         New        Open    Ctrl F11    gt    Open All Files      Close All Fil
10.          Mabe S                       FiGunE B 7  PROJECT CONFIGURATION USING EQTOOLS                                   Rel  5 00    Page B 8                  JD  JP                          SJ NY Gr AUEMUBIL AVIR         D1  Control program of AVR ISP is AVR STUDIO  version 4 or greater  Latest version can  be downloaded from Atmel website www atmel com  You may download it and install  it following the instructions on screen     D2  Configure AVR ISP to use the 10 ways flat cable and connect it to connector CN7 of  GMM TST 2  connect AVR ISP to PC serial port  please refer to instructions at points  A2 and        configure GMM TST 2 to program through AVR ISP and supply it  please  refer to GMM TST 2 manual      D3  Run AVR STUDIO  AVR ISP control program can be run by pressing the button with  AVR chip as icon     D4  Select as CPU                  128  like in figure B 8   D5  Load the file previously saved on point A4  by pressing the button  Load    D6  Configure CPU as indicated in images of figure B 9     D7  Configure the programmer to check signature  erase device and reprogram with verify  Flash memory and configuration bits  like indicated in figure B 10     08  Perform the programming sequence by pressing button  Start  indicated in figure B 10     Page B 9    CAN AVR       5 00                                10    ITALIAN TECHNOLOGY            Perallel Hich                                      B 8  CPU SELECTION USING AVR STUDIO           Ext  Crystal          F
11.      DOCUMENTATION COPYRIGHT      grifo    ALL RIGHTS RESERVED    No part of this document may be reproduced  transmitted  transcribed  stored in a  retrieval system  or translated into any language or computer language  in any form or    by any means  either electronic  mechanical  magnetic  optical  chemical  manual  or  otherwise  without the prior written consent of grifo          IMPORTANT       SYMBOLS DESCRIPTION       Trade Marks                     grifo     are trade marks of grifo     Other Product and Company names listed  are trade marks of their respective companies    ITALIAN TECHNOLOGY                                                                     GENERAL INDEX    INTRODUCTION E E 1                           25589                                                                     3  GENERAL INFORMATION                                                                                                        4  DIGITAL      LINES                   6  SERIAL COMMUNICATIDON                                                                                                 6              Gee ee ee ee ee E E A TA 6  MEMORY DEVICES                                                                                                               8                                         8  SPIINTEREACE ttem 8         INTERFACE lasa    X      M             9  DIP SWITCH pev                                               9                              T        10  ANALOG COMPA
12.      grifo             WL ITALIAN TECHNOLOGY  INSTALLATION    In this chapter there are the information for a right installation and correct use of the CAN AVR card   In detail there are the locations and functions of each connector  of the user settable dip switches   LEDs  and so on     VISUAL SIGNALATIONS       CAN AVR features the LEDs described in the following table        FIGURE 6  LEDs TABLE    The main function of LEDs is to inform the user about card status  with a simple visual indication  and in addition to this  LEDs make easier the debug and test operations of the complete system  To  recognize the LEDs location on the card  please refer to figure 12  while for further information  please refer to paragraph ACTIVITY LEDS     CONNECTIONS       The CAN AVR module has   connector that can be linkeded to other devices or directly to the field   according to system requirements    In this paragraph there are connector pin out  a short signals description  including the signals  direction  and connectors location  see figure 12  that simplify and speed the installation phase   Some additional figures shows the pins functionalities and some of the most frequently used  connections     CN1   EXTERNAL POWER SUPPLY CONNECTOR           is a 28 pins  male  dual in line  socket connector with 100 mils pitch and 600 mils width    On        are available all the interfacement signals of the Mini Module as the power supply  the  I O lines  the synchronous and asynchronous commu
13.     Page 33    CAN AVR       5 00                           bus         qgrifo                                                                 cA  A           iu                           SOFTWARE ID   A wide selection of software development tools can be obtained  allowing use of the module as a  system for its own development  both in assembler and in other high level languages  in this way  the user can easily develop all the requested application programs in a very short time    Generally all software packages available for the mounted microprocessor  or for the AVR family   can be used    Software packages purchased from grifo   are always provided with example programs that show  how to use each section of the board and a complete use documentation    Remarkable are     BASCOM AVR   It is a powerfull new integrated development environment for AVR microcontroller  The toolset  incorporates an editor  optimising BASIC compiler  assembler and HEX creator  The BASIC  compiler produces very tight AVR machine code by virtue of the fact it translates the BASIC source  into actually run timeassembly code wich is optimised to run as fast as possible  The target AVR  microcontroller therefore runs true assembly code rather than tokenised code wich is found in many  other BASIC compilers  Itis also provided with integrated simulator for source level debugging and  optional external libraries to drive or simulate several external devices  likebadge readers  PS 2  keyboards  graphic
14.   7    CANAVR       5 00       a       Page D 1                                   F  FLASH 8  12  28    G    GMB     84 22  GMM TST2 B 1    H  HOW TO START 26    I    PC BUS 8  10  12  15  20   PC BUS PULL UP RESISTOR 13   ICCAVR 32  34   IMPEDANCE ANALOG SIGNALS GENERATORS 13  INTERRUPT 12  21  37    ISP 15  B 1  J  JTAG 21  34  L    LEDS 12  14  36    M    MEMORY 8   MIPS 6             51     1     4    5101 6          PORTS 6   POWER ON TIME 12  POWER SUPPLY 13  15  20  PROTECTION FUSES 28  PULL UP 8  37          10  12  20    Page D 2         ITALIAN TECHNOLOGY                                  Rel  5 00    ITALIAN TECHNOLOGY                                          grifo     R    REAL TIME CLOCK 10  12  37  RELATIVE HUMIDITY 13  REVISION NUMBER 3   RISC 6   RS 232 6  9  12  16  18  20  RS 232 PROTECTION 13  RS422 6 9   RS 485 6 9   RTC 6  8  9  10  15  16  37    S    SCL 37   SDA 37   SERIAL LINES 6   SIZE 13   SLAVE ADDRESS 37   SPI 8  12  20   SRAM 8  9  10  12  16  37    T    TEMPERATURE RANGE 13  TIMER COUNTER 10  12  TTL 6  9  12  15  16  18  20    U    UEP 49 B 1  B 4  USART 15  USARTO 9  18  26    W    WATCH DOG 10  12  WEIGHT 13    CAN AVR Rel  5 00                Page D 3             gh a                          Page D 4                                     Rel  5 00    
15.   M                Rel  5 00                    gt   aif    It connects      serial receive signal RXDO                0 of  the microcontroller to RS232 driver  Used in conjunction  with DSW1 3 5    It does not connect the serial receive signal of the  microcontroller to RS232 driver  thus allowing the direct  connection to RXDO   PDI        0 signal              Used in  conjunction with DSW1 3 5    It connects TXDO            PE 1 signal on       to RS232  serial driver  Used in conjunction with DSW1 4    It does not connect TXDO   PDO   PE 1 signal on CNI to  RS232 serial driver thus allowing the direct connection to  microcontroller  Used in conjunction with DSW1 4    It connects RXDO   PDI  PE O signal on       to  8232 serial  driver  Used in conjunction with DSW1 1 5    It does not connect RXDO   PDI        0 su        signal              to RS232 serial driver thus allowing the direct  connection to microcontroller  Used in conjunction with  DSW1 1 5    It connects TXDO   PDO   PE 1 signal on       directly to  microcontroller  with no use of RS232 serial driver  Used in  conjunction with DSW1 2    It does not connect TXDO   PDO   PE 1 signal on       to  microcontroller  thus allowing the use of RS232 serial  driver  Used in conjunction with DSW1 2    It connects RXDO           PE O signal on CNI directly to  microcontroller  with no use of RS232 serial driver  Used in  conjunction with DSW1 1 3    It does not connect RXDO   PDI   PE O signal on        to  microcont
16.   Page 2             CARD VERSION       This handbook make reference to card CAN AVR with printed circuit version 220205    The validity ofthe information contained in this manual is subordinated to the printed circuit revision  number and so the user must always check the correspondance    The printed circuit revision number is always printed in several positions of the circuit and following  figure shows the easiest to access     PRINTED CIRCUIT REVISION NUMBER       FiGuRE 1  LOCATION OF REVISION NUMBER    Page 3                             5 00               3        grifo         ITALIAN TECHNOLOGY    ENE JON  EO  RMI AT             CAN AVR           grifo  Mini Module AVR  is    module based on microcontroller Atmel  AT90CAN128     powerful and complete system on    chip provided with CPU  integrated memory   both for data and code   a watch dog  many digital I O lines  4 multifunction timers counters with  capture and compare capability  one asynchronous serial line  one CAN serial line  one PC BUS  synchronous seria line  2 comparators for analog signals  etc    In module s very small area  are already mounted the components that exploit microcontrollers s  performance and that allow each functionality mode like a reset generator circuitery    Possible applications of CAN AVR Mini Modules are several    For example  native CAN application  that is car automation  lights turning ON OFF  heating and  cooling systems control  supervision of electric devices  anti teft an
17.  8      amput rel                                                    egrifo egrifo       TT ALIAM TECHNOLOGY TALIAN TECHMOLOG Y    FIGURE 16  EXAMPLES TABLE    Page 27    CAN AVR Rel 5 00                                                              AJLA SION JUBIPIKOGIKAQWDYULN G    Mini Module programming is performed using th Boot Loader preprogrammed in the Flash of Mini  Module itself    Such program allows to create a communication between Mini Module and the PC  and to use it to  send         file to code memory and or EEPROM memory area of microcontroller    Boot Loader does not allow to program configuration bits and security fuses of microcontroller  this  can be done usigne ISP programming  please refer to appendix B of this manual     The portion of Flash memory taken by the Boot Loader is 4 KBytes  this means that the last block  of 2 KWord at the end of the memory is reserved to Boot Loader and is not available for user  application any more    Boot Loader communicates through PC serial port installing a specific utility  that can be  downloaded for free from our website www grifo com or can be found in our CD  called  AVRBootloaderGrifo exe  This utility allows to select the serial port to use end to select the files to  program memories of Mini Module    For some applications  use of an ISP programmer may be the only chance  Please refer to appendix  B for more information about ISP programming    Combo box called  Com Port  allows to select the serial port to 
18.  USARTO  CAN  analog  comparators  A D converter  PC BUS  SPI  EEPROM     An interrupt management section  integrated in microcontroller  allows to enable  disable and mask  so the user has the possibility to respond promptly and efficently to any external event    The microcontroller has an interrupt section that let the user manage the 37 interrupt sources  So  theapplication program has always the possibility to react promptly to every event     JTAG INTERFACE       The microcontroller on board of CAN AVR is provided with JTAG interface    Signals of this interface  TDI  TDO  TMS and TCK  are available respectively on pins from 20 to  23 of CNI  Configuration registers of microcontroller must be carefully programmed to enable or  disable JTAG functions        FicureE 12  LEDs  DIP SWITCHED  ETC  LOCATION    CANAVR Rel  5 00                    2                                SUPPORT CARDS       CAN AVR Mini Module can be used as a macro components for some support cards either developed  by the user or directly chosen from the grifo   boards  In the following paragraphs are reported the  suggested configuration of the most interesting support cards     USE WITH GMB HR84 MODULE       Amongst grifo   cards  GMB HR84 module is the one designed specifically to provide to 28 pins   Mini Modules many interesting features as  8 optocoupled inputs  4 relay outputs  mechanical   mounting on omega rails and acomfortable wiring through screw terminal connectors  The complete   descri
19.  and alphanumeric displays  etc       ICC AVR PRO   Cross compiler for C source program  It is a powerfull software tool that includes editor  ANSI C  compiler  assembler  linker  library management program and project manager included in an easy  to use integrated development environment for Windows and other P C  operating systems  Library  sources  floating point  integration with AVR studio  on line help and ANSI terminal emulator for  target communication are provided too     DDS MICRO C AVR   Low cost ross compiler for C source program  It is a powerful software tool that includes editor  C  compiler  integer   assembler  optimizer  source linker and library in one easy to use integrated  development environment  There are also included the library sources and many utilities programs   The default IDE can be replaced by a new one named Micro IDE  that is more powerfull  for  Windows operating system and provided of many utility functions     AVR Studio   Itis a development tool for AVR family of microcontroller that fully control execution of program  on AVR in circuit emulator or on the built in AVR instruction set simulator  AVR Studio supports  source level execution of assembly and C programs generated by external compilers and assemblers   The tolls is based on a set of windows for source  watch  registers  memory  peripherals  message and  processorthat enable the userto have full control ofthe status of every elementin the execution target   It also features an  
20.  figure 2     Page 5    CAN AVR       5 00                           ee             DIGITAL      LINES       The Mini Module CAN AVR is provided with 24 TTL digital I O lines  of the microprocessor Atmel  AT90CAN 128  that are all the signals of Port PB  signals from 0 to 6 of PE  signals 0  1  4 and 7 of  PD and signals 0 an from 4 to 7 of PF    These lines are connected directly to 28 pins connectors with standard grifo   Mini Module pin out   allowing to be connected direclty to several interface cards    By software it is possible to define and acquire the function and the status of these lines  and also to  match them to peripheral devices  like Timer Counter  Interrupt       BUS  SPI  etc    simply  programming some CPU internal registers    For further information please refer to paragraph CONNECTIONS and PERIPHERAL DEVICES  SOFTWARE DESCRIPTION     SERIAL COMMUNICATION       On CAN AVR there is always availability of one hardware serial line that is completely software  configurable for physical protocol  baud rate  stop bits number  lenght of character  etc  by simply  programming some microprocessor registers as described in the manufacturer documentation or in  the appendix of this manual    The serial lines are connected to CN1 connector at TTL or RS 232 level  thanks to some on board  dip switches configuration  so when the card must be connected in a network or at long distance or  with other systems that use different electric protocol  the user must provide ex
21.  signals  15 Lines    2 Lines    8 Lines DRIVER  USARTO 2 signals            TTL serial line   2 Lines     I B RS 232 DRIVER  NK    ANALOG  COMPARATOR    PWM  TIMER  COUNTER    Internal MUX    28 pins socket CN1    protection  15 kV    2 signals    LITHIUM  BATTERY             N         Oz  e      t    Sz                      Z  un  iS     4c  un     E        ER           5           x 2   E   gt          gt   5  F  M                    FIGURE 2  BLOCKS DIAGRAM    CAN AVR       5 00              Page 7                                  MEMORY DEVICES       The card is provided of 136 25K of memory divided with a maximum of 128K Bytes FLASH  EPROM  4KBytes Bytes of internal SRAM  4KBytes EEPROM and 240 Bytes in RTC module   reachable only through PC BUS    The memory configuration must be chosen considering the application to realize or the specific  requirements of the user    Thanks to on board EEPROM  and SRAM of RTC when the back up battery is connected  there is  the possibility to keep data also when power supply is failed    In this way the card is always able to maintain parameters  logged data  system status and  configuration  etc  in each working conditions    Whenever the amount of memory for data is not sufficient  i e  for data loghin systems   it is always  possible to connect external memory devices  with SRAM  EEPROM  FLASH technologies   through the comfortable and efficient SPI and      BUS interface of the card    The addressing of memory devices is controll
22.  the user can set any configuration in autonomy following the below  reported information       SERIAL LINE USARTO CONFIGURED AS RS 232  default configuration     DSWI1     ON  DSW1 2   ON  DSWI1 3   ON  DSW1 4   OFF  DSWI1 5   OFF      SERIAL LINE USARTO CONFIGURED AS TTL    DSW1 1   OFF  DSW1 2   OFF  DSW1 3   OFF  DSW1 4   ON  05  1 5   ON    Figures 10 and 11 show how to connect a generic external system to both serial lines of CAN AVR     Page 18                                       Rel  5 00             3 RXD0 USARTO  set      RS232     4 TXDO0               set as RS232     5             gt   2  i  E                  gt               CAN AVR                  10  EXAMPLE or RS 232 SERIAL CONNECTION    3 RXDO0 USARTO  set as TTL     4       0 USARTO  set as TTL     External System       CN1 CAN AVR                 11  EXAMPLE OF TTL SERIAL CONNECTION    Page 19    e    CAN AVR       5 00                                         i                 CONNECTOR SIGNALS INTERFACEMENT       To prevent possible connecting problems between CAN AVR and the external systems  the user has  to read carefully the previous paragraph information and he must follow these instrunctions       For RS 232 and CAN signals the user must follow the standard specifications of these protocols   defined by specific normatives       AII TTL signals must follow the rules of this electric standard  The connected digital signals must  be always referred to card ground  GND  and then the      level corr
23. 195                                                              S E                                       9944        seq OpZ                eu           sna                               u        oeds                 se pesn      519151       wieje se aseq eui ZH 06 JO ZH 89 2                       55                                          8        eu                                  yewo inou 21 10                                   91901 13534 Y pue                                    10  pesn                           5        8  EM                        194  eu  pue                             ZHY 89 72 UHINA eu                              pue                      i  gt  INI                   jeuonippe      snq ay  0                                   moj YM                                 zp N prey                                         0                   2         821  001                    CEO  OM  JO                      y                                                         vi 09             2   0   79S        jue uno Bunesad    puodas    jo ujpespunu oan       1                                      10  pasn si oy      sseuppy                peal A 9 01 A                                              00                                 6898394         1080 JO                     Jaye                                             si 1   5 1              0   SseJppe                  eu      514 221                    i                                       WvH5vid
24. B 10  FicunE B 10  AVR ISP CONFIGURATION USING AVR STUDpIo                                                     B 10               C 1  CAN GMT ELECTRIC DIAGRAM                                                                               C 1           6 Page Il             gh a                          Page IV               rn                  Rel  5 00             INTRODUCTION       The use of these devices has turned   IN EXCLUSIVE WAY   to specialized personnel   This device is not a safe component as defined in directive 98 37 CE           Pins of Mini Module are not provided with any kind of ESD protection  They are connected directly  to their respective pins of microcontroller  Mini Module is affected by electrostatic discharges   Personnel who handles Mini Modules is invited to take all necessary precautions to avoid possible  damages caused by electrostatic discharges     The purpose of this handbook is to give the necessary information to the cognizant and sure use of  the products  They are the result of a continual and systematic elaboration of data and technical tests  saved and validated from the manufacturer  related to the inside modes of certainty and quality of  the information     The reported data are destined  INEXCLUSIVE WAY  to specialized users  that can interact with  the devices in safety conditions for the persons  for the machine and for the enviroment  impersonating  an elementary diagnostic of breakdowns and of malfunction conditions by performin
25. D  together with possible definition file  for  example  prCANAVRuk prj for ICC AVR   Once these files have been located they  must be copied in a comfortable folder on the hard disk of development PC     Compile the source file by using the selected software tools  the      prCANAVRuk hex  must be obtained equal to those available on grifo   CD and already used at points B  This  operation is very different according to the programming environment selected  so here  follow the details          Bascom AYR   kucompulation using BASCOM A VR       Page 30    C3 Bascom AVR a  In BASCOM IDE  load the program source with menu File   Open     Select file to open    Cerca in    E Canavr  gt           445 pICANAVR bas       Nome         prCANAVR bas  Tipo file    BASCOM AVR                 5  S           Annulla       FIGURE 18  LOADING    SOURCE FILE WITH BASCOM AVR    y    amp                  CANAVR _ Rel  5 00                  Bascom AVR b  From menu Options   Compiler   Chip      the value 64 for HW Stack   32 for Soft Stack  64 for Framesize  as suggesterd also in the source  code  and press OK  Such values must be considered minimal and  must be increased if required                                      Options    Compiler   Communication   Environment   Simulator   Programmer   Monitor   Printer      Chip   Output   Communication   120  5  1               LCD      Chip m128can dat Y FlashROM 128        MRAM           SRAM 4096      Hw Stack 64 EEPROM 095           Stack 32    
26. I serial inteface featured through a specific  hardware section of the microcontroller    Signals MISO  MOSI and SCKof SPI interface are available respectively on pins 8  9 and 12 of  connector           All interface parameters are managed through microcontroller inernal registers    For further information please refer to component data sheet or appendix A of this manual                         Rel  5 00    Page 8    A          ITALIAN TECHNOLOGY                        gr  fo          CAN INTERFACE       Mini Module CAN AVR is provided with a powerful hardware CAN inbterface  capable to reach  the maximum bit rate of 1 Mbp sec Signals CAN L and CAN H are available respectively on pins  8 and 9 of CNI    This interface is fully compatible with CAN 2 0 specifications parts A and B     DIP SWITCH       CAN AVR Mini Module is provided with two dip switches  ab eight ways and a four ways  whose  purpose is to set up several electric parameters of module itself and the card operating mode    In fact DS W1 allows to decide whether serial interface USARTO must be buffered as RS 232 or TTL   in this latter case allowing to use and external buffer like RS 422  RS 485 or current loop drivers   Four ways DSW2 allows to decide whether the signals of CAN interface or the signals of SPI  interface must be available on pins 8 and 9 of CNI    DSW1 also allows to connect or not the back up battery of RTC   SRAM module    In addition  status of some swithces can be acquired by software throug
27. OO                    xq oT  AY 43 434U07   C V                      7                  SARIOWAN    sng cl    SA40IA3G             STONOWHONAS           0       4           INAM     SHEIINLL SWLENO0D       14405    FiGURE 24  AVAILABLE CONNECTIONS DIAGRAM    Page 39          Rel  5 00                              gh a                          Page 40                                     Rel  5 00                                                 APPENDIX     DATA SHEETS    grifo  provides a completely free technical documentation service to make available data sheets of  on board components  through its web site  In this chapter the user found the complete and ready to  use links and URLs to these information  together with the first pages of the same documents  To use  our technical documentation service just connect to our site www grifo com and click its icon     AT90CANI28  Link  Home   Technical documentation Service   ATMEL   Data Sheet                128  URL  http   www grifo com PRESS DOC Atmel AT90CANI128 pdf       Features    High performance  Low power AVR  8 bit Microcontroller    Advanced RISC Architecture      133 Powerful Instructions     Most Single Clock Cycle Execution      32x 8 General Purpose Working Registers   Peripheral Control Registers      Fully Static Operation      Up to 16 MIPS Throughput at 16 MHz  2 On chip 2 cycle Multiplier w               volatile Program and Data Memories      128K Bytes of In System Reprogrammable Flash  Endurance  10 000 Wr
28. OP SSB 5 2            T EA A 2  APPENDIX     ISP PROGRAMMING WITH        TST 2                                                B 1  COMMON OPERATIONS FOR ALL PROGRAMMERS                                                B 1  PROGRAMMING USING grifo   MP AVR 51   grifo    UEP 49                                      B 4  PROGRAMMING USING EQUINOX EPSILON                                                            B 7  PROGRAMMING USING ATMEL AVR ISP                                                                     B 9  APPENDIX C  CAN GMT ELECTRIC DIAGRANMA                                                             C 1   APPENDIX D  ALPHABETICAL  INDEX                                                                              D 1    e    Page II          rn   CANAVR   Rel  5 00    grito               e        ITALIAN TECHNOLOGY   FIGURE 1  LOCATION OF REVISION NUMBER                                                                                        3  FIGURE 2  BLOCKS DIAGRAM saa slasssaaqssssicasassssceasqasqasessqasusqasspaqqassssyasesasssaqsssasasasssssqessasassssesssassasess 7  FIGURE 3  CAN AVR PHOTO      9  FIGURE 4  COMPONENTS         COMPONENTS SIDE                                                                           11  FIGURE 5  COMPONENTS MAP  SOLDER SIDE                                                                                    11  FIGURE 6  LEDS TABLE                                   P   14  FIGURE 7           SOCKET WITH MINI MODULE SIGNALS      
29. RATOR                                                                                                    10  TIMER COUNTER AND PWLM                                                                                            10  WATCH DOG                     10  REAL TIME CLOCK dem           10  TECHNICAL FEATURES                                                                                                          12  GENERAL FEATURES                                                                                                          12  PHYSICAL FEATURES                                                                                                        13  ELECTRIC FEATURES                                                                                                        13  INSTALLATION                                 14  VISUAL SIGNALATIONS                                                                                                    14  CONNECTIONS                        14         EXTERNAL POWER SUPPLY CONNECTOR                                                  14  MINI MODULE CONFIGURATION                                                                                   16  SERIAL COMMUNICATION SELECTION                                                                       18  CONNECTOR SIGNALS INTERFA              A                                                                  20  POWER SUPPLY                        20  INTERRUPTS     21              
30. a of USARTO  it can be buffered as RS 232      TTL  CANL   I O   Bidirectional differatial L signal of CAN interface   CANH  lt    O   Bidirectional differatial H signal of CAN interface   PDI   I   ISP programming data output line   PDO        ISP programming data input line    PAX  PBX               I O CPUIU O TTL signals  5                    Bus clock signal    SDA               Bus reception and transmission signal   Tn   I   External inputs for counters of timer n th   INT n   I   CPU n th interrupt signal   ADCn       N th A D converter analog input   AINn       N th comparator analog inputs   AREF   I   A D converter reference voltage   OCn A B C         Compare output of n th section   TDO  TDI   I O   Data signals of JTAG interface   TCK  TMS   I  Clock and control signals of JTAG interface   XCKn   I  Exeranl clock signals for USARTn  in synchronous mode    INTRTC        Periodic interrupt signal generated by               8583   RESET   I  Reset signal   MOSI   O   SPI interface data output   MISO   I  SPlinterface data input    SS   I          interface slave select   SCK   I O   SPI interface clock    Vdc POW   I   Power supply   GND      Ground    Page 15    CAN AVR Rel  5 00                                              Ci               MINI MODULE CONFIGURATION       On CAN AVR module there are an 8 ways dip switch and a 4 ways dip switch that define some  configurations of the card  In the following figures is reported their list  their position and their  f
31. als  Detailed information on the board are available in the  relative technical manual and the user can use them freely  for example to develop his own card that  use the CAN AVR as a macro component                                  GMT d s  25 10 01     22           PD1  A  O C3     N  ALIMENTAZIONE      101               LD2    ME                                          LD4                                     5     4                 T1                           4     ERST    pote                            o    o   ooo   0  i                     1         GMT ELECTRIC DIAGRAM    CAN AVR Rel  5 00                             gh a                          Page C 2                                     Rel  5 00             APPENDIX D  ALPHABETICAL INDEX       SIMBOLI   VDC POW 13  15  20    A    A D CONVERTER 10  12  15  20  ANALOG COMPARATOR 10  12  20         ISP    1   AVR STUDIO 34  B 9  AVRBOOTLOADERGRIFO 28    B    BACK UP 9  10  16  37   BACK UP BATTERY CONSUMPTION 13  BACK UP BATTERY VOLTAGE 13  BASCOM AVR 30  34   BATTERY 9  10  16  37  BIBLIOGRAPHY 38   BOOT LOADER 28   BROWN OUT THRESHOLD 13                 9  15  16  21  24  37                 24   CARD VERSION 3   CLOCK 6  12          14   CONFIGURATION BITS 28  CONNECTIONS 14   COUNTER MAXIMUM FREQUENCY 12  CURRENT CONSUMPTION 13  CURRENTLOOP 6 9    D    DDS MICRO CAVR 34  DIGITAL      LINES 12  DIPSWITCH 9  12  16  36     2  DSW  9     2   DSW2 9     2    E                 8  12  28             8  12  EPSILONS  
32. also be used in PWM mode  to generatesignals of variable duty cycle and frequency set by  software with eight or sixteen bits of resolution    Typical applications of these signals are motor velocity control  in fact several motor control cards  are provided with compatible inputs    Another application is analog signals generation by simply adding an integrator     WATCH DOG       Microcontroller Atmel AT9OCAN 128 features a hardware programmable watch dog capable to reset  the CPU if it is enabled and the application program does not retrigger it in the activation time   This latter time can be programmed between 16 msec and 2 seconds     REAL TIME CLOCK       Mini Module features an on board Real Time Clock  in PC BUS with slave address A0   capable to  manage hours  minutes  seconds  year  month  day and weekday  It also features 240 bytes of SRAM  This component can be completely managed by software and is backed through a back up battery  that  if enabled  can warrant data validity in any operating condition                                 Rel  5 00    Page 10                     FiGURE 4  COMPONENTS MAP  COMPONENTS SIDE        FiGURE 5  CoMPONENTS MAP  SOLDER SIDE     CAN AVR       5 00             Page 11                                                   TECHNICAL                      GENERAL FEATURES  Resources    Memories   CPU   Clock frequency     Counter maximum frequency     Power on time   Watch dog intervent time   A D converter resolution     A D conversion t
33. application builder  to easy the generation of code to initialise all hardware  peripherals  USART  SPI  Port  ADC  ect   starting from a graphic interface     E  Page 34  gt        gt   gt   gt                         6                              CANAVR _ Rel  5 00          ITALIAN TECHNOLOGY                       grifo                           There is also the remarkable possibility to drive the JT AG interface called  JT AG ICE  manufactured  by Atmel    A JT AG interface allows to enter the core of microcontroller to examine its status during execution  of applcation program directly on the application hardware    The user can insert both hardware and software breakpoints  and when execution is stopped the  values contained in memory and internal registers can be examined    JTAG interface also allows to reprogram the microcontroller memories    Using JTAG interface several debugging problems are solved  increasing the possibility to eliminate  bugs and drastically reducing the time required to obtain the final application completely debugged               ON CTS  ae                   TI    E M       8345676  1234       03      ee R2 220205  X X X X X X X     N             09         LII  4     M       FIGURE 23         VIEW AND BOTTOM VIEW OF CAN AVR    CANAVR Rel  5 00     6 LLL          35             g                                       DEVICES SOFTWARE DESCRIPTION          Below there is a specific description of the software managements of the on board periph
34. are or 16 Bit PWM Output  Output Compare Modulation      8 channel  10 bit SAR ADC  8 Single ended channels  7 Differential Channels  2 Differential Channels With Programmable Gain at 1x  10x  or 200x  On chip Analog Comparator  Byte oriented Two wire Serial Interface  Dual Programmable Serial USART  Master Slave SPI Serial Interface  Programming Flash  Hardware ISP     Special Microcontroller Features      Power on Reset and Programmable Brown out Detection      Internal Calibrated RC Oscillator      8 External Interrupt Sources      5 Sleep Modes  Idle  ADC Noise Reduction  Power save  Power down  amp  Standby      Software Selectable Clock Frequency      Global Pull up Disable       and Packages    53 Programmable      Lines      64 lead TQFP and 64 lead QFN    Operating Voltages    2 7   5 5      Operating temperature      Industrial   40     to  85         Maximum Frequency      8 MHz at 2 7V   Industrial range    16 MHz at 4 5V   Industrial                      CAN Controller          AIMEL      CANAVR Rel  5 00                              LLL            1    ITALIAN TECHNOLOGY    grifo                         8583  Link    URL    Home   Technical documentation Service   PC BUS   Data Sheet PCF8583     Iwww grifo com PRESS DOC PHILIPS PCF8583 pdf    http                                                                                                                                                                                                                           
35. ata bits  1      2  stop bit   RS 232 buffered or at TTL level  one CAN differential serial line completely  compatible with CAN 2 0 specifications part    and B  JTAG interface for in circuit  remote debugging  PC BUS controller  completely software configurable  SPI interface  programmable for syncronous  high speed communications  Reset circuitery  one Real  Time Clock for long and accurate timing  active even in low power modes  capable to  manage date and time and to generate periodic interrupts  240 bytes of SRAM for  configuration parameters  RTC and SRAM backed with on board Lithium battery  2  status LED managed by software through two digital I O lines  Boot Loader preinstalled  that allows to program FLASH and EEPROM through RS 232 serial port  internal  FLASH and EEPROM can be managed through ISP  In System Programming   wide  range of Software Development tools used to develop the user application program  as   Assembler  C compilers  ICC AVR  DDS Micro C   BASIC Compilers  BASCOM  AVR   etc   long list of Demo Programs and use examples supplied under source form   duly remarked  and executable form for the available development tools     Via dell  Artigiano  8 6     B 40016 San Giorgio di Piano  9 rifo  Bologna  ITALY  ITALIAN TECHNOLOGY E mail  grifo   grifo it    http   www  grifo it http   www  grifo com  Tel   39 051 892 052  a r   FAX   39 051 893 661    CAN AVR Rel  5 00 Edition 19 January 2006   aveeo   e              grifo   are trade marks      grifo   
36. d acces control systems   functionality checks  etc    Also  connection on CAN networks with your own protocols or with  standard protocols  like CANopen  DeviceNet  SDS  CAN Kingdom etc      We remark the employ as smart intelligent nodes with local functionalities as PID algorithms for  controlling temperatures  motors  valves  etc  or as decentralized systems as robots  automation of  production line machines  big factory automations    Finally  teleacquisition and telecontrol on medium and low distances  conversion between CAN  and asynchronous serial line or PC BUS line and home automation  lights turning ON OFF   heating and cooling systems control  supervision of electric devices  security and acces control  systems     It is really important the Didactics use in fact CAN AVR offers a very low cost system suitable to  learn a RISC microcontroller with AVR core and to develop the typical start applications for the  students    For this purpose it is likewise interesting the CAN GMT support card that solves the problems for  power supply  RS 232 serial connection to development PC  CAN connection and for module lines  connection    CAN AVR is delivered with a Boot Loader preinstalled  This program allows to reprogram Flash  and EEPROM through a simple RS 232 serial port  for example  PC COM port     On board microcontroller electronics also supports the well known JTAG interface  that allows to  control its working status directly on the application it is running    In t
37. dware serial communication line with programmable physical protocol  Baud  Rate up to 115200 Baud  8 or 9 data bits  1 or2 stop bit   RS 232 buffered or at TTL level     One CAN differential serial line completely compatible with CAN 2 0 specifications part  A and B     JTAG interface for in circuit remote debugging          BUS controller  completely software configurable     SPI interface programmable for syncronous  high speed communications     Reset circuitery     One Real Time Clock for long and accurate timing  active even in low power modes   capable to manage date and time and to generate periodic interrupts     240 bytes of SRAM for configuration parameters     RTC and SRAM backed with on board Lithium battery     2status LED managed by software through two digital I O lines     Boot Loader preinstalled that allows to program FLASH and EEPROM through RS 232  serial port     Internal FLASH and EEPROM can be managed through ISP  In System Programming      Wide range of Software Development tools used to develop the user application program   as  Assembler  C compilers  ICC AVR  DDS Micro C   BASIC Compilers  BASCOM  AVR   etc     Long list of Demo Programs and use examples supplied under source form  duly remarked   and executable form for the available development tools     Here follows a description of the board s functional blocks  with an indication of the operations  performed by each one   To easily locate such section on verify their connections please refer to
38. e pulled up to   Vdc POW through 4 7      resistors     POWER SUPPLY       Mini Module can be supplied by a tension of  5        called  Vdc POW in this manual    CAN AVR design adopted all the circuital and componentistic options that reduce sensibility to  noise and reduce consumption  including the possibility to switch the microcontroller to low  consumption modes    In optimal situation  the minimun consumption  in power down mode  is lower tham   mA  so it can   for example  increase battery life in case of portable applications    For further information please refer to paragraph ELECTRIC FEATURES          Page 20                                  Rel  5 00             INTERRUPTS       A remarkable feature     CAN AVR card is the powerful interrupt management    Here follows a short description of which devices can geneate interrupts and their modalities  for  further information about interrputs management please refer to the microprocessor data sheet or  APPENDIX A of this manual      Pin6of         gt  Generates an interrupt INTO of microprocessor          7 of CN1   gt  Generates an interrupt       of microprocessor     Pin 19 of CN1   gt  Generates an interrupt INT4 of microprocessor     Pin 18 of         gt  Generates an interrupt INT5 of microprocessor     Pin 16 of         gt  Generates an interrupt INT6 of microprocessor     CPU peripherals   gt  Generate an internal interrupt  In detail the possible microcontroller    interrupt sources are  Timer Counter  OCM 
39. eAnisod   g                              2 64         1 9 1105                    Apog             g  eDexoed            jews            805 16848 2                                              uedo      1 1 46108       006  spe  l 8                                                        988984   yian               jen  s   9 X NOISH3A                                                 SS  au erep puas 5 vC                          jddns                    5  NOLLVIWHOHNI 9NIH3QH  198 15898404 oy         ssauppe        9 one     INI 45858494 0080                        2 05                                                      5            1950 du 9   084 59 1 1           qu                           zH 06                                       gt  68  Or                                                                           01      A    OQ  zH 0   195                                      yri 06 0L         99   zH 0   199                        jueuno   jddns                       002     ZH 001   198                            jueuno Ajddns       09    01              snq O l                       1 614   0 9                   519 02                                           jddns     LINN                                                                        viva                    MOIND  1008HW  72   20 OV  31LIHM      V 20   V  Q vau                            ua3isio3H      2 998                       pue           uueje                               553               lt  
40. ed by microcontroller as described in the component  data sheet or in APPENDIX A of this manual          BUS INTERFACE       Standard pin out of 28 pins grifo   Mini Module connector reserves two pins  6 and 7  to PC BUS  interface  These signals are provided with a 4 7      pull up on the Mini Module board    CAN AVR features a hardware      BUS interface and is managed through microcontroller inernal  registers  It can work both as master or slave  in transmission or reception    This interface allows to connect components featuring the same communication standard to expand  locally the potentialities of Mini Module    For this Mini Module  arich serie of demo programs that explain how to use A D and D A converters   memories  temperature sensors  on board RTC  etc  by a complete and well commented code is  available    Remarkable is the possibility to connect the grifo   QTP operator panels serie through      BUS   QTP are capable to manage alphanumeric and graphicdisplay and several models of keyboards   according to the model selected    Mini Modules support cards manufactured by grifo    like CAN GMT  are provided also with a  connector dedicated to      BUS  to easy the field connections    Please remark that RTC with backed SRAM permanently takes the slave address   0  so user  applications cannot use it    For further information please refer to component data sheet or appendix A of this manual     SPI INTERFACE       Mini Module grifo   CAN AVR is provided with a SP
41. eral devices   Whenever the reported documentation is not sufficient  please search a more detailed description of  the devices in manufacturing company data sheets  Furthermore in this chapter the microprocontroller  internal peripheral devices are not described so if their programmation is necessary  please refer to  appendix A of this manual    In the following paragraphs the D7 D0 and  0 7 indications denote the eight bits of the combination  involved in I O operations     ACTIVITY LEDS       The CAN AVR allows software management of activity or status LEDs LD1 and LD2  through an       line of the microcontroller  with the following corrispondence         0 0  gt                       1  gt  LD1 OFF               gt  102 ON      1  1  gt  LD20FF    It is important to remind that PAO and        are not connected to          The signals        and        are set high after reset or power on  so during these phases LEDs are OFF  or disabled     DIP SWITCH       CAN AVR allows to read by software the status of two dip switches  DSW1 7 e 8  through two     O signals of microcontroller     DSW1 7 ON  gt   PA2is0  DSW1 7OFF  gt  PA2isl    DSW1 8ON   gt  PA3isO  DSW1 8 OFF   gt          1    It is important to remind that PA2 and PA3 are not connected to CN1     Page 36                               Rel  5 00             BACKED SRAM   SERIAL              Mini Module CAN AVR is provided with a complete Real Time Clock capable to manage hours   minutes  seconds  day  month  year a
42. es         Reopen     gt  FERRE                        Program 2 2      Compilat               hne V6     Scheda   Rebuild All Shift F9                       is ni Add Topmost Opened File      pd         Remove Selected File s           http   v       15      Options         Realizze Manual Sort Browser Window   Li 1 Lx              Close  Save As          wbhri6s c    FIGURE 22  COMPILATION WITH ICC AVR    E  Page 32                                                              amp                              CANAVR _ Rel  5 00             C4  Program      compiled file into FLASH memory of CAN AVR repeting      steps of  point B     ID                          D1  Close      Boot Loader PC utility     When during execution ofthe steps above described a problem or a malfunction is found  we suggest  to read and repeat again all the steps carefully and if malfunction persists please contact directly  grifo  technician     Instead when execution of all the steps above described is right  the user has realized his first  application program that coincides with demo of CAN AVR    At this point it is possible to modify the source of the demo s program according to application  requirements and test the obtained program with the steps above listed  successive to B and C  in  cyclic mode  until the developed application program is completely well running    When this focus is reached the developmnet PC can be eliminated    Remember to reconfigure USARTO of Mini Module  if required 
43. esponds to logic state 0  while  the  Vdc POW level corrisponds to logic state 1  The connection of these lines to devices of the  controlled system  encoders  switches  proximity  electric valves  power relays  etc   must be  performed through proper power interfaces  it is preferible to adopt opto coupled interfaces that  ensure an electric insulation between Mini Module electronic and external noisy  typically  generated by power electronic       The inputs for analog comparators must be connected to signals generators featuring a low  impedance in the range from 0 to   Vdc POW   to assure greater stability and precision          The inputs for A D converter must be connected to signals generators featuring a low impedance  in the range from 0 to  Vdc POW  to assure greater stability and precision            PWM signals generated by Timer Counter and OCM sections are TTL type so they must be buffered  to interface the power circuitery  Typical interfaces can be current driver Gf PWM signal is still  required  or an intergrator circuit if analog voltage is required       Also PC BUS and SPI signals are at TTL level  as defined by the same standards  for completeness  it is remarked that in a network with several devices and rather long it is better to study the  connection lay out and to set properly the output stage  the best operational modes and the  programmable bit rate  all these conditions allow communications in any condition  On Mini  Module  signals SDA and SCL ar
44. g simple  functional verify operations   in the height respect of the actual safety and health norms     The informations for the installation  the assemblage  the dismantlement  the handling  the adjustment   the reparation and the contingent accessories  devices etc  installation are destined   and then  executable   always and in exclusive way from specialized warned and educated personnel  or  directly from the TECHNICAL AUTHORIZED ASSISTANCE  in the height respect of the  manufacturer recommendations and the actual safety and health norms     The devices can t be used outside a box  The user must always insert the cards in a container that  rispect the actual safety normative  The protection of this container is not threshold to the only  atmospheric agents  but specially to mechanic  electric  magnetic  etc  ones     To be on good terms with the products  is necessary guarantee legibility and conservation of the  manual  also for future references  In case of deterioration or more easily for technical updates   consult the AUTHORIZED TECHNICAL ASSISTANCE directly     CAN AVR Rel  5 00     62 Pare I             i    To prevent problems during card utilization  itis a good practice to read carefully all the informations  of this manual  After this reading  the user can use the general index and the alphabetical index   respectly at the begining and at the end of the manual  to find information in a faster and more easy  way                                      Rel  5 00  
45. h reading specific  microcontroller signals  PA2 and PA3     For further information please see also the paragraph MINI MODULE CONFIGURATION        FicunE 3  CAN AVR PHOTO    CAN AVR Rel 5 00          n    Page 9                                 A D CONVERTERS       Mini Module CAN AVR is provided with a five channels A D converter  multiplexed on signals of  port PF  with 10 bit of resolution    Reference voltage can be fetched externally through a pin or internal reference generator can be used   Range of connectable signals is from 0 to  Vdc         analog signal generator must have a low  impedance    Conversion end can be used to trigger an interrupt  if enabled    Peripheral management is performed by manipulating specific microcontroller internal registers   For further information please refer to Appendix A or to comments in source code of our examples     ANALOG COMPARATOR       Microcontroller Atmel                128 features an analog comparator that can select as input both an  internal reference voltage and several pins  pin 10 and 11 of        but also A D converter inputs   through an internal multiplexer    For further information  please refer to application notes on Atmel web site     TIMER COUNTER AND PWM       Microcontroller is provided with four Timer Counter  two featuring eight bits  two featuring sixteen  bits  capable to count clock pulses  through a programmable prescaler   level transictions on specific  pins and to generate interrupts    They can 
46. he prototyping board  supporting CAN GMx 28 pins Mini Modules   CAN GMT allows easily to       to supply the Mini Module through on board power supply     to have I O port and A D converter signals on a comfortable low profile connector compiant to  standard      ABACO       to have C Bus and interrupt signals on a specific connector  to be able to expand the system with  any      Bus device  driven both in polling and in interrupt     to connect immediatly RS 232  TTL and CAN signals through two comfortalbe D type connectors     to set and visualize the status of up to 6 microcontroller I O signals through coloured push buttons  and LEDs excludible by jumpers     to generate sound feedback using the autoscillating on board buzzer     to develop quickly and comfortably any application taking advantage of the wide prototyping area  provided with duplicated signals    The following configuration is suggested to use the couple CAN GMT   CAN AVR in their base  version  that is RUN mode with serial line buffered in RS 232     Configuration CAN AVR Configuration CAN GMT  JI   1 2  DSW1 1   ON J2   1 2  DSW1 2   ON J3   1 2  DSW1 3   ON 4   1 2  DSW1 4   OFF        1 2  DSW1 5   OFF 6   1 2  DSW1 6   OFF JJ   1 2  DSW1 7   OFF        not connected  DSW1 8   OFF J9   1 2    The serial connection cable with development P C  is the CCR 9 9 E  or in other words an extension  cable provided of D9 Female and D9 Male connectors      Page 24                                       Rel  5 00  
47. his case debugging is controlled through the PC and a specific interface to connect to the six  signals of Mini Module directly available on its socket    The PC program that controls JTAG interface is AVR Studio  free IDE developed by Atmel they  distribute through their website    Both the solutions ensure a short time to market  the user can obtain a prototype or even a ready  product in one week    Overall features are       Standard container with 28 pins male socket  dual in line  100 mils pitch  600 mils width     Very small dimension  42 x 25 x 15 mm     Single power supply voltage required in the wide range from  5 0 Vdc  the current  consumption can change according with module connections      Availability of power saving setting as Idle Mode and Power Down Mode     Atmel AT90CAN128 microcontroller with external 12 Mhz crystal     128 KBytes FLASH for code  up to 8KByes FLASH can be reserved for Boot Loader   4KBytes RAM for data                EEPROM for data    E  Page 4                          CANAVR Rel  5 00               2analog comparators channels with different input and output configurations options that  allow to create easily bipolar A D conversion     5 channels multiplexed A D converter  resolution 10 bits and 6 usec conversion time     37 interrupt sources     4 Timers Counters  up to 16 bits  with functions of PWM  compare  capture  etc      Up to 24 digital I O lines available on connector  some of these lines have multiple  functions      One har
48. ime     Page 12    grifo  ITALIAN TECHNOLOGY                 24 TTL digital I O lines   2 analog inputs on comparator   5 channels A D converter   4 Timer Counter for compare  capture  PWM  1 Watch dog section   1 SPI interface   1      BUS interface   1 CAN interface   1 Real Time Clock section   37 interrupt sources   1 hardware serial line RS 232 or TTL   1 Dip switch 8 ways  1 Dip switch 4 ways  2 status LEDs    128 KBytes FLASH EPROM for code   4 KBytes SRAM for data   4 KBytes EEPROM for data   240 Bytes external SRAM for data  on PC BUS    Atmel               128   12 MHz   Clock I O frequency   from 37 msec to 93 msec  settable through configuration bits  programmable from about 16 msec up to 2 sec    10 bits    min  6 usec  for 10 bits                                        Rel  5 00                   PHYSICAL FEATURES  Size   W x H x D   42 x 25 x 15 mm  Weight  126                        28 pins male socket DIL  100 mils pitch  600 mils width  Temperature range  0450   C  Relative humidity  2090 9090  without condense   ELECTRIC FEATURES  Power supply voltage   Vdc POW     5 0         Current consumption   minimum  12 mA  normal  3  mA  maximum  40 mA  Back up battery voltage  3 0 Vdc  Back up battery consumption  3 9 uA    Impedance analog signals generators    10         RS 232 protection  x15 kVdc       BUS pull up resistor  4 7       Brown out threshold  programmable from 2 5 to 4 1 Vdc  with hysteresis    Page 13    CAN AVR       5 00                          
49. ing and closing the EPSILONS  its control program must be installed  This  program s name is EQTools  and will be called this way from now on For further  information about installing the program and connecting EPSILONS to the PC  please  refer to manual of EPSILONS     C3  Connect the programmer to connector CN7 of GMM TST 2     C4  Insert module in socket Z1 or Z2 of GMM TST 2 using the interface and the instructions  described at points A2 and A3  then turn on power supply of GMM TST 2 as described  in the manual of GMM TST 2     C5  To use Equinox EPSILONS connected to the PC  instead of stand alone   it is required to  open a project file  extension EDS   This can be done creating a new one from stat screen  of EQTools  using specific menus and buttons or loading and existing project file  For  further information about project file management  please refer to manuale of EQTools     C6  Who creates a new project  must be sure to perform the settings shown in figure B 7  Who  opens an existing project must be sure that these settings have already been performed   These settings assure that       The project is programmed correctly by EPSLON5    Target device is               128    File programmed on the target is prCANAVRuk hex      Target component configuration is correct    forfurtherinformation about configuring a project  please referto EQTools documentation     CAN AVR Rel  5 00                            Page    7                          C7  Who creates a new pro
50. ite Erase Cycles      Optional Boot Code Section with Independent Lock Bits  Selectable Boot Size  1K Bytes  2K Bytes  4K Bytes or 8K Bytes  In System Programming by On Chip Boot Program  CAN  UART     8 bit          True Read While Write Operation            Bytes               Endurance  100 000 Write Erase Cycles  Microcontroller      4K Bytes Internal SRAM      Up to 64K Bytes Optional External Memory Space with      Programming Lock for Software Security    JTAG  IEEE std  1149 1 Compliant  Interface      Boundary scan Capabilities According to the JTAG Standard 1 28K Bytes of    Programming Flash  Hardware ISP   EEPROM  Lock  amp  Fuse Bits    Extensive On chip Debug Support    CAN Controller 20A  amp  20B       ISP Flash    15 Full Message Objects with Separate Identifier Tags and Masks      Transmit  Receive  Automatic Reply and Frame Buffer Receive Modes and        1Mbits s Maximum Transfer Rate at 8 MHz      Time stamping  TTC  amp  Listening Mode  Spying or Autobaud     Peripheral Features      Programmable Watchdog Timer with On chip Oscillator      8 bit Synchronous Timer Counter 0  10 bit Prescaler  External Event Counter  Output Compare or 8 bit PWM Output AT90CAN128      8 bit Asynchronous Timer Counter 2  10 bit Prescaler  External Event Counter  Output Compare or 8 Bit PWM Output  32Khz Oscillator for RTC Operation      Dual 16 bit Synchronous Timer Counters 1  amp  3  10 bit Prescaler  Input Capture with Noise Canceler  External Event Counter  3 Output Comp
51. ject  must also indicate to use it as         EDS  mode  To enable         perform Flash write operation the user must move back to Flash menu  put the check sign  on  Edit Menu  checkbox and press button  Write      C8  Window  Write Block to Flash  shows a summar of some current settings to verify them   If they are correct  pressing OK starts the memory writing procedure     C9  Current status of programming is indicated by a progress bar  when programming  completes a message indicates the operation final result     C10  To perform configuration bits write operation it is required to move back to Fuses menu   and press button  Write  in frame  Target Fuses            Programmer and Project Type  Programmer   JEPSILONS      Bet Info       Project           ISP PRO   End in programming                                ATSOCAN128 159x  S   360                 48 20            Atmel    Family       361               88  1                     363                                        My 306   ATmega8                           307                           0      128 15                         Fuses   PC Fuse State   Target Fuse State   Description     CKSELO 1 UNPROGRAMMED   Clock Select 0   CKSEL1 1 UNPROGRAMMED   Clock Select 1   CKSEL2 1 UNPROGRAMMED   Clock Select 2   CKSEL3 1 UNPROGRAMMED   Clock Select 3   SUTO 1 UNPROGRAMMED   Oscillator   Select Start Up Time 0  SUT1 1   UNPROGRAMMED Ig Oscillator   Select Start Up Time 1                   1              kakarry a      
52. l          Note       ISP connector    Search   atS0cant 28 4 found                  Device info   AIMEL          FIGURE B 3  COMPONENT SELECTION USING PG4UW    E  Page B 4     F                    Rel  5 00                               28        15                      141      PIN 3            ee SLA LnIA                              8       9                  4  ISP PROGRAMMING SOCKET FOR CAN AVR AND GMM TST 2    Page B 5    CAN AVR _ Rel 5 00                                             B6  Configure      component using      menu Device options   View Edit options and security   The component must be configured as indicated in figure B 5  that is the configuration  required to make the demo program pr CANA VRuk hex work  Quartz and start up time  options must be configured like in the figure  Other settings are not important  Of course   the user can perform any other configuration required by his her application     B7  Configure the programmer using the menu Device options   Operating options  Programmer  must be configured as indicated in figure B 6     B8  Start the programming operation  pressing the  Program  button     B9  During the programming operation  a progress bar advances until the operation 15  completed  Eventual errors are promptly indicated     Device operation options       Erase before programming    Disable          Blank check before programming   Disable      Verify after reading   Enable  gt    Verify   Once      Verify options   Not supported  g
53. le the Boot Loader itself  and security fuses are out of the range  programmable by the Boot Loader and must be programmed in ISP mode    If you think itis more convenient to use a Boot Loader on RS 232 serial line  referto above mentioned  chapter    For more information on how to connect a PC serial port to GMM TST 2  or even to Mini Module  as stand alone  to test the program  refer to section  A  of chapter  How to start  of manual    For further information on how to develop and debug the firmware  refer to section  C  of chapter   How to start  of manual    Programmers that can be used with GMM TST 2 are       grifo  MP AVR 51    grifo         49    Equinox EPSILON5    ATMEL AVR ISP        COMIMION                             IPIROGIRAMIMUBIKS         1  Programming of Mini Module                       2 board is performed through    specific  connector of the card and  if required  an interface adapter between the programmer and  the connector itself    The two grifo  programmers that can be interfaced with GMM TST 2  that is UEP 49  and MP AVR 51   use a specific interface for each one of them  whose diagram is shown  in figures B 1 and B 2  On the left side of the figures there is the list of GMM TST 2 CN7  connector s ways that must be connected to corresponding pins on programmer s  connector indicated by the arrow    Programmers AVR ISP and Equinox EPSILONS do not require any specific interface     Page    1    CAN AVR _ Rel  5 00                                  
54. loaderGrifo   Please remaind that the string  file  in the above mentioned text box is automatically replaces by  BASCOM AVR with the name of  hex file just generated    Please refer to BASCOM AVR documentation for further information     Page 28                                    Rel  5 00             B1  Find on      grifo  and save to a comfortable position on your hard drive      demo  program  prCANAVRuk hex   It can be found starting from main page following the  path  English   Examples tables   Mini Modules and Mini Block examples   CAN AVR   please refer to figure 16   You may want to remove the read only attribute     B2  Connect the Mini Module to PC serial port makin the connection described at point A   Close the terminal emulator     B3  Indicate in combo box  Com          the serial port connected at the previous point     B4  Check the check box  Application Code  and press the button  Browse  on the right  then  select the file previously saved at point          B5  Uncheck the check box  EEPROM Code   if checked     B6  Press the button  Synch to Bootloader     or the key combination Alt S on the PC  then  reset the Mini Module or turn off and then on its supply  The file is dowloaded into the  Mini Module  If this does not happen  and the program should indicate a  No repsonse  from target bootloader   try to repeat the operation decreasing the time between pressure  of button on the PC and reset of Mini Module  If the problem persists  check cable and  con
55. nd weekday in complete autonomy    This module can be backed up through the back up circuitery to warrant data validity in any working  condition and is completely managed by software    RTC section can also generate periodic interrupts at software programmable time intervals  to switch  the CPU out of normal operations or to awaken it from low consumption modes    For software management of serial SRAM   RTC backed module  please refer to specific  manufacturer documentation  This manual reports no software information because management  of this component is complex and requires a deep knowledge  anyway the user can use the demo  programs supplied with the card  The board control logic allows to realize a serial communication  with PC bus standard protocol  through two I O microprocessor pins  The only necessary information  is the electric connection     PD1   INTI   SDA  input output    gt           line  SDA   PDO   INTO  SCL  input output    gt  CLOCK line  SCL     Please remark that AO of this component s slave address is bound to logic 0    This means that RTC takes permanently the slave address   0  which is not available for user  application    The above mentioned module is capable to generate a programmable periodic signal  which is  connected on board to a 4 7 kQ pull up  and is available on pin 11 of Mini Module connector CN1   and is connected to signal PD4 of microcontroller     CPU INTERNAL PERIPHERALS       Registers description and purpose for all internal 
56. nection     B7  When operation is completed the program reports its status  In case of problems  check  cable and connection     B8  Start the terminal emulator configured like in point A2 and verify that the application  program just downloaded is executed in internal Flash     AVR Bootloader                   1 1                   1  amp            ITALIAN TECHNOLOGY    m gut ams          Appkcation Code  7                    MES Electronics BASDOM AVR Am128T5T4AM128 Browse    EEPROM Code       Byowar  Synch to Boofloader       Status Idie                    17           LOADER UTILITY    CAN AVR _ Rel  5 00                               Page 29                                                                              INING IDIEMIO TB TB  CU LAUDILIp CO DB      1     C2     C3     Install on the hard disk of the development P C  the software environment selected to  develop the application program  As described in the chapter SOFTWARE  DESCRIPTION there are many different software tools that satisfy any customers  requirements but here we remind only the most diffused as the BASCOM AVR  ICC  AVR  etc     Ongrifo   CD in addition to file with the executable code of the demo program  described  at point B2  there are also the source files of the same  These have an extension that  identifies the used software development tools  for example prCANAVRuk bas for  BASCOM AVR or prCANAVRuk c for ICC AVR  and they are properly organized  inside demo programs tables available on C
57. nication lines  the on board peripheral devices  signals  the operating mode selection lines  etc    Some pins of this connector have multiple purposes  in fact they can be multiplexed by programming  some software registers with several CPU internal devices and the following figure lists all these  possible functionalities  So the signals available on CN1 have different types as described in the  following CONNECTOR SIGNALS INTERFACEMENT paragraph and they follow grifo  Mini  Module standard pin out     Page 14                n     N   nTU i  CANAVR Rel  5 00             To avoid problems in      counting and numbers      figure 7 shows      signals directly on the top view  ofthe CAN AVR  moreover the serigraph reports the pins number on the four corner of the card both  on bottom  solder  and top  component  side     AREF 1  Vdc POW   RESET 2 PFO   ADCO  RXDO PDI PEO 3 PB7   OCOA              TXD0O PDO PE1 4     6  OCIB                 PD4 ICP1 5     5            PDO INTO SCL 6                            PDI INTI SDA 7     5  ADCS   TMS  CANL PB3 MISO 8 PF6  ADC6            CANH PB2 MOSI 9 PF7  ADC7  TDI    PE2 XCKO AINO 10 50        PE4   INT4   OC3B                            11 1   PES         5   OC3C  PBI SCK 12    PD7 TO  PBO  SS 13 PE6                        GND 149   z HIE                 FIGuRE 7          SOCKET      MINI MODULE SIGNALS    Signals description     RXDO0   I   Receive Data of USARTO  it can be buffered as RS 232      TTL        0        Transmit Dat
58. peripherals  Analog COMPARATORS  A D  CONVERTER  Timer Counters  USARTO  CAN       BUS  SPI  OCM  etc   is availabe in the proper  data sheet and user manual of the manufacturer    Please refer to chapter BIBLIOGRAPHY and to appendix A of this manual to easily locate such  documentation     Page 37    CAN AVR       5 00                                                                        BIBLIOGRAPHY       In this chapter there is a complete list of technical books and notes  where the user can find all the  necessary documentations on the components mounted on CAN AVR Mini Module     Technical paper MAXIM  True RS 232 Transceivers  Manual PHILIPS  I2C bus compatible ICs  Technical paper ATMEL  Data Sheet Atmel                128    The described manual can be requested directly to manufacturer or local dealers  Alternatively this  information and or upgrades can be found in specific internet web pages  of the listed companies     Page 36    e                                Rel  5 00    grifo      ITALIAN TECHNOLOGY       10 ISIN       NVO        4007                                  8   SU  ccr SU  TET SU         X                  44414 Tv pras  DE           peras  NVO       81295        jers                                        AVIAN ZEZ SU                            10                 54 poaragnq                   LLL TV LIDIG         LLL                            S                AMONGIN NAINDId              SAOVANALNI      TV LISIG       AO43pA   0         OLVNVdIN
59. ption of the product is available in the relative data sheet and technical manual while in this   paragraph are listed the advantages obtained by using this pair of cards    GMB     84 allows easily to      to supply the Mini Module through on board power supply      to have eight TTL I O signals of microprocessor ports optocoupled NPN and PNP at the same time  and visualized through green LEDs  I O signals are multiplexed with timer inputs  so developed    functions like counters are immediatly available       to have four TTL I O signals of microprocessor ports on bufferd relays driving and visualized  through red LEDs       to connect           BUS and  5 Vdc power supply on a dedicated connector     to connect immediatly communication serial line through a comfortable 9 ways DB9 connector     to buffer easily TTL UARTO signals from microprocessor in RS 422  RS 485 or current loop       to connect PWM signal through a comfortable standard AMP connector     The serial connection cable with development PC is the CCR 9 9 R  or in other words a reversed  extension cable provided of D9 Female and D9 Male connectors           Page 22                          Rel  5 00          ITALIAN TECHNOLOGY                          gQgrifo                            FIGURE 13  IMAGE OF MODULE GMB      84        CAN AVR    Page 23    CAN AVR Rel 5 00                                        USE WITH        TST2 MODULE       Amongst grifo  cards  CAN GMT is the one designed specifically to be t
60. requency 0 9 3 0 MHz  Startup time              65 ms     Ext  Crystal           Frequency 3 0 8 0 MHz  Start up time  258 CK   4 1        Ext  Crystal          Frequency 3 0 8 0 MHz  Start up time  258        65 m    Ext  Crystal           Ext  Crystal Osc     Ext  Crystal Osc       Ext  Crystal Osc       Frequency 3 0 8 0 MHz  Start up time  1K CK   0 ms   Frequency 3 0 8 0 MHz  Start up time  1K CK   4 1 m  Frequency 3 0 8 0 MHz  Start up time  1K CK   65 ms             Frequency 8 0 16 0 MHz  Start up time  258       6514    n  r  n     Ext  Crystal          Frequency 8 0 16 0 MHz  Start up time  258        4 1  r  Iv      Ext  Crystal          Frequency 8 0 16 0 MHz  Start up time  1K CK   0 ms              Crystal          Frequency 8 0 16 0 MHz  Start up time  1K        41 n     Ext  Crystal          Frequency 8 0 16 0 MHz  Start up time  1K        65          Ficure B 9  CPU CONFIGURATION USING AVR STUDIO    v Erase Device  Check signature  Program FLASH  Verify FLASH  Read FLASH  Program EEPROM  Verify EEPROM  Read EEPROM  Write osc  cal  byte  v  Program fuses  Verify fuses   Read fuses  Program lock bits  Verify lock bits m  Read lock bits       F  LB ETE        vendi    DIGWSE                   B 10  AVR ISP CONFIGURATION USING AVR STUDIO                  CANAVR   Rel  5 00    e             APPENDIX            TST2 ELECTRIC DIAGRAM       In this appendix are reported the electric diagram of CAN GMT support card that shows the  connection modes for Mini Module sign
61. roller  thus allowing the use of RS232 serial  driver  Used in conjunction with DSW1 1 3     It connects on board battery to RTC PCF 8583  allowing to  keep date  time and SRAM content even when power supply  is turned off     It does not connect on board battery to RTC PCF 8583  so  date  time and SRAM content        lost when power supply is  turned off    It connects PA 2   AD2 signal to GND signal  This switch  can be a user input    It does not connect PA 2   AD2 signal to GND signal  PA 2   AD2 is connected to  Vdc POW through a pull up  This  switch can be a user input    It connects PA 3   AD3 signal to GND signal  This switch  can be a user input    It does not connect PA 3   AD3 signal to GND signal  PA 3          is connected to  Vdc POW through a pull up  This  switch can be a user input                   9  DSW1 8 ways Drip              TABLE    CAN AVR       5 00                               Page 17                   58              uan vetinoros     SERIAL COMMUNICATION SELECTION       Serial communication line of CAN AVR can be buffered as RS 232 or TTL    By software  it is possible to define physical communicatin protocol for the line setting some  microcontroller internal registers    The serial interface has its own group of registers for configuration  and can work in total  independence respect to the other peripherals    Electric protocol is selected by hardware and requires the dip switches to be configured correctly   as described in previous tables 
62. t       ISP Target Supply Parameters    Enable target system power supply    Voltage  2000  6000      50100            current  0  300 m      250      Voltage rise time  us   o    Target supply settle time  us    io                                   10  Power down time  us   10000      Target system parameters                     Oscillator frequency          12000000      Supply voltage  mv    p   Ds    Disable supply voltage test  Delay after reset active                   Inactive level of all ISP signals  Pul dow  gt          Keep ISP signals at defined level after operation  Programming parameters       Flash      EEPROM                       B 5  PROGRAMMER CONFIGURATION USING PG4UW          Clock option and start up time         CKSEL21111  SUT 11  Ext  crystal resonator ose  3 0 MHz   8 MHz  start up time  16K        64 ms             Calibration bytes   IER    FIGURE B 6  COMPONENT CONFIGURATION USING PG4UW                               Rel  5 00    Page B 6    e                                                                                    Programming of Mini Module on           TST 2 board is performed through    specific  connector of the card  First of all  programmer Equinox EPSILONS must be physically  configured to connect to GMM TST 2  To perform such configuration       Connect the 10 ways flat cable to connector  J7 ATMEL 10  of EPSILONS    Connect jumper J9 of EPSILONS    for further information please refer to manual of EPSILONS     C2  After configur
63. t       p 1    10    g          6  FIGURE    1  DIAGMAM OF INTERFACE BETWEEN        TST 2        MP AVR 51     CN7 ISP         TST 2 UEP 49    184   6    2       1    9 all    10    g          7    FIGURE B 2  DIAGMAM OF INTERFACE BETWEEN        TST 2        UEP 49                       5 00                               Page B 3                                           5  IPIROGIRAWWIMUUNG               WUPSAWIR 5         gt              4              Instructions for installing  connecting to PC and using      programmer are delivered with  the programmer itself  The control program for all grifo   programmers is called  PG4UW and will be indicated by that name from now on     B2  Connect the programmer to GMM TST 2 using the interface described at point A2     B3  Insert module in socket Z1 or Z2 of GMM TST 2 using the interface and the instructions  described at point A2 and A3  then turn on power supply of GMM TST 2 as described  in the manual of GMM TST 2     B4  Select AT9OCAN128 ISP as the component to program in specific menu of PG4UW  as  indicated in figure B 3     B5  Load the file previously saved on point A4  by pressing the button  Load      Select device X          Only selected type   Only selected manufacturer                       Manufacturer   Name   Adapter  Atmel               128            4  DIL40 TQFP64 ZIF                2  ATSOCAN128  MLF64  DIL40 MLF64 ZIF CS AVR 1  ATSOCAN128  ISP  Note  via ISP connector  ATSOCAN128  ISP JTAG           i Atme
64. ternal drivers  RS 232   RS 422  RS 485  Current loop  etc    Please remember that on CN1 connector more than standard  receive and transmit signals are available also other I O signals that can be driven by software  these  signals can be used to define the RS 485 line direction  to enable the RS 422 transmit drive or to  generate an RS 232 handshake  For example it can be used the MSI 01 module that converts a TTL  serial line in any other electric standards in a pratical and inexpensive way    Please read SERIAL COMMUNICATION SELECTION paragraph of this manual or contact  directly grifo   technician for further explanation or any other necessary information     CLOCK    On CAN AVR module there are two separate and indipendent circuits based on crystals  that  generate the clock signals for the microcontroller and the RTC module    The first generates a 12 MHz while the second generates a 32768 Hz    The choice of using two circuits and two separated clock sources  has the advantage to reduce cost  in the larger number of low  middle speed applications and to afford the high speed applications when  necessary    About speed and performances please remind that CAN AVR has aRISC microcontroller on board   capable to execute in average one instruction per clock cycle    So  considering the frequency of quartz installed  execution speed may be almost 12 MIPS     Page 6                  OAOq                  Rel  5 00                     POW    5                   2 signals    2
65. unctions in all the available connection modes    The    asterisk  denotes the default connection  or on the other hand the connection set up at the end  of testing phase  that is the configuration the user receives    To recognize the configuration elements location  please refer to figure 12    For further information about serial communication lines  please refer to paragraph SERIAL  COMMUNICATION SELECTION     It connects output CAN L of CAN driver to signal CANL   PB3   MISO of CNI  Used in conjunction with DSW2 3    It does not connect output CAN L of CAN driver to signal  CANL   PB3   MISO of CNI  Used in conjunction with  DSW2 3    It connects output CAN H of CAN driver to signal CANH    PB2   MOSI of CNI  Used in conjunction with DSW2 4    It does not connect output CAN H of CAN driver to signal  CANH   PB2   MOSI of CNI  Used in conjunction with  DSW2 4    It connects signal CANL   PB3   MISO of CNI to pin 13 of  microcontroller  signal MISO   PB3   Used in conjunction  with DSW2 1     It does not connect signal CANL   PB3   MISO of CNI to  pin 13 of microcontroller  signal MISO   PB3   Used in  conjunction with DSW2 1    It connects signal CANH   PB2   MOSI of     1 to pin 12 of  microcontroller  signal MOSI   PB2   Used in conjunction  with DSW2 2   It does not connect signal CANH   PB2   MOSI of CNI to  pin 12 of microcontroller  signal MOSI   PB2   Used in  conjunction with DSW2 2                    8  DSW2 4 ways Dip switcH TABLE                   16           
66. use for communication with Mini  Module    Checking the ckeck box  Application Code       file whose name is written in the text box on      right  will be stored in Flash of Mini Module  To choose the file press the  Browse  button    Chek box  EEPROM Code  performs the same operation described above  but writes to EEPROM     There is also the possibility to use AVRBootloaderGrifo from DOS window  commands prompt  a  command line or as an external tool of an IDE   Option for command line are                com2        com9 Number of serial port used for communication   Serial ports from       1 to COMO are supported      lt FLASHProgram gt  Indicates the complete pathname of the  HEX file to write in    microcontroller FLASH memory        lt EEPROMProgram gt  Indicates      complete pathname of       HEX file to write in  microcontroller EEPROM memory  For example   AVRBootloaderGrifo exe  com2  f C  Projects MotorControl Main hex  opens a connection on serial port COM  to the Boot Loader and sends the file Main hex located in  folder C  Projects MotorControl    To integrate AVRBootloaderGrifo exe in a IDE  for example the one of BASCOM AVR  described  at point C  the user must     1  Open the window of menu Options   Programmer   2  In the text box Programmer choose  External Programmer    3  Click the tab Other   4  In text box Program insert the complete pathname of AVRBootloaderGrifo exe pressing Browse  5  In text box Parameters insert command line parameter for AVRBoot
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
ENTERPRISE HD IP PHONE  Premier LMVF, 37" - 63"  Baixar Manual  Manual - Festo  Manual Cod. 130.20000  ESP 620 - Einhell    Delta Series 725-732-735-745-755  tde1032-14 fr tondeuse électrique  ÿþT aro - ¨Ÿ×O¶UmiI{n0`›6RÊSs0miÙRn0    Copyright © All rights reserved. 
   Failed to retrieve file