Home

CREEK Robot Board-User Guide

image

Contents

1. IO1CLR 1 lt lt LEDIO delay 1000000 return 0 E 6 files 816 1K A r ae Ire eanital b Figure 6 ADS user interface 6 Delete the folder LED_Data then open the project file LED mcp as Figure 6 shows 7 Remember to choose DebugInChipFlash as Figure 7 shows if the acquiescent is not a DebuglnChipFlash JE ned a i be Figure 7 choose DebugInChipFlash 8 Press setting icon iE to set the project as Figure 8 and Figure 9 shows DebugInChipFlash Settings 3j x Target Settings Panels T arget Settings Access Paths o Build Extras Runtime Settings sae File Mappings source Trees wo ARM Target B Language Settings z ARM Assembler ARM C Compiler i ARM C Compiler i Thumb C Compiler i Thumb CH Com F Linker n ARM Linker co ARM fr omELF B Editor a Target Name DebugInChipFlash Daue Fre linker ene si een nr el Output Directory Choose Project Clear Save project entries using relative paths factory Setting Revert Import Panel Export Panel OK Cancel Apply Figure 8 Target Settings http www elechouse com DebugInChipFlash Settings q ajx ARM fromELF f Target z Target Settings z Access Paths z Build Extras o Runtime Settings Options Text format flags 7 Include debug sections in o Verbose J Disassemble cod Print contents of data an File Mappings Qutput format ate Print debug tab a ARM Target Intel SZ bit
2. http Awww elechouse com Table of Contents kna OUT eip E E tv caps E EEE EEA 1 1 Purpose of This Manual cccccccccccccccccceeeesssseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeeeeeeseeeeeeeaaaaags 1 1 2 Introduction of CREEK Robot Board cc eecccccccccccsssseeeeeeeceeeecaaeseeeecceeesaaaeeeeeeeeeesaaeees l LOBo T a e E E 2 L4 Board Lay OU tesisine i a A Era 3 1 5 Block Diagram amp Mechanical Dimensions cccccccccccccceceeeeeeeeeesseeeeeeeececeeeeeeseeeeeaaas 4 2 Product Q ACCESSONCS a rpstecceenetveciuaied aaide sea salads EEANN EEANN EAEE AA 4 PREE OCCU E E ET A T E NAA A E EE 4 PA CC OE a E E EE A NEE EEEE S 5 SO e Lo i PEA A E E E E E E A A TE 5 iA Board Use R guitemeiiS sissie a a e a E 5 OMAD a ele e B a e AE EEA E E A EE E E A 6 ie ON Oa CMe SU erraren a e EE EEA EEEE EEA E E E 6 ILL TEPC DI TeS erorri a aA a E TTET EE 6 eL PPMI IO T gee OR NOITE EEE ee EN 8 A de Oe TC 2 E P A A EA I E E N EA A 10 3 5 Use Template Project for LPC2214 nnnnessssssnseoeeennnsssssssssssssssssseeeererrssssssssssssseseeererssssssss 10 3 6 Quartus IT 8 1 amp EPM1270 cccccccccccccccccccccccssessssseeeeceeeccceeeeeeeeeaaaaassaasessseeeeeeeeeeeeeeeeneaas 10 4 Schematics amp Demonstrations cccccccccccccccceesseeeccceeeeaeeseeeecceeesaaaeeeeeceeeesessaeeeeeeeeeeseuaaeeeeeeeeas 11 Ak EPC TA Forpreni a E 11 41 1 Power SUPPLY ssiscinoissssetssinsisr iinne gaa a eea aa a aroni 11 ALA RS232 Te
3. 6 pins 8 pins types and crimp pins 4 ALCD12864 Dot Matrix Blue Backlight monitor with a connector Those below you could choose to buy from us 5 USB Blaster with an USB cable Standard A to 5 Pin Mini B Device Cable male to male 6 RS232 cable 9 pin DBY female to female straight through 7 Power adapter 5V 3 0A Input voltage AC 100V 240V 50 60Hz Output voltage DC 5V 3 0A Polarity amp Size Positive Inner 2 1mm Diameter Negative Outer 5 5mm Diameter It s our duty to check the product and accessories carefully before sending you the package but we still suggest you to check them when you receive the Parcel make sure nothing is damaged 3 Quick Start 3 1 Board Use Requirements Hardware 1 CREEK robot Board 2 A computer with a RS232 ports and an USB port at least 3 A RS232 female to female cable You might need other cables in case of other programmers debuggers If you have a programmer debugger like SEGGER JLINK V7 it s much better 4 USB Blaster download cable 5 Power supply of 5V 2A 6 Others Software 1 Metrowerks CodeWarrior for ARM developer Suite v1 2 ADS 2 Flash Magic version 3 39 175 3 RS232 monitor 3 Altera Quartus II 8 1 software 4 Windows XP which is much better than Windows Vista or Windows 7 or other OS Flash Magic and RS232 monitor can be found on the disk we provide They are located at 5 http www elechouse com CREEKROBOTBOARD SOFTWARE When al
4. gt E Format Hex r a periodically Parity nopari gt Length 1 bytes Reverse bytes Period id aabits a x I Use DSR fex z Stop bits ji x Tl DSR Sensitivity IV Reverse bytes Cancel i Cancel Figure 16 set port Figure 17 set screen Figure 18 send data 4 1 3 LCD12864 Because screen display is not a main task of robot control we use a LCD12864 monitor simply and just use it to display some important data LCD12864 has 20 pins but we only use 5 of them as P3 in Figure 19 Details about the usage of LCD 12864 please refer to program code You could just using these functions in files LCD12864 h and LCD12864 c when you need It s quite simple The result of this demo program is shown as Figure 20 We still provide you ST7920 pdf to refer to but it s written in Chinese NOTE ST7920 is the driver IC of this LCD12864 monitor LO Screen Mw lt x Ay Qa a Es cb Q am oo oeg A vn its Oo eal Q aee aere RoSA RRR aan R a e S aa a e a eS a e a Se A A R vaov vVoSvV 1200510 P3 VOS une GND GND ioe Vacs A L AK RI 47K L SID R2 4 7K LO O R3 47K 1 Figure 20 LCD12864 screen and port Demo program location CREEKROBOTBOARD DEMO LPC2214 LCD12864 4 1 4 Reset Circuit CAT1025 is a Supervisory Circuits wit
5. in std_logic input clock nS LED out std_logic output control LED to flash e end LED test architecture behave of LED test is Signal count integer range O to 9999999 begin process CLK count begin if CLK event and CLK 1 then if count lt SO000000 then LED lt 1 count lt count 1 elsif count 9999999 then count lt 0 LED lt 1 else LED lt 0 count lt count 1 end if v gt x n i System A Processing A Extra Info Info A Warning Critical waming A Error Suppressed pa a o E Message 4 Location For Help press F1 in2 coli MO Bs ide T T CY segoa m ewe Figure 11 Altera Quartus IT 8 1 user interface 5 3 Press icon to compile the project 4 Press icon and reach the window in Figure 12 T LED_test cdf lolx Z Hlendiwene Setup No Hardware Made JJTAG Progress lee Enable real time ISP to allow background programming for Mae Il devices sa e pe pee pee a o e ah Sic LED_test pot EPM1270T144 00677A FFFFFFFF O O CET CFM O O a Auto Detect AUEM E L 2 Delete a Add File ie change File Ge save File G Add Device Fue Down eee ee Figure 12 Quartus II Program window 5 Click on the Hardware Setup box and choose the USB Blaster as Figure 13 shows Then press the button Close OOO HOU http www elechouse com Hardware Setup X Hardware Settings
6. Hex Print relocation infor Ez Language Settings Print symbol ta i Output file name ARM Assembler F mE Print string 1 bee ARM C Compiler LED hex hoose in Pere te ARM C Compiler stakes ag Te Be Thumb C Compiler Equivalent Command Line e mo ee Com e output LED hex 132 E Linker i ARM Linker ie ARM fr omELF B E ditor factory Setting Revert Import Fanel Export Fanel OK Cancel Apply Figure 9 ARM fromELF 9 Press MAKE icon P to compile the project make a hex file with a name in Figure 9 10 Open the software Flash Magic install it before using and set as Figure 10 shows Note that the setting of COM port and the path of Hex File should be modified based on the actual situation LEC Magic IOl x File ISP Options Tools Help BEIABSVES 9 RO8 Step 2 Erase Erase block 0 0x000000 0 001FFF COM Port com 1 Erase block 1 0x002000 0 003FFF Baud Rate 3600 Erase block 2 0x004000 0 005FFF Erase block 3 0x006000 04007FFF Device LPC2214 z frase block Getiobi0 OG05EFET E interface None ISP y Erase block 5 0x004000 0 00BFFF Erase all Flash Code Rd Prot Oscillator Freg MHz fi 1 0592 IV Erase blocks used by Hex File Step 1 Communications Step 3 Hex File Hex File G Demo LPC221 4 LED LED_Data DebuglnChipFlash LED hex Browse Modified Unknown more info Step 4 Options Step 5 Start JV V
7. Tras Settings Select a programming hardware setup to use when programming devices This programming hardware setup apples only to the curent programmer windo Currently selected hardware Available hardware tems Hardware Server Pot USB Blaster Local Add Hardware Remove Hardware Figure 13 Hardware Setup window 6 Click on the Program Configure and press the icon 5 to download the configuration file into EPM1270 When finished LED D4 will flash without a reset 3 4 ADS1 2 amp LPC2214 Since the use of the software ADS1 2 is not very easy for a beginner we provide a tutorial ADS_CodeWarriorIDEGuide pdf for the user to refer to It is suggested that the user read some other tutorials to handle the software For the details about the chip LPC2214 please refer to LPC2114 2124 2212 2214 user manual pdf and PHILIPS LPC2214 pdf 3 5 Use Template Project for LPC2214 For user s convenience a template project for LPC2214 is provided which was developed in ADS Demo program location CREEKROBOTBOARD DEMO LPC2214_ TEMPLATE In the project all source files could be edited but we advice not to edit them except main c of course you could add other files when needed When copying a whole project folder form a computer to another delete the folder projectname_Data Otherwise there may be some mistakes in the hex file If you have a SEGGER_ILINK V7 programmer debugger connect to th
8. called phase A and phase B which are called quadrature outputs as they are 90 degrees out of phase With different direction of rotation the phase relation between A and B is different as Figure 31 shows Turn left A 5 sT o 7 api YS B SE E zir Figure 29 OMRON encoder Figure 30 a encoder connector Figure 31 two phases The power supply to encoders is 5 volts When phase A and phase B input into EPM1270 we use resistors to divide the voltage to protect the chip s I O ports Demonstration This demo program is a demonstration of encoder counter which needs a real encoder Connect it to connector P21 or P22 check its ports Sequence before testing Download programs into LPC2214 and EPM1270 respectively And connect LCD12864 to the board restart the board numbers on the LCD will change when you rotate the encoder Demo program location CREEKROBOTBOARD DEMO LPC2214 ENCODER for LPC2214 and CREEKROBOTBOARD DEMO EPM1270 ENCODER for EPM1270 4 2 6 Common I O Connectors There are six connectors for 36 I O ports Usually we use it for line tracing sensors Since we don t provide you some sensors it s hard to give you demonstrations Actually you can use them 18 OS ttpwwwetechousecom any way you want Note that the power supply to devices connected to it is 5 volts and when input lower level signals LEDs will be light on if you set the LEDs jumper 4 2 7 Switch Sig
9. directly driven by the master It could be driven by a simple general purpose I O under software control Master In Slave Out The MISO signal is a unidirectional signal used to transfer serial data from the slave to the master When a device is a slave serial data is output on this signal When a device is a master serial data is input on this signal When a slave device is not selected the slave drives the signal high impedance Master Out Slave In The MOSI signal is a unidirectional signal used to transfer serial data from the master to the slave When a device is a master serial data is output on this signal When a device is a slave serial data is input on this signal w When communicate with other devices CREEK robot board can only performance as master because pin 123 also SSEL1 is pulled up to 3 3 volts And it use a common IO port P1 20 to pull down the slave when communicate We don t provide you a demo program of this Detail about usage of SPI interface please refer to LPC2114 2124 _2212_2214_User_Manual pdf 4 1 7 Pulse Width Modulator PWM Hardware Description and Schematic LPC2214 Pulse Width Modulator is based on standard Timer 0 1 Seven match registers allow up to 6 single edge controlled or 3 double edge controlled PWM outputs or a mix of both types The ability to separately control rising and falling edge locations allows the PWM to be used for more applications For instance multi phase motor contro
10. the optical isolation makes no sense Component TLP521 is an optocoupler works below a frequency of 500Hz while 6N137 works at a very high speed up to 10 MBit s Several optocoupler are provided they are located at CREEKROBOTBOARD REFERENCES OPTOCOUPLER 19 http www elechouse com VCC3 3_CRB 5V_MOTORDRIVER VCC3 3_ORB 5V_MOTORDRIVER R4 4 7K ATK 1 U2_6N137 g Ul TLP521 i o 1 _4 2 7 PCT Ce RL 2 a ed RB 20 ee agen ges _INI gt SP L m gt OUT gt 4 5 100pF 0 1uF GND_MOTORDRIVER Figure 33 optical isolation circuit 6 Other information CREEK Robot Board How to order You can order to us directly Check our web www elechouse com for more information Elechouse On line www elechouse com Skype elechouse MSN elechouse elechouse com Email elechouse elechouse com 20
11. the slave always sends a byte of data to the master There are four signals in SPI communication They are SCK SSEL MISO and MOSI The function of the four signals is shown in Table 2 There is a SPI connector on CREEK board as Figure 23 shows and it is designed for master VOSS P4 a 6 R18 100 SCKI 3 R19 100 SPILEN P1 20 5 R20 100 MOSI 1 R21 100 MISOI SPI Figure 23 SPI connector 14 http www elechouse com Table 2 signal description Description Serial Clock It is a clock signal used to synchronize the transfer of data across the SPI interface The clock is always driven by the master and received by the slave The clock is programmable to be active high or active low The clock is only active during a data transfer Any other time it is either in its inactive state or tri stated Slave Select The SPI slave select signal is an active low signal that indicates which slave is currently selected to participate in a data transfer Each slave has its own unique slave select signal input The SSEL must be low before data transactions begin and normally stays low for the duration of the transaction If the SSEL signal goes high any time during a data transfer the transfer is considered to be aborted In this event the slave returns to idle and any data that was received is thrown away There are no other indications of this exception This signal is not
12. 4 communicates with EPM1270 by 8 bits in fact 7 bits AO is not used address bus and 16 bits data bus Figure 26 shows the circuit connection AO is null because AO is not used when the data bus is 16 bits for LPC2214 refer to LPC2114 2124 2212 2214 User _Manual pdf EPM1270 works like an external memory LPC2214 can control or read statuses of the equipments connected with EPM1270 by reading and writing the bus For the mapping between address and data in EPM1270 the user can configure as needed by programming CS CS OE OE WE WE D 15 0 LPC2214 EPM 1270 AI7 1 A0 AO Figure 266 bus connections between LPC2214 and EPM1270 Demonstration This is a basic demonstration of communication between LPC2214 and EPM1270 some other demonstrations are based on it Actually when control a robot this is very useful and this is the main feature of CREEK robot board On the other hand LPC2214 doesn t have so many I O pins so EPM1270 is used for I O ports extension Also EPM1270 can reduce lots burden of LPC2214 in this way LPC2214 can used as a robot brain to make decisions only The function of this demo program is to test bus communication and both EPM1270 and LPC2214 need a program When LPC2214 read bus successfully it will write data to eight LEDs address and they will be lighted alternately And the user can extend its functions according to actual situation Demo program location CRE
13. EKROBOTBOARD DEMO LPC2214 BUS_TEST for LPC2214 and CREEKROBOTBOARD DEMO EPM1270 BUS_TEST for EPM1270 4 2 4 Servo Motor Connector Hardware Description and Schematic When control a robot servo motors are sometimes very useful We suggest you to use a HITEC servo motor which is shown in Figure 27 We also suggest you to use optical isolation when control servo motors A common servo motor control signal is shown in Figure 28 obviously it s a PWM signal But different servos usually need different pulse width As HITEC servo the signal pulse width is always 0 9ms to 2 1ms 17 http Awww elechouse com ms Pulse Train Serve Motor Position fl lefi 1 5 ma Pulse Train Bero Motor Position l Midrange n gt ra Pasitige Figure 27 HITEC servo motor Figure 28 servo motor control signal Demonstration The function of this demo program is to generate a PWM signal with period 20 ms by EPM1270 while the pulse width is controlled by LPC2214 so this program is based on the communication of these two chips You could watch PWM signals by an oscillograph from pin 1 of P34 of board Demo program location CREEKROBOTBOARD DEMO LPC2214 SERVO MOTOR for LPC2214 and CREEKROBOTBOARD DEMO EPM1270 SERVO_MOTOR for EPM1270 4 2 5 Encoder Connectors Hardware Description There are six rotary encoder connectors on the board and they are designed based on OMRON Incremental optical encoder as Figure 29 shows There are two outputs
14. e ARM_JTAG port on CRB you could press to debug or H to run the program immediately Also there must be some configuration to do before using refer to its user guide 3 6 Quartus II 8 1 amp EPM1270 Since Quartus is not very easy to handle for a beginner we advise that you should refer to other references and we provide you some files 1 QuartusIT_ Handbook_8 1 pdf form Altera This manual is designed for the novice Quartus II software user and provides an overview of the capabilities of the Quartus II software in programmable logic design 10 KO http www elechouse com 2 Quartus Quick Start pdf from Altera It is quite simple than the first reference and will show you how to set up a Quartus II project enter timing requirements and compile the design into an Altera device 3 Altera_Quartus_I _ Tutorial_a pdf and Altera_Quartus HT Tutorial_b pdf Thanks to Waseem Ahmad from Department of Electrical and Computer Engineering in University of Illinois at Chicago Following these two tutorials you will be very familiar with the usage of Altera Quartus II software For the details about the chip EPM1270 please refer to EPM1270 pdf Of course VHDL skill is necessary because we provide the demonstrations with VHDL in next section 4 Schematics amp Demonstrations On CREEK robot board there are two primary chips LPC2214 and EPM1270 so the peripheries described here are based on the two different c
15. erify after programming J Set Code Read Prot Start 7 Fill unused Flash E Gen block checksums Execute Technical on line articles about 8051 and 4 programming www esacademy com fag docs p OOS Moo Figure 10 Flash Magic ISP download 11 Press the button Start to download the program Sumy Exit ISP mode by connecting the pin 1 with pin 2 of Jumper P1 Reset LPC2214 and it s going to run the program At any situation except ISP mode connect pin 1 and pin 2 otherwise it may not be correctly reset when you press reset button 12 Set jumper P1 to NULL mode and reset the board Then LED D3 will flash 3 1 2 EPM1270 Test 1 Connect the CPLD JTAG connector on the board and computer with USB Blaster by a USB cable http www elechouse com 2 Open the file folder which located at CREEKROBOTBOARD DEMO EPM1270 LED test and double click the project file LED_test qpf as Figure 11 shows 4 Quartus II G Demo1 EPM1270 LED_test LED_test LED_test LED_test vhd Bj x b File Edit view Project Assignments Processing Tools Window Help lj x J 3 gt Oat S mloolienet IK 4 SVS Sl gt Fm oole Project Navigator a x This project is for test Eal library ieee MAX II E C use ieee std_logic_1164 all Lebd LED test 153 53 25 use ieee std_logic_arith all HR Se use ieee std logic _unsigned all T rh entity LED test is porti t CLK
16. ettrrrresssressssssssssees 19 6 Olber mn orma Oeser A E cts tee cere dies Aces acteacioneeeadciece tied 20 G http www elechouse com 1 Introduction 1 1 Purpose of This Manual This manual describes the functional specifications and operation of CREEK Robot Board CRB Within this manual there are hardware description application notes software user guide board tests schematics and demonstrations to help you fully utilize all the features found on the board Additional data sheets for components on the CRB board and other references can be found in the disk we provide Suggestions and corrections are always welcome 1 2 Introduction of CREEK Robot Board CREEK Robot Board CRB was developed in order to use as a controller of a robot with CRB you could make you robot more intelligent more interesting ever more powerful than others if you use it in competitions Here is a picture of CRB Figure 1 CREEK robot board The CRB is based on 16 32 bit ARM microcontroller LPC2214 and Altera MAX II CPLD EPM1270 The peripheries of LPC2214 include a LCD12864 monitor connector a ISP communication connector an analog input header a reset button two DB9 connectors for RS232 interface a power jack eight digital input output pins general ports a motor control signal connector etc The periphery of EPM1270 include six encoder connectors six switch signal input connectors switches are not integrated within this board a serv
17. g A jumper for ISP mode and four jumpers for RS232 interface and PWM interface motor control LEDs indicate for 3 3V and 1 8V power supply EPM1270 peripheries Six encoder input connectors Six switch signal input connectors Servo motor control signal connector Six connectors for general I O usually used for line tracing sensors Eight LEDs Standard JTAG connector for programming ALED indicates 3 3V power supply http www elechouse com LLL vO ND RONE pe a 1 p Figure 2 board ett Power Supply CRB power supply is suggested to be 5V regulated within a tolerance of 4 is OK A power supply much above 5V may destroy this board so make sure your power supply WARNING is good enough When CRB is powered three LEDs will be lighted one indicates 3 3V pad power supply for LPC2214 another indicates 1 8V core power supply and the other indicates 3 3V power supply for EPM1270 The Power Jack inner pin is positive Reset Module Circuit The LPC2214 chip on CRB can be reset through the power on reset mode or through the manual reset mode by a button The EPM1270 chip doesn t have a reset circuit Clock Circuit LPC2214 generates its internal clock with PLL and uses a single 11 0592MHz quartz crystal connected to LPC2214 pin 142 XTAL1 and pin 141 XTAL2 EPM1270 uses a 50MHz crystal oscillator connected to pin 91 IO GCLK3 Jumpers Description Severa
18. h I2C Serial 2k bit CMOS EEPROM and Manual Reset mode IC S1 is the reset button mentioned in other sections of this user guide Circuit is shown in Figure 21 13 http Awww elechouse com VO VO3 V3 RI1 R14 10K u4 10K 1f g MR vac 3 RESET RESET 2 2 RST 7 6 SL R10 4 o E A st lox vs SDA T CAT1025 A RB ORI2 10K 10K VOR Figure 21 reset circuit Labels SCL and SDA are connected to pin 50 and 58 of LPC2214 and you could use this to load some configuration when the board power on or be reset 4 1 5 JTAG Programming Debugging Connector ARM JTAG port is a standard debug port as Figure 22 shows So we reserved this for some advanced users Detail usage of JTAG please turn to JTAG supplier for help VCC3 P2 VCC3 nT RST We 5 6 TMS lt 7 8 4 TCK 9 10 RICK mT 13 14 15 16 17 18 19 2 Figure 22 standard JTAG connector for LPC2214 4 1 6 SPI Communication SPI is a full duplex serial interface It can handle multiple masters and slaves being connected to a given bus Only a single master and a single slave can communicate on the interface during a given data transfer During a data transfer the master always sends a byte of data to the slave and
19. h and PWM c you can go with complex control parameters to motors such as speed and direction Without a motor driver you could watch PWM signals by an oscillograph from pin 2 and 7 of P27 on the board Demo program location CREEKROBOTBOARD DEMO LPC2214 PWM 4 1 8 Others Other peripheries such as common IO ports ADC port and power supply circuit please refer to schematics we provide 4 2 EPM1270 Peripheries EPM1270 peripheries include power supply circuit a JTAG program connector servo motor control connector six encoder connectors six connectors for general I O eight LEDs and six switch signal input connectors etc Actually these ports pins are almost the same but used in different purpose Details are shown below 4 2 1 Power Supply While LM1117 can provide a current of 1A EPM1270 using a single power regulator You could see this in the schematics we provide 4 2 2 JTAG Program Connector Altera CPLD JTAG connector is a standard one as Figure 25 shows which is necessary for programming Connected to a USB Blaster you could download programs into EPM1270 16 KO http www elechouse com P5 ROI TKI 3 CPLDVOG3 k mo 34 R502 T S gt yi R03 TD 7 CT e 9 10 10K a CPLDJTAG a CPLDVCC3 Figure 25 CPLD JTAG connector 4 2 3 Communication between LPC2214 and EPM1270 Hardware Description LPC221
20. hips 4 1 LPC2214 Peripheries LPC2214 peripheries include two DB9 connectors for RS232 interface a LCD12864 monitor connector a ISP communication connector an analog input header for ADC a reset module a motor control signal connector eight digital input output pins general ports JTAG debug interface etc details are shown below 4 1 1 Power Supply On CREEK robot board there are three power regulators LM1117 But the power supply is 5V regulated Some devices such as MAX3232ESE for RS232 interface encoders etc are connected to 5V power supply directly Before using this robot control board please check it carefully at first 4 1 2 RS232 Interface Hardware Description and Schematic On CREEK robot board there are two DB9 connectors one is male and another female By them your board can communicate with other devices or computers with RS232 interface Note that UART interface and PWM interface of LPC2214 are using the same pins as Table 1 shows you have to set jumpers before using different functions Detail is shown at the first section of JUMPER DESCRIPTION on page 4 you can find that on the board too Details about RS232 interface please refer to RS_ 232 Interface pdf and RS232 Serial pdf Table 1 UART and PWM ports LPC2214 Pin No PO 0 TXDO PWM1 PO 1 RXD0 PWM3 P0 8 TXD1 PWM4 PO 9 RXD 1 PWM6 11 http www elechouse com RS232 circuit is shown as Figure 14 Labels TXDO RXDO TXD1 and RXD1 are co
21. l mini jumpers used in the peripheries of LPC2214 in order to choose special function of the same pins And a jumper used in the peripheries of EPM1270 to light the LEDs which indicate common IO inputs which are always used as line tracing sensor input connectors Jumper for ISP mode You could choose ISP mode to program LPC2214 thus pin 92 P0 14 DCD1 EINT1 need to connect to low level On CRB P1 defines the ISP mode Connect pin 2 and pin 3 to enable ISP mode connect pin 1 and pin 2 to exit ISP mode You can find a string ISP NULL on the board which used to indicate the position of jumper We suggest connecting it in NULL position to reduce reset mistake n When programming is finished remember disable ISP mode otherwise the chip will not work Details about ISP programming could be found in related sections http www elechouse com Jumpers for RS232 PWM mode LPC2214 has the same pins for UARTO with PWM1 and PWM3 also UART1 with PWM4 and PWM6 Jumpers P28 P31 are designed for user to choose different function of these pins Generally we suggest that TXDO 1 or RXDO 1 should be jumped at the same time but you can choose TXDO and PWM3 functions or others for special use etc As Figure 3 shows this could be found on the board TXDO PWM1 RXD1IPWM6 RXDO PWM3 TXD1 PWM4 Figure 3 RS232 PWM mode choose jumper Connectors Headers Description The first pin of connectors and headers are marked on the reverse side of CRB some o
22. l prepared let s start 3 2 USB Blaster Driver An USB Blaster download cable is provided in order to download the programs into EPM1270 Before using it make sure Altera Quartus II 8 1 software is installed Connect it with your computer through USB interface and then there will be a Pop up window follow its tips to install drivers for the USB Blaster Locate the driver at X altera 8 1 quartus drivers usb blaster X is the disk where Quartus II is installed For details please refer to Installation_and_USB Blaster Driver pdf NOTE When refer to a PDF file it s always in this folder CREEKROBOTBOARD REFERENCES This user guide will not tell you again Details about usage of USB Blaster download cable please refer to USB Blaster_User_Guide pdf 3 3 Board test This part is to test whether the two main microchips can work normally It can also help you to learn how to program the board It is assumed that the requirements mentioned in 3 1 are ready and USB Blaster has been driven 3 1 1 LPC2214 Test Follow the steps blow to test LPC2214 1 Set jumper P1 to ISP mode 2 Set jumpers P28 and P29 to choose TXDO and RXDO 3 Connect J1 on the board and computer with a RS232 female to female cable 4 Supply power to the board with the 5V adapter 5 Open the file folder which located at CREEKROBOTBOARD DEMO LPC2214 LED and you will see the project s file and folders as Figure 5 shows RS TO LED mcp LED Da
23. l typically requires three non overlapping PWM outputs with individual control of all three pulse widths and positions For details of relevant registers and usage method please refer to LPC2114 2124 2212 2214 User _Manual pdf mow Optical Isolation is strongly suggested when control motors please refer to section 5 Table 3 shows the pins with PWM interface Please notice that PWM1 PWM3 PWM4 PWM6 use the same pins with UARTO and UARTI as Table 1 shows in LPC2214 the user must set jumpers on P28 P29 P30 P31 before using refer to Figure 3 Table 3 PWM interface Pp P0O0 O PWM PWM4 P0 21 PWM5 o Poo o 15 http Awww elechouse com P28 TXDO 1 TXDO PWMI1 7 VCC3 P27 PWMI 3 1 5 PWMI 3 4 IN1 1 P1 16 P29 5 6 IN1 2_P0 4 RXDO 1 PWM 7 g PWM RXDO PWNB 7 IN2 1_P0 24 9 10 IN3 1_P0 5 PWM3 3 IN2 2_P0 25 i p IN3 2_P0 6 PWM4 3 14 PWM5 P30 IN4 1_P0 10 15 16 IN5 1_P0 23 RXDI 1 IN4 2_ PO 11 7 18 INS 2_P0 22 RXD1 PWM6 7 19 20 PW M6 PWM6 IN6 1_P0 12 3 EE IN6 2_P0 13 P31 l as TXDI1 1 oo a oe TXDI PWM4 5 motorcontrol PWM4 3 Figure 24 jumpers and motor control port Demonstration The function of this demo program is to simply output PWM1 and PWM2 signals the duty cycle is about 52 frequency is about 36 KHz However with the other functions defined in the PWM
24. n the obverse side For some big ones two or four pin numbers are marked Compared with schematics every pin s connection or definition is clear 1 5 Block Diagram amp Mechanical Dimensions a ia iea ie te We LED NOOd00 O o es O O lajo ojojo o ENCODER INTERFACE rr lajo oj 0jo oj 3 3U 11 0592M O o o7 jaio olla o KEY INTERFACE As Figure 4 shows aoooo0oo0oo0o000 0 o JO ARM_JTAG O Q op m jajo o o o oj Inlo O O O O O 0 0 ojal O o oja O O ojal O o oja O o ojo wY O ioe N am O wil LPC2214 EPM1270 SERVOMOTOR_PWM oooodgd xpo pun InxptENE oo0oo0o00 poo COMMON INTERFACE ee lOOOO0O0 Ob es ALO pooper ppn loo0oooo o Ob E l aa E ai EE aqgeol jg Sm DO0D0ODO OOODOD O 0 00 141 00 Figure 4 mechanical dimensions 2 Product amp Accessories 2 1 Main Product The CREEK robot board is shipped in protective anti static packaging The board must not be subject to high electrostatic potentials General practice for working with WARNING http www elechouse com static sensitive devices should be applied when working with this board 2 2 Accessories 1 Data CD including this user manual some free version software demonstrations references and others 2 100 2 54mm mini jumper packaging 3 2 54mm Polarized Female Male Connectors packaging including 3 pins 4pins Spins
25. nal Connectors There are six Switch signal connectors You can use it for simple signal input such as limit switch photoelectric Switch etc As Figure 32 shows the power supply for devices connect to it is inserted by a resistor this is for switches use For photoelectric switch you need to short the resistor 5 volts power will supply to the devices It s simple so no demo program is provided VOSS P13 ROS 510 KEYI R06 47K CON3 ame 104 Figure 32 switch signal connector 4 2 8 LEDs Please refer to schematics 5 Optical Isolation suggestions CREEK Robot Board is a digital circuit mainly based on two digital chips this board is a controller used to control robots or other automatons so be isolated from a load by optical isolation is essential and thus could reduce interference big loads and protect the board Some devices are not suggested to be isolated while it s current is not strong such as encoders LCD screens and programmers debuggers etc Other devices such as a motor driver optical isolation is necessary Figure 33 is an example of optical isolation circuit used between a controller and a motor driver VCC3 3_CRB represents 3 3 volts of CREEK robot board 5V_MOTORDRIVER represents 5 volts of a motor driver and GND_MOTORDRIVER represents ground of the motor driver Make sure that GND_MOTORDRIVER is not connected with ground of CREEK robot board otherwise
26. nnected to pin 42 49 75 and 76 of LPC2214 via jumpers respectively SPECIAL NOTES In common RS232 communication three wires are sufficient transmit data receive data and signal ground You could see this in Figure 14 But definitions of ports are different except signal ground pin 5 As a computer s port male port commonly pin 2 is used to receive data pin 3 is used to transmit data while as a terminal device s port the usage of these two pins are opposite So on CREEK robot board pin 2 is used to transmit data pin 3 is used to receive data When communicate with a computer you need a female to female RS232 cable straight through when communicate with other devices check the ports definition at first In Figure 14 two resistors are used to restraint current to protect IO ports of LPC2214 VOCS VOCS 7 O25 luF U5 C28 luF a l luF 3 GND 4 TIOUT I CL Tlout 4 4 Rlin 13 RIN 26 5 Rlout 12 ROI 100 RXD1 luF 6 i hn 11 TXDI 9 7 Tout Din 10 TXDO UES 8 Rin Rout 9 R602 100 RXDO zla MAX3232 am G Fa i a fant fo nf ea ho ofa ekia i a eja ee a oe ee at RS232_male R Q32_female e UARTO e UARTI Figure 14 RS232 interface Demonstration The function of this demo program is to communicate with your computer by RS232 interface At first CRB receive da
27. o motor control connector six connectors for general I O usually used for line tracing sensors etc These are a data bus and an address bus between LPC2214 and EPM1270 to guarantee the data exchange of the two chips All details could be seen in related sections of this manual http www elechouse com 1 3 Board Features LPC2214 16 32 bit ARM7TDMI S CPU 256 KB Flash Program Memory 16 KB on chip static RAM high speed 60 MHz operation In System Programming ISP Standard JTAG interface for programming debugging 144 pin package low power consumption EPM1270 Altera MAX II device 1270 logic elements 980 equivalent macrocells 144 pin package standard Built in Joint Test Action Group JTAG for downloading programs Low cost low power 11 0592MHz quartz crystal for LPC2214 and 50MHz crystal oscillator IC for EPM1270 3 flashing LEDs indicator of power supply for LPC2214 and EPM1270 Power supply plug in jack 5V 4 2A current depend on devices you use is needed at minimum uC OS II capable only for LPC2214 Dimensions 141 x 86mm approximately 5 5 x 3 5inches LPC2214 peripheries 2 DB9 connector for RS232 interface LCD12864 monitor by serial input mode SPI communication connector Analog input header of 4 ports Reset module with a button General connector with eight digital input output pins Motor control signal connector Standard JTAG connector for programming debuggin
28. ria Eienenn NE EE orar ET 11 E EDI i OA E EE EE ET ET AEA 13 EARE A E EE E senses dean A E A REE 13 4 1 5 JTAG Programming Debugging Connector esesessssssssssssssssettterrersssssssssssse 14 4 1 6 SPI Communication cccccsessscceeccccccceesseeccccecsaaessesecccesecauaaseeccceeeeeseeganeeeceeseeas 14 4 1 7 Pulse Width Modulator PWM c ccc ccecccccsccccesscceesssceescccescseeeseeeesseeeesesenesenes 15 Bs MeO CINCO r E icone senGeasausedoraeenesoa ies E E cscoecvaaeeaseonaae 16 4 2 EPM1270 Peripheries ccccccccccccccccssessssesesseeeccceceeeeeeeeeaaaessessseseeeeeeeeeseeeeeeeseeeaaagagessnes 16 42 1 Power Supply srragcecrchieracennteanonahacananacdeeaaitictnantundeaunnmatnevandenaat hs essanadaeiponniaeseeneitenuiians 16 424 JTAG Program COMME C LON ecreis a E E E 16 4 2 3 Communication between LPC2214 and EPM1270 seeeesssssssnnnnnsssseeeenssssssssseene 17 4 2 4 Servo Motor Connector essesseeesssseeessssetrosssserosssserosssereesssseressssetesssseeesssseersssss 17 4 2 5 Encoder Connectors ccccccccssssssecccceecaeeeseecccceeeaaeeseeeecceeeeuaeeseeecceseeseuaeeeeeeeeeeas 18 4 2 6 Common I O Connectors ccecccccccccccesssseccccecaeeesseeccccceseeasseeccesseseaaseeeeeesssageaes 18 AD SWAtCh Signal Connectors sesir AN AAE 19 Eae LE Do aapna E E E E E R 19 5 Optical Isolation suggestions ee sesessssssssseesettterrrsssssssssssssseterrrerssssssssssssee
29. ta from your computer and then it transmits them back to computer The software you have to install in your computer is called RS 232 Monitor which you can find it the CD its user interface is shown in Figure15 But this software is not free you can use it 30 days or make 100 runs after installation Other software with similar functions is OK too RS 232 Monitor CON loxi Main Edit View Help a i masend data Iof x O gt cis 2 Unit Format M Settings Bytes Read 36 Write 36 Length y y bytes I SendFile 01 02 03 04 05 06 07 08 09 z Send periodicall 010203040506070809 ma Hex Send periodically 01 0203 04 05 06070809 T Reversebytes Period pas 01 02 03 04 05 06 07 08 09 i Ready Figure 15 RS 232 monitor graphical user interface Set port and set screen as Figure 16 and Figure 17 shows Then press send data icon the screen is shown as Figure 18 Please notice that the formats in Figure 17 and Figure 18 are the same Press SEND button in Figure 18 you could see the result of this demo show as Figure 15 Demo program location CREEKROBOTBOARD DEMO LPC2214 UART 12 http www elechouse com Segscabscuiee X Port Settings x Screen Send data m iolxi Main Settings gee Ce is Font Unit Format Settings Port com DTR DISABLE Columns p Color Length f v bytes 7 Send Fie EA Baud rate 115200 v RTS prae
30. ta src Er CodeWarrior proj 114 KB Figure 5 project s file and folders http www elechouse com Metrowerks CodeWarrior for ARM Developer Suite 1 2 7 Oj x File Edit Yiew Search Project Debug Window Help Bese Boer x LEERE ERKA EI ED e LED mcp MEE een iol DebugInChipFlash mY 6 Re b Mo gt of Path G Demol LPC2214 LED src main c Files Link Order Targets define LEDIO 22 according to schematic File Code Data W define TestLedEN IO1DIR IO1DIR 1 lt lt LEDIO i ak a S a a uints8 LEDCount 0 EMSA sef 0 o a FUNCTION NAME delay of mem_c sef nfa nfa xl FUNCTION delay E yuser 68 le wf INPUT time delay time D 68 1l xf OUTPUT none EEA target T48 1K xj HHH HHH JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE JE IAA HAHAHA EA IRA s 0 0 e xj void delay int32 time fd div s 192 0 e xi f f M target c 228 0 x while time ff Startup s 328 1028 xj Z KKK HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH HHH KKH KHHI FUNCTION NAME mainf x FUNCTION main function INPUT none OUTPUT none HH HH HHH HHH HH HHH HHH HHH HHH HHH HH EEE EEE EE EEE EEE EEEE E EEEE EEEE EEEE EEE EEEE EEEE EEEE int main void TestLedEN while 1 IO1SET 1 lt lt LEDIO delay 1000000

Download Pdf Manuals

image

Related Search

Related Contents

Service Manual  Canon DIGREB1855XT User's Manual  X940 – X945  All-In-One User Manual  Fujitsu AMILO Li 3710  Ergänzung der Bedienungsanleitung, Waveinjector  取扱説明書 - 日東工業株式会社 N-TEC  Manual del usuario  Samsung AQV09PWCX Manual de utilizare  ! ! CENTRE!EQUESTRE!LE!P`TIT!RANCH! CONVENTION!DE!PRET  

Copyright © All rights reserved.
Failed to retrieve file