Home

Kameleon - K-Team

image

Contents

1. gee 9 L EDS 2 RE Ag ne ohare Aoki need eed daa Rd Paes 9 The RS232 GODHOOlOE sss SES SX Eutr eee Genes 10 The BDM connector suus be ex es ehrRES TREE rannen 10 The K Net extension connector leeeeees 10 The MMA extension connector 00 5 10 The SXB extension connector 0000 5 11 The CXB and IXB extension connectors 11 Cables and accessories 0 0 0c eee eee ee eee 11 External power supply 0 0 eee eee eee eee 12 cun aserite oaeen veh dese ee Suan eee ow sed eee aoa 12 Extension possibilities leere 12 Unpacking I88b ode Re RR EEREETERd ERE E RR ECRPE RE AREE 13 eonun PPP 14 MMA interconnection 0 cece eee eee 14 Configuration for Kameleon computer communication 15 The serial communication protocol 0 0 0 cece eee eee 16 Ihe dO0ls ceeceer eee deeuehe ee Sees she chee ete esters sus 16 he control pEOIOBOLo cured pe ene se CERERI GRENIER EE 17 Testing a simple interaction 0 0 0 eee eee eee 18 Using LabVIEW coasvedd vata ro OR oenovatecorscaarsass 20 Hardware configuration slseeeeeeeeeee 20 Setup of the serial link 22cccceeeeaeeridaveiaseacaracas 20 Powersupply 2 42 iR ER IRE RE C radii Or edan REI ENE 21 Using MATLAB C iio traciad esser dibesirese t Goad dnb 25 Hardware configuration slseleeeeeeeeeee 25 oet up of the serial link 445 4040 sds den ee ave RARE REC 26 Ref
2. 26 MMA extension connector 27 Board fixation hole 3 1 2 Mechanical support The Kameleon board has to be mounted using the four fixation holes items 2 8 22 and 27 of figure 1 These holes are made for a fixation with M3 screws 3mm in diameter and are placed on a grid having a step of 15 mm The MMA extension connector cannot be used as mechanical support of the board To stack several Kameleon boards please plan to fix them by mean of stand offs board spacers 3 1 3 Power supply and main fuse The Kameleon board accepts a main DC power supply having a voltage between 8 5V and 20V This voltage has to be applied on the power supply connector between V and V The same connector deliver a 5V logic power supply output The logic ground and the power ground V are connected on the board 1 2 GND Logic power supply ground 3 4 VCC Logic power supply output 5V 5 6 V Generic DC power supply 7 8 V Generic DC power supply Figure 2 Power supply connector The Kameleon board has no main ON OFF switch A fuse protects the Kameleon board against major problems The fuse is placed near to the main power connector as illustrated in figure 3 The fuse current limitation is 1A temporized Figure 3 Fuse location 3 1 4 Basic configuration jumpers A grid of 2x4 jumpers holes item 10 in figure 1 is placed near the RS232 connector O O O Figure 4 Basic configuration jumpers location
3. Adding a communication board on the SXB connectors see The SXB extension connector on page 11 Adding devices on a bus managed by a SXB extension An example is the CAN bus which can be added to the Kameleon board using an SXB board and which enables to connect sensors actuators and other boards to the Kameleon board Adding an application specific electronics on the CXB or on the IXB or on both extension connectors see The CXB and IXB extension connectors on page 11 Adding a Khepera compatible extension turret on the K Net connector see 12 The K Net extension connector on page 10 e Adding a MMA device on the MMA connector see The MMA extension connector on page 10 On the MMA bus the Kameleon board can be configured as master or as slave In this way several Kameleon boards can be combined to build a multiprocessor system Adding devices on the MUBUS bus which can be obtained by a particular configuration of the MMA bus connector see Running modes on page 6 4 UNPACKING TEST ERN After unpacking it is important to test the basic functionality of the Kameleon board Several of these functionnalities can be checked at boot looking to the LEDs available on the board To observe the LEDs activation please operate as following Verify that the Kameleon board is set in the running mode 5 see Running modes on page 6 Figure 11 Settings of the jumpers for the running mode
4. The jumpers configuration define several basic functionnalities of the Kameleon board Some example are given in figure 5 For more details please consult the schematics of the board Default configuration boot on FLASH AVEC on extension bus rJ rr M M o E boot on extension bus CSExt4 on FLASH OOO boot on FLASH CSExt4 on extension bus o CK XJ G 8 bit boot mode oo oo Figure 5 Examples of basic jumper configuration 3 1 5 Running modes The running mode of the board is defined by a DIP switch item 4 in figure 1 and defines the software executed at boot by the Kameleon board The software installed on your board includes an important library of modules for the real time control of the Kameleon board Part of these modules building the BIOS ensure the basic functionnalities of the Kameleon board like hardware configuration bus recognition extensions setup etc Another part of these modules ensure the interface with the user through the serial line or another communication channel Depending on the use of the Kameleon remote control downloading test etc you can specify the boot on a given software module by setting the correspondent running mode Three switches posi tions 1 2 and 3 of the running mode selector item 4 of figure 1 allow the selection of the most important running modes in several configurations You have the choice between the following switch configurations see figure
5. 5 Power supply the Kameleon board DP om A 2 2 se 9 5 3 na H o o Z x A Figure 12 LEDs positioning and functions User LED 4 User LED 3 User LED 2 User LED 1 User LED 0 RS232 Rx RS232 Tx The LEDs should have the following activation First of all the power supply LED should become active Then the K Net activity should blink shortly This correspond to the auto 13 configuration test of the K Net network Just after the K Net activity the RS232 Tx transmit LED should blink showing that the Kameleon board is started in mode 5 and send the wel come message At the same moment the ALIVE LED User LED 4 should start blinking in a regular way This shows that the processor has a process running in it 5 CONNECTIONS ERN There are two main standard connection a first one to stack Kameleon boards and enable the communication on the MMA bus and a second one that allows the communi cation between the Kameleon board and the host computer 5 1 MMA interconnection Warning It is necessary to make all connection with the board power supply switched OFF or the batteries disconnected Making connection with a powered board can cause damages Pee o ooo eee coc coset ese ese ese estes OTT Spacer board stand off cZ CITIES J MMA cable Power supply Figure 13 Connections to stack several Kameleon boards To ensure the functionality of several Kameleon boards pl
6. 7 for the corresponding switch Figure 6 Position of the DIP switch running mode selector positions 0 1 Ci cops eS D The serial link set up is always 8 bit 1 start bit 2 stop bit no parity Only the baud Reserved User FLASH application execution Starts the program stored by the user in FLASH memory Default serial line speed is 38400 Baud Start the SerCom mode on the MMA as communication channel Reserved Reserved Start the SerCom mode on the RS232 as communication channel Default serial line speed is 38400 Baud Reserved Download mode to recharge the full Kameleon system WARNING this operation erase the system Be sure to have a new one to down load rate changes Running mode 0 Running mode 4 Running mode 1 Running mode 5 Running mode 2 Running mode 6 Running mode 3 Running mode 7 Figure 7 DIP switch running mode setting for positions 1 2 and 3 The switch 4 of the running mode selector item 4 of figure 1 defines if the board acts on the MMA bus as slave or as master If set on the OFF position the board is a MMA master If set on the ON position the board is a MMA slave This setting is useful only with multiple boards configurations or when using the Kameleon board as Koala extension board The switch 5 of the running mode selector defines if the MMA extension connector is used as MMA communication port or as MUBUS extension connector If set on the OFF position the con
7. RS232 connector The 9 pin DB9 connector item 9 of figure 1 enable a primary RS232 connection with the Kameleon board This RS232 interface is configured as DCE and can therefore be connected directly to a computer No null modem is needed to connect the Kameleon board to a computer A null modem cable is needed for the connection of the Kameleon board with another DCE device like a modem for instance This primary RS232 connection is used for all messages of boot and interaction with the user equipped with a terminal or a higher level interface LabVIEW or MAT LAB for instance A secondary RS232 connection can be obtained equipping the Kameleon board with an extension board on the SXB connectors item 5 of figure 1 3 1 9 The BDM connector The Kameleon board is equipped with a BDM connector item 6 of figure 1 which enable the access to the Background Debug Mode of the microcontroller This hardware feature of the CPU32 core of the Motorola microcontroller enable to make very low level debug on the code running in the microcontroller Please refer to the Motorola documen tation Motorola98 for more details 3 1 10 The K Net extension connector The K Net network is a Khepera compatible serial communication network for multi processors systems On the Khepera robot this bus is used for the communication between the exten sion turret processors and the main Khepera processor The main Khepera processor is considered as master on
8. Terminal ui HH ERR T SR AN NN mE MEN Characters to Write SET baudrate now SET automatically new baudrate Figure 24 K Terminal panel K Terminal allows you many possibilities of interaction with your Kameleon board We will list the main controls and explain their effect The predefined commands menu gives you some standard tools As soon as the tool is chosen please click on the SEND button to make it effective The result is given in the main log window More specific commands like help memory can be entered in Characters to write and sent with the corresponding SEND button The result is also listed in the main log window Two buttons on the top right of the widows allow to download or simply send files to the Kameleon board The difference between the download and the send operation is in the fact that the download button set the Kame leon board in the sloader mode before sending the file The send button simply send the file without special operations As soon as a button is acti vated a dialog box asks for the file name The Set baudrate menu under the main log window make it possible to change the baudrate when the VI is running To make the menu selection effective please click on the SET baudrate button 24 The Move to baudrate menu under the main log window make it possible to change automatically to a new baudrate when the VI is running under the SerCom protocol Thi
9. and the files available on the K Team WEB site are based on LabVIEWS version 5 LabVIEWS runs on your PC Macintosh or SUN and can control the function ality of the Kameleon board using the serial communication protocol described in sec tion 6 2 7 1 Hardware configuration Set your environment as illustrated in section 5 2 The jumpers must be set as showed in figure 17 to obtain the running mode 5 for more details on running modes please refer to section 3 1 5 XXJXXJ z Figure 17 Settings of the jumpers for using LabVIEW and a serial connection at 38400 baud 7 2 Set up of the serial link To enable the exchange of information between your computer and the board you have to configure the serial link of your host computer according to the one you settled on the Kameleon board Be sure that the connection cable is connected at both ends Kameleon and host computer that the board is powered DC power supply then start LabVIEW and open the Set up vi virtual instrument called VI present in the package The panel illustrated in figure 18 should appear 20 o Set up vi HE EH Figure 18 Set up panel for serial link initialisation Now select the serial port on which the board is connected This selection depend on which port you use and the type of computer you have This choice must be made for every module that you will use Then click once on the r
10. microcontroller like analog inputs timer signals TPU lines etc 3 20 Cables and accessories The power supply cables allows the connection between the Kameleon board and a power supply or a battery pack Please consider that black wires have to be connected to GND blue wires to the positive pole between 8 5V and 20V 11 1 2 GND Logic power supply ground 3 4 VCC Logic power supply output 5V 5 6 V Generic DC power supply 7 8 V Generic DC power supply Figure 10 Power supply connector Two spare fuses to replace item 3 of figure 1 are also included in the package For any other accessory you would need to use the Kameleon board please contact your Kameleon distributor 3 3 External power supply A DC power supply or batteries can be used to power the Kameleon board The input voltage have to be between 8 5V and 20V A switching converter is present on the Kameleon board and ensures the 5V generation Typical power consumption is 180mA under 12V DC SAFETY PRECAUTION The power supply must be provided to the Kame leon board only when all other connections are already made 3 4 Software Software 1s available from the K Team WEB server under http www k team com download Please check this page for LabVIEW MATLAB or Mathematica modules as well as compilers This page also include software and documentation updates 3 5 Extension possibilities The Kameleon board can be extended in several ways
11. no parity The communication between the host computer and the Kameleon board is made sending and receiving ASCII messages Every interaction is composed by A command sent by the host computer to the Kameleon board and fol lowed by a carriage return or a line feed When needed a response sent by the Kameleon to the host computer In all communications the host computer plays the role of master and the Kame leon board the role of slave All communications are initiated by the master The communication is based on two types of interactions one type of interaction for the set up of the board for instance to set the running modes the transmission baudrate and one type of interaction for the control of the functionality of the board for instance to set LEDs state read analog inputs The interactions allowing the set up of the board are based on commands called tools The interactions for the control of the board functionality uses protocol commands and responses 6 1 The tools Here is the description of some basic tools run Starts a function stored in the FLASH It has to be followed by the function name The functions available in the FLASH can be listed with the list tool and have an identification string beginning with FU Some of the functions corre 16 spond to the running modes presented in the section 3 1 5 Using the run tool it is possible for instance to start the user FLASH mode correspondin
12. redial 5 Q Drop DTR to hangup Yes 10 R Modem has DCD line Return or Esc to exit CTRL A Z for help 9600 SN1 NOR Minicom 1 75 1996 VT102 Offline Figure 33 Modem settings in MINICOM On SUN a common tool is tip used on the dev ttya or dev ttyb ports More details are given in the manual man tip 35 APPENDIX E COMMON RUNNING MODES ERN SerCom communication on RS232 at 38400 MUBUS interface powered SerCom communication on RS232 at 38400 MUBUS interface not powered SerCom communication on RS232 at 38400 MMA master SerCom communication on RS232 at 38400 MMA slave 0 SerCom communication on RS232 at 38400 MMA slave 1 SerCom communication on MMA MMA slave 0 SerCom communication on MMA MMA slave 1 User FLASH application MUBUS powered User FLASH application MMA master Reloading system mode WARNING this mode erase the system Figure 35 Examples of common running modes To have more details on how to select running modes see Running modes on page 6 The set up of the jumpers can be changed at any time If the Kameleon board is running it is necessary to reset it to make the set up effective 36
13. slave receiving a command answers to this command in the same way putting the answer message inside the FIFO going in the opposite direction and generating an interrupt on the destination processor Depending on the running mode configuration see Running modes on page 6 the MMA connector can be reconfigured to implement a MUBUS connector MUBUS is a simple 8 bit processor bus equipped with some address lines chip select and read write signals Please consult the technical description K Team99 for more details 3 1 12 The SXB extension connector The Kameleon board is an open system with several extension possibilities One of this possibilities is available using the Serial eXtension Bus SXB connector item 5 in figure 1 which enable addition of communication channels Optional modules can be plugged on this connector to implement a second RS232 line or to access to a CAN bus SXB extension boards have to be fixed on the SXB fixation supports 3 1 13 The CXB and IXB extension connectors The Kameleon board application specific functionnalities can be drastically extended by two piggy back connectors the CXB CPU eXtension Bus and the IXB Interface eXtension Bus connectors The CXB extension connector item 23 of figure 1 support mainly CPU bus sig nals like data addresses chip select etc The IXB extension connector item 24 of figure 1 support mainly signals coming from the peripherical modules of the Motorola 68376
14. the network all other processors as slave Each slave has its own identification number which is unique on the network The communications are always initiated by the master and slaves answer only to master requests At boot the master scan the K Net bus to identify all extensions placed on it and download from each of them the specification of the turret This gives to the system and to the user the possibil ity to know exactly the number and configuration of the extensions On the Kameleon board this bus can be used to connect Khepera turrets or other devices equipped with the K Net bus 3 1 11 The MMA extension connector As for the K Net see The K Net extension connector on page 10 the MMA Multi Microcontroller Adapter extension bus is used for inter processor communica tions Compared to the K Net the MMA bus is much faster because not serial but paral lel The communication on the MMA bus is based on FIFO memories associated with specific electronics for interrupt generation on the destination processor and FIFO mem 10 ory management As on the K Net devices on the bus can be master or slave The com munication is always initiated by the master The slave only answers to master requests Messages are placed into the FIFO memory and an interrupt is generated on the destina tion device as soon as the message is completely inside the FIFO memory The destina tion device reads the FIFO content and in the case of the
15. 3 1 5 Figure 25 Settings of the jumpers for using MATLAB and a serial connection at 38400 baud 25 8 2 Set up of the serial link To enable the exchange of information between your computer and the board you have to configure the serial link of your host computer according to the one you settled on the Kameleon board To install the MATLAB modules to control the Kameleon board please down load the package from the K Team WEB site http www k team com download and follow the README instructions Be sure that the connection cable is connected at both ends Kameleon and host computer that the board is powered DC power supply then start MATLAB and set the accesses to the K Team package as indicated in the README file To open a serial connection with your Kameleon board you have to use the kopen command as follow ref kopen 0 38400 1 ret 1 0e 009 0 0000 2 0133 0 0009 0 0386 The first parameter of kopen is the serial port The serial port number 0 correspond to the modem port on MAC and to COMI on PC The serial port number 1 correspond to the printer port on MAC and to COM2 on PC The second parameter is the baudrate The third parameter is the timeout in seconds This function returns a ref matrix which will be used for all other communication with your Kameleon board Before leaving MATLAB always close the connection using kclose ref To send a command string and get a single line answ
16. _ana_value panel an indicator shows the voltage on the given channel 22 Another VI which has a visible action on the Kameleon board is the Set_LED vi This VI enable to control the activity of the 5 user LED see LEDs on page 9 Please remember that LED 4 is used by the ALIVE process and that your action will be com bined with the action of the ALIVE process Set LED pj gt El E Led number Action Figure 22 Set LED panel both LED number and action can be set To use this VI choose the LED number entering it and choose the action to per form using the Action menu Clicking on the run arrow will execute your command Several other VIs are available to control the Kameleon functionnalities There is at least one VI for each command of the SerCom protocol described in Appendix A To use all functionnalities and test in details all the SerCom protocol you can also use K Terminal vi When started this VI display the panel illustrated in figure 23 a E Tram aa Figure 23 The K Terminal panel when started some choices have to be made 23 As soon as the K Terminal is started please choose the machine you are working on the serial port where Kameleon is connected as well as the baudrate Normally you should choose running mode 5 and therefore a baudrate of 38400 Once the settings are chosen please click on OK and the panel will change to the layout shown in figure 24 K
17. _kameleon USER MANUAL Version 1 0 K Team S A Lausanne 5 May 1999 Documentation author K Team Ch de Vuasset CP111 1028 Pr verenges Switzerland info k team com http www k team com Trademark Acknowledgements IBM PC International Business Machines Corp Macintosh Apple Corp SUN Sparc Station SUN Microsystems Corp LabVIEW National Instruments Corp Kameleon Khepera K Team NOTICE The contents of this manual are subject to change without notice All efforts have been made to ensure the accuracy of the content of this manual How ever should any error be detected please inform K Team Theabove notwithstanding K Team can assume no responsibility for any error in this manual TABLE OF CONTENT EN Introduction 4v e RREA ERE AMRAERRTAG XA REGERE EREAd a 1 How to Use this Manual i1 25 9 n b RR ERR RR 1 palet Precautions uie equis pw rema P rk pu er weeks 2 IROCYCINE czloiereas ke RR ER P GER RR eR RR ERG Er RES 3 Unpacking and Inspectloli 2o 22d ep dumme prr hRRE 494440400805 3 The Board and its Accessories 4 2 oo 24 2 vieguse du genedendeewax 4 The Kameleon 376 SBC 2 eee eee eee 4 OVerVIeW uoce edP qu OE eho oes ing se Goes a 4 Mechanical support 02 eee eee ee eee 5 Power supply and main fuse 0 0000 3 Basic configuration jumpers 0 00002 eee 6 Running modes 2e eseeee herds eueh ceeere Gers 6 RESET
18. ch operations Be very carefully by adding electro mechanical devices Also in this case be careful in adding them on the Kameleon board K Team can assume no responsibility for any damage in your concept schematics hardware implementation manipulations or software K Team can assume no responsibility for the use of the Kameleon in specific appli cations in any field including robotics If you have any question or problem concerning the board please contact your Kameleon dealer 1 3 Recycling Think about the end of life of your board and of the accessories Parts of them can be recycled and it is important to do so It is for instance important to keep Ni Cd batter ies out of the solid waste stream When you throw away a Ni Cd battery it eventually ends up in a landfill or municipal incinerator These batteries which contain heavy met als can contribute to the toxicity levels of landfills or incinerator ash By recycling the Ni Cd batteries through recycling programs you can help to create a cleaner and safer environment for generations to come For those reasons please take care to the recycling of your board at the end of its life cycle for instance sending back the board and accesso ries to the manufacturer or to your local dealer Thanks for your contribution to a cleaner environment 2 UNPACKING AND INSPECTION EN Open the package and identify the following items 1 The documentation you are reading now 2 Po
19. ctor on page 10 31 APPENDIX C HOW TO DOWNLOAD CODE ERN To download user application code into RAM please operate as following Set your environment as illustrated in section 5 2 The jumpers must be set as showed in figure 29 to obtain the running mode 5 for more details on running modes please refer to section 3 1 5 Figure 29 Settings of the jumpers for downloading code at 38400 baud Power supply the Kameleon board Start on your host computer a terminal emulator with the serial line set to 38400 Baud 8 bit data 1 start bit 2 stop bit no parity Type run sloader followed by a carriage return or a line feed e Send the S format file containing your application As soon as the application is loaded the application is executed To download user application code into the FLASH please operate as following Set your environment as illustrated in section 5 2 The jumpers must be set as showed in figure 29 to obtain the running mode 5 for more details on running modes please refer to section 3 1 5 Power supply the Kameleon board Start on your host computer a terminal emulator with the serial line set to 38400 Baud 8 bit data 1 start bit 2 stop bit no parity Type flash E followed by a carriage return or a line feed Type sfill followed by a carriage return or a line feed e Send the S format file containing your application As soon as the application is loaded type flash W Th
20. d r ones size channel for i l length channel reply kcmd ref sprintf I d round channel i value count errmsg sscanf reply i d if isempty errmsg r i value else r i 1 end end Other similar functions are in the package and cover all the protocol commands available and presented in Appendix A 9 REFERENCES ERN National98 National Instruments LabVIEW manuals for the release 5 january 1998 Motorola98 Motorola A Background Debugging Mode Driver Package AN1230 D http mcu motsps com lit app_notes an 1230 pdf K Team99 K Team High Performance 68376 CPU board 1999 http www k team com download kameleon documentation Data Kameleon376SBC pdf 27 APPENDIX A COMMUNICATION PROTOCOL TO CONTROL THE BOARD BERN This communication protocol allows the complete control of the functionality of the Kameleon board trough a RS232 serial line The connection configuration needed is presented in section 5 2 The set up of the serial line of your host computer must corre spond to the one set on the Kameleon board with the jumpers normally running mode 5 see Running modes on page 6 The protocol is constituted by commands and responses all in standard ASCII codes A command goes from the host computer to the Kameleon board it is constituted by a capital letter followed if necessary by numerical or literal parameters separated by a comma and terminated by a line feed The response goes
21. d by a comma and termi nated by a line feed The command and response format are specific for every module R Read a byte on the extension bus Format of the command R relative address Format of the response r data Effect Read the data byte available at the relative address 0 63 of the exten sion bus W Write a byte on the extension bus Format of the command W data relative address Format of the response wq Effect Write the data byte at the relative address 0 63 of the extension bus 30 APPENDIX B CONNECTORS 1 2 3 4 5 6 7 8 H GND VCC VBat GNP Logic power supply ground Logic power supply 5V Batter power supply Battery power supply Figure 26 Power supply general connector pinout see Power supply and main fuse on page 5 Female connector 2 SCK 3 MISO 4 MOSI 6 PAI 7 F7 dill 5 SPCOM 1 GND Power supply ground 8 VCC Power supply 5V Figure 27 K Net connector see The K Net extension connector on page 10 DB9 female connector 5 GND Ground 9NC Notconnected 1 DCD Data Carrier Detect from Kameleon to PC always to 12V 6DSR Data Set Ready from Kameleon to PC 2 RxD Receive data data from PC to Kameleon always to 12V 7NC Not connected 3 TxD Transmit data data from Kameleon to PC 8 CTS Clear To Send from Kameleon to PC always to 12V 4NC Not connected Figure 28 RS232 connector DCE 9 pins see The RS232 conne
22. ease do the following connec tions e Stack the Kameleon boards using spacers board stand offs e Connect the MMA cable This cable need to have ONLY the first 26 wires al to a13 and b1 to b13 connected as shown in figure 13 Select the correct running mode in such a way to have only one master board and one or more slave Kameleon boards Please see Running modes on page 6 for more details Power supply ONE of the stacked Kameleon boards All other boards will be powered by the MMA cable 14 5 20 Configuration for Kameleon computer communication This configuration allows the communication between the Kameleon board and a host computer through a RS232 serial link On the host computer side the link is made by a RS232 port RS232 Power supply Figure 14 Kameleon computer communication set up The following connections must be made Between the Kameleon board and the host computer using a straight 9 pin RS232 cable Between the Kameleon board and the DC power supply using the cable provided with the Kameleon board see Cables and accessories on page 11 To test the connection and the settings of the serial port do the following manipulations Verify that the Kameleon board is set in the running mode 5 see Running modes on page 6 Figure 15 Settings of the jumpers for the running mode 5 Run a terminal emulator on your host computer for instance Hyper Termi nal on PCs Z Te
23. er string from your Kameleon board please use the kcmd command To get the power supply voltage of the Kame leon board for instance do as following kcmd ref I 15 ans 1 606 The first parameter of the kcmd command is the reference matrix obtained from the kopen command The second parameter is the string which has to be sent to the Kameleon board The answer string line finished by carriage return and line feed received before the timeout is returned In this example 606 represent the power supply voltage in 20mV units For commands which have multi line answers kcmd has a third parameter If set to one this parameter enable to get all characters until the timeout Please adjust the timeout in order to ensure a correct transmission For instance you can try the following command 26 kcmd ref list 1 A given command like I seen before can be implemented in a specific function like kgetanalog The same example seen before becomes kgetanalog ref 15 ans 606 This function is implemented as following function r kGetAnalog ref channel KGETANALOG Read the analog inputs if nargin 2 disp Usage disp value kGetAnalog ref channel disp Returns a vector of values corresponding to a vector of channels disp Returns 1 if the channel is not found disp Use the reference obtained with kopen disp Skye Legon K Team SA 02 99 return en
24. erences ys o eh nares ile ie ee dte pen ie e e ol 27 Appendix A Communication protocol to control the board 28 Appendix B Connectors cocos nos teed ERE Rx RE RSS 3l Appendix C How to download code 0000s eee 32 Appendix D RS232 configuration 0 0 0 eee eee ee 33 Appendix E Common running modes 00008 36 1 INTRODUCTION ms The Kameleon 376 Single Board Computer is a very flexible and modular compu ter board The hardware modularity is obtained with a very open architecture and several extension possibilities The onboard software BIOS and communication tools is based on the same modular strategy opening to the user a large field of applications To use in the most comfortable way the Kameleon 376 SBC LabVIEW and MATLAB are proposed as a development environment LabVIEW is a graphical pro gramming software basically dedicated to instrumentation which allows quick develop ment of input output interfaces a necessity when dealing with the real world by definition unpredictable and noisy MATLAB is more oriented to scientific analysis and complex computation but requires to know its own programming language Please note that LabVIEW and MATLAB are just a suggestion and are abso lutely not needed to use the board Any other environment able to deal with the serial port of your computer can be use instead of LabVIEW or MATLAB The communica tion protocol im
25. from the Kameleon board to the host computer it is constituted by the same letter of the command but in lower case followed if necessary by numerical or literal parame ters separated by a comma and terminated by a line feed To better understand this protocol we propose to do a very simple test as following Set the switch of the Kameleon board for the running mode number 5 See figure 17 Set the connection configuration presented in section 5 2 Start on your host computer a terminal emulator with the serial line set to 38400 Baud 8 bit data 1 start bit 2 stop bit no parity Type the capital letter B followed by a carriage return or a line feed The board must respond with b followed by an indication of the version of software running on the board and terminated by a line feed Type the capital letter I 15 followed by a carriage return or a line feed The board must respond with i followed by a number separated by a comma and terminated by a line feed This number represent the power supply voltage in 20mV units Try other commands 28 List of Available Commands II indicates CR carriage return or LF line feed indicates CR and LF B Read software version Format of the command BI Format of the response b version of BIOS version of protocolq Effect Give the version of the software present in the EPROM of the Kameleon board I Read A D input Format of the command I cha
26. g to the running mode 1 as described in section 3 1 5 typing run user flash and return serial Sets the serial channel to a baud rate given as parameter For instance typing serial 19200 and return you set the baudrate to 19200 Baud help Shows the help message of the modules available in the FLASH A parameter can be used to indicate a need of help on a particular item help list gives an help message for the list tool list Gives the list of all the tools functions protocol commands and other modules available in FLASH For every item listed you get an ID a name a description and a version The ID is composed by four letters The first two letters define the fam ily of the module IDs starting by TA define tasks running on the Kameleon FU functions that can be executed with the run command PR protocol commands TO tools like this one and BI BIOS components k team Gives a short description of the K Team active members 13 99 net Gives an information about the intelligent extension turrets installed on the K Net connector For each item listed you get a name an ID to be used to address the turret see also the command T in appendix A a description and a revision memory Gives an information about the memory used by the system restart Resets the Kameleon board This action is equivalent to a hardware reset process Gives the lis
27. is write your applica tion in FLASH memory 32 APPENDIX D RS232 CONFIGURATION ERN On PCs a common terminal emulator is Hyper Terminal Figure 30 shows the con figuration panel set for a communication speed of 9600 baud on COMI COM1 Properties EES Part Settings Bits per second Data bits Parity Stop bits Flow control Advanced Restore Defaults Figure 30 Hyper Terminal configuration panel 33 On MAC you can use the software ZTerm The main configuration panel is illus trated in figure 31 You have of course to choose the correct Serial Port in the modem preferences menu where the board is connected Data Rate _ 9688 w Data Bits Parity Stop Bits Local Echo Flow Control Hon Hoff Hardware Handshake Figure 31 Microphone communications settings On LINUX you can use MINICOM where the settings can be adjusted running minicom s as root or by changing the settings with the CTRL A O command The cor rect settings are illustrated in figure 32 and figure 33 Welcome to minicom 1 75 lock O w D t 9600 SNL No No ni rm CTRL A Z for help 9600 SN1 NOR Minicom 1 75 1336 1102 Offline Figure 32 Serial port setting in MINICOM 34 xterm Modem and dialing parameter ing secseeees ATIT ii ATDP IM MSOs Lo H I J Id settee string F Dial time i 22440 P Auto baud detect No Delay before
28. m 12 of figure 1 which is red indi cates the data coming from an external device to the Kameleon board It is called Rx receive data LED The 5 LEDs items 13 to 17 of figure 1 situated after the RS232 Rx and Tx LEDs are user specific LEDs numbered from 0 to 4 User specific means that these LEDs have no fixed and specific meaning for the basic functionnalities of the board and can be acti vated by the user to display user specific information The last LED item 17 of figure 1 is not completely free The user can access to it but this LED is normally used by the ALIVE process When this process runs the LED is switched on and off continuously showing that the processor and the board are alive As soon as this LED stop flashing there could be a problem at the level of the processor This functionality is normally appreciated by the user which often implement this type of background tasks For this reason this LED is included in the user specific LEDs The last LED item 18 of figure 1 before the K net connector is the power supply LED active when the board is powered The LED placed after the K net connector shows the K net activity Please refer to the section on the K net The K Net extension connector on page 10 for more details D A 2 A gt a Eu a 9 5 3 a _ o o 2 B v au Figure 9 LEDs positioning and functions User LED 4 User LED 3 User LED 2 User LED 1 User LED 0 RS232 Rx RS232 Tx 3 1 8 The
29. nector is a MMA port If set on the ON position the connector is a MUBUS interface Two switches positions 6 and 7 of the running mode selector define the MMA slave ID if the board is configured as MMA slave MMA master MMA slave 2 MMA slave 0 MMA slave 3 MMA slave 1 MUBUS interface Figure 8 DIP switch running mode setting for positions 4 5 6 and 7 The switch in position 8 defines if the MUBUS bus available on the MMA connec tor see The MMA extension connector on page 10 has the 5V power supply or not If set in the ON position the MUBUS bus has a 5V power supply If set in the OFF posi tion MUBUS has no 5V power supply and extensions can be powered externally The set up of the switches can be changed at any time If the board is running it is necessary to make a reset to make the set up effective 3 1 6 Reset The reset button item 21 of figure 1 can be used at any time to reset the board Please reset the board using this button and not switching off and on the board 3 1 7 LEDs The board is equipped with 9 LED items 11 to18 and 19 of figure 1 of different colours and having various functions The two LEDs items 11 and 12 of figure 1 placed near the RS232 9 pin connector show the RS232 serial communication activity The first LED item 11 of figure 1 which is green indicates the data going from the Kameleon board to external devices It is called Tx transmit data LED The second LED ite
30. nnel_number Format of the response i analog valueq Effect Read the 10 bit value corresponding to the channel number analog input For the channels between 0 and 14 the value 1024 corresponds to an ana log value of 4 09 Volts which means that the unit is 4mV Channel 15 is reserved to the measurement of the power supply voltage The unit of the returned value is 20mV L Change LED state Format of the command L LED number action_number Format of the response il Effect Perform an action on one of the five LEDs of the Kameleon board Possi ble actions are 0 turn OFF 1 turn ON 2 change status The LED number 0 is the nearest to the RS232 connector LED number 4 is nor mally used by the ALIVE process see LEDs on page 9 T Send a message to an extension turret Format of the command T turret ID command Format of the response t response 29 Effect Send a command and return the response of the intelligent extension turret placed on the K Net and having a turret_ID The list of turrets connected and their ID can be requested with the tool net The command parame ter takes the same format as a standard command including an identifica tion capital letter followed if necessary by numerical parameters separated by a comma and terminated by a line feed The response takes the same format starting with the same letter but in lower case followed if necessary by numerical parameters separate
31. plemented on the Kameleon board and used by LabVIEW or MAT LABS is presented in chapter 6 and described in detail in appendix A 1 1 How to Use this Manual This manual is organised into six chapters and one appendix To learn how to make the best use of your Kameleon board you are urged to read all of chapters 1 through 5 Chapter 6 presents the serial communication protocol that makes a remote control from a workstation possible You need to read the chapter 7 if you want to use the software Lab VIEW and the chapter 8 if you want to use the software MATLAB The appendix can be referred to as necessary Chapter 1 Gives an introduction to this manual and the Kameleon 376 single computer board Chapter 2 explains the contents of the package Chapter 3 explains the functionality of every item present in the pack age Chapter 4 explains how to make the first test of the board after unpack ing Chapter 5 gives the standard working configurations Chapter 6 presents the serial communication protocol Chapter 7 is addressed to the users of LabVIEW It shows simple vir tual instruments VI to control the board functionality and a little example of programming in this environment Chapter 8 is addressed to the users of MATLAB It illustrates some commands to control the board functionality and some exam ples of more complex functionnalities Appendix A details the commands of the serial communication protocol Appendix B de
32. rm on MACSs tip on UNIX or minicom on linux see RS232 configuration on page 33 on which you have connected the Kameleon board Configure your terminal as following 38400 Baud 8 bit 1 start bit 2 stop bit no parity Plug the mural power supply to the main or if it is already connected 15 reset the Kameleon board pressing on the reset button Your terminal should display ROM of K376SBC board The transmit data RS232 Tx item 11 on figure 1 green LED should blink after reset If the Kameleon board does not respond as indicated the green Tx LED does not blink after reset check the points mentioned above and retry If the green LED blinks but your computer does not show any message check the configuration of your serial port and terminal emulator as well as the connection between Kameleon board and host computer 6 THE SERIAL COMMUNICATION PROTOCOL EON The serial communication protocol allows the complete control of the functionnal ities of the Kameleon board through an RS232 serial line It correspond to running mode 5 see Running modes on page 6 The connection configuration necessary to use these functionnalities is presented in the section 5 2 of this manual The configuration baudrate as well as data start stop and parity bits of the serial line of your host compu ter must correspond to the one set on the Kameleon board with the jumpers running mode 5 38400 Baud 8 bit 1 start bit 2 stop bit
33. rstand both tools and protocol commands we propose to do a very simple test as following Verify that the Kameleon board is set in the running mode 5 see Running modes on page 6 Figure 16 Settings of the jumpers for the running mode 5 Set the connection configuration presented in section 5 2 e Start on your host computer a terminal emulator for instance Hyper Termi nal on PCs Z Term on MACs tip on UNIX or minicom on linux see RS232 configuration on page 33 with the serial line set to 38400 Baud 8 bit data 1 start bit 2 stop bit no parity We start testing some tools Type the command help followed by a carriage return or a line feed The Kameleon board must respond with the list of all tools available Type the command help serial followed by a carriage return or a line feed The Kameleon board must respond with the description of the serial tool Type the command help I followed by a carriage return or a line feed The Kameleon board must respond with the description of the T protocol command 18 Type the command list followed by a carriage return or a line feed The Kameleon board must respond with the list of all software modules present in the FLASH In addition to the tools characterised by a TOXX ID and the protocol commands characterised by a PRXX ID you can find on the list functions characterised by a FUXX ID and BIOS modules characteri
34. s feature is available using the serial tool which enable to change the baudrate by software To make the menu selection effective please click on the SET automatically new baudrate button The VI will automatically send a serial command to change the baudrate on the Kameleon board and then change the baudrate setup of your compu ter To quit properly this VI please use the QUIT button and avoid to stop the VI with the STOP button of the control bar 8 UsING MATLAB my The goal of this chapter is to familiarise you with the MATLAB environment in the context of Kameleon use MATLAB is a product of The Mathworks Inc http www mathworks com To this end the examples are presented in an increasing order of complexity Our advice is to follow the chronological order of presentation Please refer to the MATLAB manuals for more information about this software The following examples and the files available on the K Team WEB site are based on MATLABS version 5 0 MATLABS runs on several platforms but K Team modules are available only for MATLAB under Windows and Macintosh These modules can control the function ality of the Kameleon board using the serial communication protocol described in sec tion 6 2 8 1 Hardware configuration Set your environment as illustrated in section 5 2 The jumpers must be set as showed in figure 25 to obtain the running mode 5 for more details on running modes please refer to section
35. sed by a BIXX ID On every module you can have an help message We continue with some protocol commands Type the capital letter B followed by a carriage return or a line feed The Kameleon board must respond with b followed by an indication of the version of software running on the board and terminated by a line feed Type the capital letter L2 followed by a carriage return or a line feed The board must respond with i followed by a number separated by a comma and terminated by a line feed This number represent the voltage present on the second analog channel of the IXB bus see The CXB and IXB extension connectors on page 11 in 4mV units Type the capital letter I 15 followed by a carriage return or a line feed The board must respond with i followed by a number separated by a comma and terminated by a line feed This number represent the power supply voltage present your Kameleon board in 20mV units Try other commands following the description given in Appendix A 19 7 UsiNG LaBVIEW The goal of this chapter is to familiarise you with the LabVIEW environment in the context of Kameleon use LabVIEW is a product of National Instruments http www natinst com To this end the examples are presented in an increasing order of complexity Our advice is to follow the chronological order of presentation Please refer to the LabVIEW manuals for more information about this software The following examples
36. t of all processes running on the Kameleon board in parallel to the serial communication protocol manage ment s fill Starts a Motorola S format downloader This downloader does not start the execution of the code at the end of the download To download and execute a code please use the sloader function started by the command run sloader 6 2 The control protocol To control the functionnalities of the Kameleon board a set of command are imple mented in the control protocol Also in this case the communication with the Kameleon board is made sending and receiving ASCII messages Every interaction between host computer and Kameleon is composed by A command beginning with one or two ASCII capital letters and followed if necessary by numerical or literal parameters separated by a comma and 17 terminated by a carriage return or a line feed sent by the host computer to the Kameleon board A response beginning with the same one or two ASCII letters of the com mand but in lower case and followed if necessary by numerical or literal parameters separated by a comma and terminated by a carriage return and a line feed sent by the Kameleon board to the host computer In all communications the host computer plays the role of master and the Kame leon the role of slave All communications are initiated by the master The protocol commands is described in Appendix A 6 3 Testing a simple interaction To better unde
37. tails the connectors pinning Appendix C details how to download code on the board Appendix D gives some detail on the configuration of some common ter minal emulators Appendix E give some common running modes switch setup 1 2 Safety Precautions Check the power supply operating voltage before operation If you use a power supply not provided by K Team check that your power supply has a voltage identical with that of this documentation Don t plug or unplug any connector when the system is switched ON All connections including extension addition or disconnection must be made when the board and the interface are switched OFF Otherwise damages can occur Switch OFF the board if you will not use it for more than a day Disconnect the power supply removing the connector from the board or switching off the power supply Do not separate the single boards upper from lower part if you do not have been explicitly allowed Disconnect the CPU to the extension board only if you have been allowed by a specific documentation Perform this operation following carefully the instructions given in ap pendix C Be very carefully by adding self developed boards When developing your own extensions to the Kameleon board be careful in testing them on the Kameleon board K Team can assume no responsibility for any damage in your concept schematics hardware implementation manipulations or software Standard elec tronic know how is needed for su
38. un arrow at the top of the window A stop icon appears for a few seconds after what the front panel returns to its initial state That s all The serial link with Kameleon is set to 38400 baud It will remain so until you quit LabVIEW or you execute the Set up vi again 7 3 Power supply We will now check the power supply voltage of the board Be sure that the serial link has been correctly installed then open the Get Vin value vi present on the package Now your screen displays the following panel 21 Get_Vin_value vi Figure 19 Get_Vin_value panel one indicator shows the voltage of your power supply To read the voltage just click once on the arrow You can change the power supply voltage if you have a laboratory power supply with adjustable voltage and click on the arrow again to read the value If you are getting bored with clicking on the arrow try one click on the double arrow k Click on the stop icon to stop the execution The board has 14 other analog inputs on the IXB bus see The CXB and IXB extension connectors on page 11 The VI Get ana value vi enable to display the analog value present of each analog channel O SS get ana value vi p EJ Spt Application Font v Figure 20 Get_ana_value panel an indicator shows the voltage on the given channel The Get_version vi display the software version you have in your Kameleon Get_version vi Figure 21 Get
39. wer supply cables 3 Spare parts jumpers and fuses 4 Your Kameleon board in the basic version 3 THE BOARD AND ITS ACCESSORIES ERN 3 1 The Kameleon 376 SBC 3 1 1 Overview 24 26 LAJUCUCCRACCLCLUCRLURCUCRLACRLCACRLUICAR TUR ARCRLCOCRARCRELUOCALCA 0000000000000000000000000000000 HHBHBBBBBBBBBBB 20 19 18 17 16 15 14 13 12 1l 10 Figure 1 Position of some parts of the board Make an external inspection of the board Note the location of the following parts mO VENDRAN Power supply connector Board fixation hole Main power fuse Running mode selector SXB Serial eXtension Bus extension connectors BDM connector SXB extension fixation supports Board fixation hole Primary RS232 connector 10 Kameleon basic configuration jumpers 11 RS232 Tx transmit green LED 12 RS232 Rx receive red LED 13 User 0 LED Can be used by the user 14 User 1 LED Can be used by the user 15 User 2 LED Can be used by the user 16 User 3 LED Can be used by the user 17 User 4 LED Normally used by the alive process Can be used by the user removing the alive process 18 Power supply LED Is ON when the system has power supply 19 K Net local network connector Khepera compatible network 20 K Net activity LED 21 Reset button 22 Board fixation hole 23 CXB CPU eXtension Bus connector 24 IXB Interface eXtension Bus connector 25 Kameleon CPU

Download Pdf Manuals

image

Related Search

Related Contents

Phonix S9195GPG mobile phone case  ST-261 & ST-262 Manual  430-GC User Manual  Manuel d`installation et d`utilisation  My Book Live User Manual  Ortho & rhumato - DSB Communication sa  好みに合わせて選べる、 入力デバイス"  Model H25 Service Manual  Samsung NV8 Uživatelská přiručka  Intel SBC83675 User's Manual  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.