Home
New SBC1788 User Manual V1.3
Contents
1. Name of Example Programs Descriptions Using the LCD controller of the LPC1788 to LCD Display drive an LCD module LCD Configuring an LCD and calibrating a touch LCD Touch screen A simple application of USB mass storage USB MassStorage devices Configuring the USB device on the SBC1788 USB USB VirtualCom M to work as a virtual serial interface Configuring the LPC1788 to work as a USB UsbHost MassStorage host Emac EasyWeb A simple web application Testing the EMAC driver without involving a Emac Raw Ethernet protocol layer A simple web application that involves IP Emac uIP ICMP UDP and TCP protocols UART Autobaud UART communication under auto baud mode UART Dma Using UART under DMA mode UART Interrupt Using UART under interrupt mode UART UART Polling Using UART under polling mode Uart Rs485Master Host application for RS485 communication Uart Rs485Slave Slave application for RS485 communication EMC Emc NandFlashDemo Writing and calibrating on board NAND Flash Page 60 em A Premier Farnell Company Name of Example Programs Descriptions Emc SdramDemo Writing and calibrating on board SDRAM Rtc Alarm Generating interrupts in the second counter increment interrupts and an alert interrupt every 10 seconds as well RTC Rtc Calendar Configuring RTC calendar Rtc Calibration Calibrating RTC clock Using the function of CAN driver to c
2. Ji Pins Definitions Descriptions 1 12V Power supply 12V 1 25A 2 GND Grounded 3 GND Grounded 3 2 2 RS232 Interface COM1 Pins Definitions Descriptions 1 NC NC 2 RXD Receive data 3 TXD Transit data Page 7 Em A Premier Farnell Company COM1 Pins Definitions Descriptions 4 NC NC 5 GND GND 6 NC NC 7 NC NC 8 NC NC 9 NC NC 3 2 3 Ethernet Interface CON10 Pins Definitions Descriptions 1 TX TX output 2 TX TX output 3 RX RX input 4 CT CT 5 CT CT 6 RX RX input 7 NC NC 8 SHIELD Shield 9 LED1 LINK LED 10 VDD3V3 3 3V Power for LED 11 LED2 SPEED LED 12 VDD3V3 3 3V Power for LED 13 485 Connect to shield 14 7 amp 8 Connect to shield Page 8 Em A Premier Farnell Company CON10 Pins Definitions Descriptions 15 NC NC 16 NC NC 3 2 4 USB Host Interface CON2 Pins Definitions Descriptions 1 VBUS T5V 2 D USB Data 3 D USB Data 4 GND GND 3 2 5 USB Device Interface CON1 Pins Definitions Descriptions 1 VBUS 5V 2 D USB Data 3 D USB Data 4 ID USB ID 5 GND GND 3 2 6 TF Card Slot CONS Pins Definitions Descriptions 1 DAT2 Card data 2 2 DAT3 Card data 3 Page 9 Em A Premier Farnell Company CON3 Pins Definition
3. 1 C C Compiler t h e win d OW Assembler aes Output Converter etup Download Images Extra Options Plugins and select the nee Build Actions Driver Run to Setu p ta b In Linker J Link J Trace v main CEE oc oo the right part deng use macro file s and then select GDB Server IAR ROM monitor H I jet L J Link J pi Device description file Tra ce In th e Macraigor Cl verri de default PE micro Driver drop RDI JTAGjet down menu ST LINK Third Party Driver TI XDS100 Figure 62 Downloading amp Debugging Tool Page 53 4 Click the Download tab and checkbox and then click OK Options for node Test Category General Options C C Compiler E mbes A Premier Farnell Company check the Verify download Factory Settings Assembler Output Converter Setup Download Images Extra Options Plugins Custom Build Build Actions Linker Simulator Angel GDB Server Cl attach to progr M erit download CO Suppress download Cuse flash loader verride default board file IAR ROM monitor TOOLKIT_DIR config flashloader NXP Flash T jet J Link J Trace TI Stellaris Macraigor PE micro RDI JTAGjet ST LINK Third Party Driver TI XDS100 Edit Figure 63 Check the Verify Download Checkbox 5 Select Project Download and Debug on the menu bar of the IAR Embedded Workbench IDE window to start dow
4. EFFET ac Q OO OLI 00000 D Figure 3 SBC1788 Hardware Dimensions Top Layer Component Heightmax 13 mm Bottom Layer Component Heightmax 3 mm Board Thickness 1 6mm 6 layer PCB Page 4 em A Premier Farnell Company 2 Hardware Features 2 1 Processor e NXP 32 bit ARM Cortex M3 LPC1788FBD208 e On Board Memory o 128MB NAND Flash o 32MB SDRAM o 4MB SPI Flash spare solder pads o 2Kb EEPROM spare solder pads 2 2 Interfaces e LCD Touch Screen Interface o Supports 4 3 480x272 and 7 800x480 TFT LCDs o Supports 4 wire resistive touch screen o 16bit RGB565 mode e 4 serial interfaces UARTO 3 wire serial interface from DB9 male connector with RS232 level UARTI 5 wire serial interface from DIP connector with default TTL level which can be customized as RS232 level UART3 3 wire serial interface from DIP interface with default RS232 level which can be customized as TTL level UARTA 3 wire serial interface from DIP interface with default TTL level which can be customized as RS232 level e 1 channel RS485 Serial port brought out by Phoenix Connector e USB 2 0 host interface at 2Mbps e USB 2 0 host device interface at 12Mbps e 10 100 Mbps Ethernet interface Page 5 em A Premier Farnell Company TF card interface CAN2 0B interface 2 user custom buttons 1 reset button 1 ISP button 20 pin standard JTAG debugging interface buzzer 6 channel PWM interfac
5. Enter cr leave a debug sess Figure 51 Start Debugging Page 46 em A Premier Farnell Company 5 2 Development Based on IAR EWARM The following content is composed of two parts which introduce how to create and compile IAR projects as well as program and debug the compiled files 5 2 1 Creating New Project Compiling 1 Launch the software to open the IAR Embedded Workbench IDE window as shown below Ps IAR Embedded Workbench IDE File Edit View Project Tools Window Help Workspace find all th e guides EXAMPLE PROJECTS Example applications that demonstrate hardinare nerinherals fr GETTING STARTED USER GUIDES Guidelines for setting up Complete product your project adding documentation in PDF format aires wan all the files namnilina linkinn Figure 52 IAR Embedded Workbench Window 2 Select Project Create new project on the menu bar of the above window to create a new project Page 47 em A Premier Farnell Company 3 Select Empty project in the following pop up window and then click OK Create Hew Project Tool chain Project templates Empty project asm C C Externally built executable Description Creates an empty project Figure 53 Select an Empty Project 4 Select a path to save the new project in the following pop up window and then click Save Save in 2 My Documents P My Recen
6. Verify data Verifying complete Testing terminated Page 72 t A Premier Farnell Company Page 73 em A Premier Farnell Company 6 1 11 Emc_SdramDemo Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 the HyperTerminal window will display information as shown below CkCkckck ckck ckck kck ckck kck ck ck kck ck ck ck ck ck ck kck ckck kk ck ck k ck ck ck kck ck ck k ck ck ck ck ck k ck kk kk kk k k k KKKKKKKKKKKKKKKKKKKKK Hello NXP Semiconductors Test SDRAM mt481c16m16A2P with LPC1788 EMC MCU LPC177x_8x Core Cortex M3 UART Communication 115200 bps Write and verify data with on board SDRAM ck ck ck ck kk ck ck ck ck ckock ckck kc ck ck ockock ckck kCckckckockckckck kckockckockckckck ckck ckckockok ckck ckck ckck ckck ck ck kk kk Ckckckck ckck ckckck ck kck ckck ckck ck k kk Isic SIDES s Clear content of SDRAM Weier ja aa Forme o o Verifying data Werer onge WAcsliciiae om Lo bits ORMENES oc Clear content of SRAM Mercing ia LG bits Forma o Verifying complete Testing terminated Page 74 em A Premier Farnell Company 6 1 12 RTC Calendar Program 1 Install a CR1220 battery in the RTC battery holder marked as RTC in Figure 1 on page 2 on the SBC1788 2 Connect the SBC17
7. Em A Premier Farnell Company D saine Y n tea arive ns C FLASH D27 5 44 4 4 34 43 3 3343 434 4 3 43 TERE RRERERERREREREREERERE BERR ERE 3 Startup 028 LCD Type Config a CMSIS CM3 O29 TERRA ARAAAAA RARER ARAAATAEAAATEERAREREAREREEEEREEEERERERRERED Drivers 030 E App 031 define LCD 480272 PA Main 032 fdefine LCD 800480 nain c 033 s 1ogo h 034 a lpelTTx D Jet h 025 TATRA KARR a A AY RRR 3 433 4848 Y ERA T RARER RARER RRR RE RE I I AN i 1pc types h 035 macro declare tdint h 37 TR GR YR RUERROURUIURR UR RAR AAA TARTAR AAA TARE A AEA IURE AERATED LJ cursor h 038 s system lpelTTx 8x h 038 define LCD PUR ENA DIS DLY 10000 i bsp h 040 define LCD_ENA DIS_DLY 10000 i phylan len8720 h 041 s sdram mt48lel6m16 h 042 define CRSR PIX 32 o ici drive h 043 define CRSR PIX 64 1 Readme 044 define CRSR ASYNC Figure 93 7 Macro Definition Note 4 The SBC1788 supports two LCD modules LCD6000 43T and LCD6000 70T which have a 480x272 4 3 and a 800x480 7 screen respectively D D The red line of the LCD flat cable should be on the same side as the 1st pin marked with a triangle of the CONO interface B The capacitors C3 C5 C6 and C7 should be removed from the board if a 4 3 touch screen LCD is used 3 The keil project uC OSII uC GUI is saved under X code SBC1788 uCOSII uCGUI MDK ARM where X is the label of the CD ROM
8. Figure 45 Click Rebuild The information box at the bottom of the window shows that compilation has completed successfully Now the process of creating and compiling a project is finished Page 42 em A Premier Farnell Company 5 1 2 Programming and Debugging You can now proceed with flash programming and debugging by following the steps listed below 1 Right click Targeti in the tree view of uVision4 window and select Options for Target Targeti1 and then select the Utilities tab in the pop up window as shown below W Options for Target Target 1 Device Target Output Listing User C C Aen Linker Debug Utilities Configure Flash Menu Command e Use Target Driver for Flash Programming ULINK Cortex Debugger e Settings v Update Target before Debugging MESI ULINK Cortex Debugger Init File fStellaris ICDI zj Edit Signum Systems JTAGjet C Use Ext Cortex M R J LINK J Trace se ERM ST Link Debugger JULINK Pro Cortex Debugger Command NUI ink Debugger Figure 46 Utilities Tab 2 Check the radio button Use Target Device for Flash Programming and the checkbox Update Target before Debugging select ULINK Cortex Debugger in the corresponding drop down menu and then click Settings 3 Select the Flash Cortex E Target Driver Setup Down load ta b Debug Trace Flash Download Download Function RAM for Algorithm In th e po p u p W e Greg E Mo Stat x10000000 Size 0080
9. amp GPIO Channel 6 in Figure 1 on page 2 6 1 22 Mci_Fatfs_vO08a Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Insert a TF card in the TF card slot marked as Micro SD in Figure 1 on page 2 on SBC1788 Page 84 mbes A Premier Farnell Company 3 Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 the HyperTerminal window will display information as shown below DOKCkckckckck KK KK KK KK KK KK KK ck ck KK KK KK KK KK KK KKK KKK KK KK KK KK ck ck k kc KK kk kk kckckckckckck kckckck ck ck ckck kck ck ck kk ck Hello NXP Semiconductors MCI File System Example MCU LPC177x 8x Core ARM CORTEX M3 UART Communication 115200 bps This example is used to demonstrate how to implement a filesystem using MCI FatFs a generic FAT file system module for small embedded Systems is used in ver R0 08a KKEKKKKKKKKKKKKKKKKKKK KK KK KK KK KK Sk kk kk ck kk kk kc k ck ck kc ko kc kc kck ck kk ko kk kk Ckckckckckckck kckckck ck ck kck ck ck XX XX Type the message txt content Hello NXP Semiconductors MCI File System Example Close the file Create a new fil hel lo tb Write a text data hello txt 14 bytes written Close the file read the file hello txt Type the file content hello txt Hello world Closs the ile ellos eE Open root directory Directory J ger 65 message t
10. 168 809 232 OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK 2323333 Seoeecoaooeee ce ego S 23 33332333 Spee nn nn n o 3 Figure 91 Echotool Running Information 6 2 4 SBC1788 uCOSII uCGUI Program 1 Connect an LCD to the CONO interface marked as LCD amp Touch in Figure 1 on page 2 on the SBC1788 with an LCD flat cable 2 Expand the Main branch in the tree view on the left side of the uVision4 window and double click the Icd driver h and then select a definition of initialization macro on the right side according to the LCD screen size as shown below RN SCH FLASH 027 FREREAAAAAAEAAAAAAAAAAERERAAAAAAA EE ERED Startup 028 LCD Type Config ii CMSIS CM3 D29 FARRAR AAA AAA AA AAA AAA AAA A AAA TATA ATA AEA AAA AAA AAA EEE EEEE E Drivers 030 1 Main 032 define LCD 800480 A main c 033 a Logo h 034 lpc1TTx_8x_led h OGG TAA AAA RARER TAA AAA TAA EAA E AERA AAA EATER EER RER EAA ERA EEE EEEE EEE Lx L e types h 036 macro declare stdint h 037 LAZZZZILIIILIIIILISSZIISILLZZIIILILZSZSLLILISLLLSSSEAAI L cursor h 038 Le system lpciTTx 8x h 039 define LCD PUR _ENA DIS DLY 10000 a bsp h 040 define LCD_ENA DIS DLY 10000 2 phylan lan8720 h 041 naa s sdram_mt48lcl6mi6 h 042 define CRSR PIX 32 o IL ca drive h 043 define CRSR PIX 64 By Readme 044 define CRSR ASYNC o Figure 92 4 3 Macro Definition Page 96
11. FLASH 97 PF RRARAAAAAAAAAAAARARARARARARARARARARA RATA ATTA TATA RATATAT AAT A Ci Startup 028 LCD Type Config a CHSIS CHS 029 OLEEEEEELEEEEEEEEEEEZEEEEEEEEEETEEEEEESSEESEEEESEEEEEEEESES EE Drivers 030 EH App 031 define LCD 480272 S A main e 033 A Logo A QM s lpelTTx 8x led h 35 TATA AAAARA RAE A AAA A RARER EAE R AREA E RARER EERE RUE RUE AGE AUGUE RUE RU IG s 1pe_types h 035 macro declare i stdint h 3 T9TAXTETATATAAT3TI3IT3 4433393 9 9 9 9 0 9 3 9 0 3 03 0 3 f 3 f eee e n n n n GJ cursor h 038 system lpelTTx 8x h 039 define LCD PWR ENA DIS DLY 10000 xz bsp h 040 define LCD ENA DIS DLY 10000 x phylan lanBT20 h 041 DONN E x sdram_mt481c16m16 h 042 define CRSR PIX 32 o Lcd drive h 043 fdefine CRSR PIX 64 i Dj Readme 044 define CRSR ASYNC o Figure 73 Macro Definition for 7 Note 4 The SBC1788 supports two LCD modules LCD6000 43T and LCD6000 70T which have a 480x272 4 3 and an 800x480 7 screen respectively LH The red line of the LCD flat cable should be on the same side as the 1 pin marked with a triangle of the CONO9 interface 4 The capacitors C3 C5 C6 and C7 should be removed from the board if a 4 3 touch screen LCD is used Page 65 t A Premier Farnell Company 3 Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 and use a stylus to touch the points which are marked with symbo
12. VirtualBox Bridged Networking Driver vi ari v v MI Install Description Transmission Control Protocolinternet Protocol The default wide area network protocol that provides communication across diverse interconnected networks M Show icon in notification area when connected Notify me when this connection has limited or no connectivity Figure 9 Internet Protocol TCP IP Internet Protocol TCP IP Properties UI General You can get IP settings assigned automatically if your network supports this capability Otherwise you need to ask your network administrator for the appropriate IP settings Obtain an IP address automatically Use the following IP address IP address 192 192 192 116 Subnet mask 255 255 255 0 Default gateway 192 192 192 101 btain DNS server address aut aticall Use the following DNS server addresses Preferred DNS server 202 96 134 133 Alternate DNS server 202 96 128 166 Cas Note Figure 10 Select Advanced Please ensure the option Use the following IP address is checked and then click Advanced to specify additional IP addresses for PC Page 21 4 Click Add in the IP address block in the window shown below 5 Enter an IP address that is in the same network segment as the SBC1788 the SBC1788s default IP t A Premier Farnell Company Advanced TCP IP Settings TP Sett
13. a cable always pull on the cable connector or strain relief loop not on the cable itself Warning This is a class A product In a domestic environment this product may cause radio interference in which case the user may be required to take adequate measures Page 2 em A Premier Farnell Company Appendix 2 Technical support amp Warranty Embest Technology Co Ltd established in March of 2000 is a global provider of embedded hardware and software Embest aims to help customers reduce time to market with improved quality by providing the most effective total solutions for the embedded industry In the rapidly growing market of high end embedded systems Embest provides comprehensive services to specify develop and produce products and help customers to implement innovative technology and product features Progressing from prototyping to the final product within a short time frame and thus shortening the time to market and to achieve the lowest production costs possible Embest insists on a simple business model to offer customers high performance low cost products with the best quality and service 2 1 Technical support service Embest provides one year of free technical support for all products The technical support service covers Embest embedded platform products software hardware materials e Assistance to customers with regards to compiling and running the source code we offer e Troubleshooting proble
14. set as below SZ Flash Magic NON PRODUCTION USE ONLY File ISP Options Tools Help GH AB vES e 9 3 Step 1 Communications Step 2 Erase Select Device COM Port COM 3 Baud Rate 57600 Interface None ISP Erase all Flash Code Ad Prot Oscillator MHz 12 000 Erase blocks used by Hex File vic Priorities hex Modified Monday August 6 2012 8 59 56 AM more info Step 4 Options Step 5 Start Verify after programming 0 Fill unused Flash Gen block checksum Execute Visit the Flash Magic home page for info on the latest revision www esacademy com software flashmagic Figure 69 Flash Magic Configuration Settings e Select Device LPC1788 e COM Port Set this according to your PC serial port e Baud Rate Set to 57600 or lower e Interface None ISP e Oscillator MHz 12 000 e Hex File Select the hex binary file to be downloaded 4 Download the hex file Note The ISP SW3 button should be constantly pressed Press the RESET button and then release the ISP SW3 button LPC1788 will then enter ISP mode Click the Start icon to start downloading the hex file After the download finishes press the RESET button and the MCU will start to run Page 58 Em A Premier Farnell Company 6 Software Examples The CD ROM provided along with the SBC1788 contains abundant example programs All the programs are created based on the standard peripheral libra
15. to start flash programming V D XSBC1T88 CD ROM code LPC177x_8x_StdPeriph Demo Examples 16 GP10 GP10_LedBlinky Keil Gpio_LedBlinky uv EBR arRo coem E ES Target 83 Startup Otem heap area 40 Drivers Fa Main int main void f Gpio Le Gy Readne return c entry yt 8 V Build Output Tinker to generate wrapper code to setup stacks and initialize and copy code and data segments For GNU toolsets the entry point is through start in the crtO gnu asm file and that startup code will setup stacks and data allocate Build target linking FLASH Program Size Code 3744 RO data 260 RU data 24 ZI data 512 FromELF creating hex file AFlashGpio LedBlinky axf 0 Error s 0 Warning s Downicad code to flash memory ULINK Cortex Debugger Figure 49 Start Flash Programming 7 After programming is done right click Target1 in the tree view of the uVision4 window and select Options for Target Targeti and then select the Debug tab in the pop up window as shown below W Options for Target Target 1 Device Target Output Listing User C Use Simulator Limit Speed to Real Time Settings C C Asm Linker Debug Utilities RDI Interface Driver v Load Application at Startup Initialization File Restore Debug Session Settings M Breakpoints Iw Toolbox I Watch Windows amp Performance An
16. which introduce how to create and compile MDK projects as well as program and debug the compiled files 5 1 1 Creating and Compiling a New Project 1 Click Z u Visiond DER Eile Edit View Project Flash Debug Peripherals Tools Start SVCS Hindow Help 8 All Programs Keil uVision4 on the PC s desktop to open a uVision4 window as shown right il 495 OF 0 7 Figure 38 uVision 4 Window Page 38 pe t A Premier Farnell Company 2 Click Project New uVision Project on the menu bar of the uVision4 window to open the following window Create New Project Save in QMeaue el eu ek E3 cust obj My Recent Measure Documents My Network File name X Places Save as type Project Files uvproj Le Cancel Figure 39 Create a New Project 3 Specify the storage path and name for the new project e g Target1 and then click Save 4 Select NXP founded by Philips LPC4357 in the tree view of the window shown below and then click OK Select Device for Target Target 1 CPU Vendor NXP founded by Philips Device LPC1788 Toolset ARM Data base Description 3 LPC1769 ARM Cortex M3 processor 3 LPC1774 running at frequencies of up to 100 MHz 3 LPC1776 Memory Protection Unit MPU Nested Vectored Interrupt Controller NVIC 3 LPC1777 Non maskable Interrupt NMI input 3 LPC1778 Wakeup Interrupt Contr
17. 0 window as C Donot Erase Resetand Run Programming Algorithm shown right LECH oc IAP 512kB Flash On chip Flash 00000000H 0007FFFFH Figure 47 Flash Download Settings Page 43 Click Add at the bottom of the window t A Premier Farnell Company Note The purpose of this step is to add necessary flash programming algorithms If LPC17xx IAP 512kB Flash is already in the list of Programming Algorithms there is no need to add it again and you can jump to step 4 4 Select LPC17xx IAP 512Kb Flash in the pop up window as shown below and click Add Add Flash Programming Algoriths LPC122xlAP 64kB Flash LPC1To 13 IAP 8kB Flash LPC122x IAP 80kB Flash LPC122x IAP S6kB Flash LPC1 Zo IAP 128kB Flash LPC1 Zo IAP 256kB Flash LPC17xx IAP 32kB Flash LPC17xx IAP 512kB Hash LPC1 Zo IAP 64kB Flash MBSBF500 256kB Flash MBSxFxx1 64kB Flash MBSxFxx2 128kB Flash MBSxFxx4 256kB Flash MBSxFxx5 384kB Flash MBSxFxx6 512kB Flash MDR32Fx 128kB Flash On chip Flash On chip Flash On chip Flash On chip Flash On chip Flash On chip Flash On chip Flash On chip Hash On chip Flash On chip Flash On chip Flash On chip Flash On chip Flash On chip Flash On chip Flash On chip Flash Figure 48 Add a Flash Programming Algorithm 5 Click OK twice to go back to the uVision4 window Page 44 t A Premier Farnell Company 6 Click the Download button T on the tool bar of the uVision4 window
18. 2 Program EE 92 6 2 2 httpraw sa Program e ce SEENEN AE eer EET DEA 93 6 2 3 tcpecho sa Program oos cereo encender wea v x xa RV aa da 94 6 2 4 SBC1788 uCOSII uCGUI Program 96 6 2 5 SBC1788 uCOS II v2 86 Program 97 7 Function T amp gSsLb us cosa uvusaxakussuuukzwARR RE ERuRKE A ERAREREuR kXVAwER E ua d Appendix 1 ESD Precautions amp Handling Procedures 2 Appendix 2 Technical support amp Warranty 3 2 1 Technical support service 3 2 2 Maintenance service ddause Hn 4 2 3 Basic guidelines for protection and maintenance of LCDs 5 t A Premier Farnell Company 2 4 Value Added Gervicesg e N NNN NNN NNN NN KN N NNN NN NNN NNN NN NN KN 6 em A Premier Farnell Company 1 Product Overview 1 1 Introduction The SBC1788 is an industrial single board computer designed by Embest Technology based on the LPC1788FBD208 a 32 bit ARM Cortex M3 processor from NXP It is built to industrial standards with features including support for real time operating systems good EMC performance and abundant interfaces such as UART I2C SPI PWM AD and DA In addition the CD ROM provided along with the SBC1788 contains drivers and example programs for all the on board devices helping users start their evaluation and development quickly and easily The SBC1788 is suited for a wide scope of applications and can meet the requirements in many different fields including e Instrumentat
19. 30 3 App 031 fdefine LCD 480272 54 Main 032 fdefine LcD 800480 A main c 033 3 logo h 034 k 1pe1TTx_8x_led h 095 FAR RARE RAA RARE REN E NANA 4 433 33 33 43 4 3 3 3 23 v3 TE RER A s lpe_types h 036 macro declare a stdint h D A s cursor h 038 Le system lpelTTx B8x h 038 define LCD PUR ENA DIS DLY 10000 s bsp h 040 define LCD ENA DIS DLY 10000 LA phylan_len8720 h 041 s sdram_mt48lcl mi6 h 042 define CRSR PIX 32 o ici drive h 043 define CRSR PIX 64 1 H E Readme 044 define CRSR ASYNC o Figure 84 7 Macro Definition Note A The SBC1788 supports two LCD modules LCD6000 43T and LCD6000 70T which have a 480x272 4 3 and a 800x480 7 screen respectively 4 The red line of the LCD flat cable should be on the same side as the 1st pin marked with a triangle of the CON9 interface 4 The capacitors C3 C5 C6 and C7 should be removed from the board if a 4 3 touch screen LCD is used Page 86 em A Premier Farnell Company 3 Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 the HyperTerminal window will display information as shown below KK KK ok ek ok ok KK KK SKK eK ek ko ok KK KK ok ek ok ok ok Kok ok ok K K IO II IK XX Ok ck kk ok ee E Hello NXP Semiconductors SSP DMA example MCU LPC177x 8x Core ARM CORTEX M3 UART Communication 115200 bps This example uses SSP fu
20. 6 6 Software Examples eeeeoe eese eene nennen nnns DO 6 1 Basic Example Programs for Peripherals esse 59 6 1 2 LCD Display Program 63 6 1 3 LCD Touch Progra Misses inneni waa ENNER Va CR RE WR 65 6 1 4 USB MassStorage Program 66 6 1 5 USB VirtualCom Program cssssseeeen nennen nnn 67 6 1 6 USB HostLite Program 68 6 1 7 Emac EasyWeb Program sise 69 6 1 8 UART Autobaud Program 70 6 1 9 Uart Rs485Master amp Uart Rs485Slave Programs 71 em A Premier Farnell Company 6 1 10 Emc NandFlashDemo Program eeeseeeen nnnm 72 6 1 11 Emc SdramDemo Program sise 74 6 1 12 RTC Calendar Program 75 6 1 13 Can Aflut Program sise 76 6 1 14 DMA Flash2Ram Program 78 6 1 15 Wdt Reset Program ENNEN 79 6 1 16 Timer MatchInterrupt Program 80 6 1 17 Systick 10msBase Program eeseeseeeenn mmm 81 6 1 19 NVIC PEOGEGID NEE 82 6 1 19 PWR DeepSleep Program ss 83 6 1 20 GPIO LedBlinky Program sisi 83 6 1 21 Pwm SingleEdge Program 84 6 1 22 Mci Fatfs v008a Program ss 84 6 1 23 SSP LCD Touch Program 86 6 1 24 ADC Polling Program ia DN EAR SEA ERUIT REA 87 6 1 25 Dac SineWave Program 88 6 1 26 BOD Progra M ess saine either re hr nra IHRER Y ENEE EENS dE dE ke 89 6 1 27 Cre D mo Programmes 89 5 1 28 1AP ele Tun EE 91 6 2 Application Programs cceecceesee cess teense esse tease tease mnn 92 1 1 1 SBC1788 emWin51
21. 88 1 SBC1788 2 CAN CAN Figure 80 CAN Connection Diagram 2 Connect one SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 3 Power on both boards and recompile the project and then download it to their flash memories 4 Reboot both SBC1788s The HyperTerminal displays information as shown below KEKKKKKKKKKKKKKKKKKKKKKKKKKKEKKKKKKKKKKKKKKKKKKKKKKKKK KK KK KK Ckckckck ckck ckckck ck kck ckck ckck ck kk Hello NXP Semiconductors CAN AFLUT example IMS EL sse Core ARM CORTEX M3 OARE emt TL5200 Tess Use 2 CAN peripherals CAN1 amp CAN2 to transfer data This example tests full Acceptance Filter operation and load remove AFLUT entry dynamically functions kkkxkxkxkxkxkxkxkxkxkxkkkxkxkxkxkkkxkxkxkxkkkxkkxkxkkkxkkxkxkxkxkkkxkxkxkxkkkkkxkxkkkxkkxkxkxkx k Ckckckckckckckck ck ck kckckck ck k ck kk Test Acceptance Filter function Init message finished Setup AF SUCCESSFUL Message ID 0x00000001 Message length 0x00000008 BYTES Page 76 A Premier Farnell Company Page 77 em A Premier Farnell Company 6 1 14 DMA Flash2Ram Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 the HyperTerminal window will display information as shown below CkCkckck ckck c
22. 88 to your PC with a cross over serial cable and open a HyperTerminal window 3 Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 the HyperTerminal window will display information as shown below KKEKKKKKKKKKKKKK Ck Sk Sk kk Ck kk Ck kk Ck kk kk Sk kk kk ck ck kk Sk kc k ck ck kc ko kc kc kck ckckck ck kk kk Ckckckckckckck ckck ck ck ck ck ckck ck ck ck kk ck Hello NXP Semiconductors RTC Set Example MCU LPC177x 8x Core ARM CORTEX M3 UART Communication 115200 bps A simple RTC Calendar example To generat interrupt in Second Counter Increment Interrupt 1s Ck ck ck kk ck Ck ck ck Ck Sk Ck kk Ck kk kk Ck kk Ck kk Ck kk ck ck Sk kk kk kk kk kk k ck ck kc ko kc ko kck ckckck ck kk kk kckckckckckck ckckckck ck ck kck ck ck XX XX Current time set to 02012 003 013 016 015 030 02012 003 013 OMG JOS Osi 02012 003 013 016 015 032 02012 003 013 016 015 033 02012 003 013 016 015 034 02012 003 013 016 015 035 02012 003 013 016 015 036 02012 003 013 016 015 037 02012 003 013 016 015 038 02012 003 013 016 015 039 02012 003 013 016 015 040 Page 75 em A Premier Farnell Company 6 1 13 Can Aflut Program 1 Connect the third and fourth pins of the CAN interface marked as CAN2 0B in Figure 1 on page 2 on a SBC1788 to the same pins on another SBC1788 as shown below CANH 1 CANH CANL CANL SBC17
23. 8ms Lal 3 00333U 0 00 U 43 9 ns 2 41 6662nU 10 00ns 3 12500U 100 0000tz pe ursor Jump C1 to 21 Vertical Figure 81 Oscilloscope Showing Square Waves Page 81 Em A Premier Farnell Company 6 1 18 NVIC Program 1 Modify the macro definition of INT MODE as shown in the following uVision4 window to test Tail Chaining or Late arriving interrupt mode s E b Cc ES 3 Nvic Priorities c SCH FLASH 9 Startup OZA ttn ee e e e e A RR AA AAA eee e ee PRIVATE DEFINTIONS 315 3 CMSIS CM3 035 Interrupt mode Drivers 036 0 Tail chaining interrupt Ej ip Main 037 1 Late arriving interrupt IEs Reie Priorities c 038 x 3 Readme 039 fdefine INT MODE 1 70 or 1 nan Figure 82 Modify INT_MODE Macro Definition 2 Recompile the project after modification and then download it to flash 3 Reboot the SBC1788 to run the program The testing processes under two modes are listed below e Tail Chaining interrupt mode When the LED2 indicator is blinking triggered by ADC interrupt press the SW3 button to generate an INTO interrupt and LED1 will blink 10 times after the ADC interrupt expires e Late arriving interrupt mode When the LED2 indicator is blinking triggered by ADC interrupt press the SW3 button to generate an INTO interrupt which will take over control from the ADC interrupt and trigger LED1 to blink 10 times After the INTO interrup
24. 9 The installation window as shown below will be closed automatically after ULINK Pro driver is installed Page 27 Em A Premier Farnell Company cx D XkeilVAREAULIBEXInstallULIRK exe DOE Installing ULINK ET EE Figure 21 Installing ULINK Pro Driver 10 Now the installation of the Keil MDK integrated development environment has been completed successfully Page 28 t A Premier Farnell Company 4 4 Installing IAR EWARM Development on the LPC1788 requires version 6 20 or higher of IAR EWARM All the EWARM projects contained in the CD ROM provided with the board are created by using IAR EWARM 6 40 2 You can download the latest version from IAR s official website www iar com The following content will show you how to install an IAR EWARM integrated development environment using IAR EWARM 6 40 2 as an example 1 Double click the installation file of IAR EWARM to open the installation interface as shown below IAR Embedded Workbench Evaluation for ARM Installation and licensing information Install IAR Embedded Wo bench Release notes Install drivers Explore the i ns tallation me lia OIAR SYSTEMS LA AL AE UR dul Figure 22 IAR EWARM Installation Interface 2 Click Install IAR Embedded Workbench 3 Click Next in the following window to continue installation Page 29 pe t A Premier Farnell Company IAR Embedded Workbench for ARE 6 40 2
25. ARTAATXAXTRTAAATATATETATIAATAAETAEASRA A 4 Gk n e n n n n 3 Drivers SCH Main Haefine LCD 800480 amp E nein c z Logo h lpelTTx 8x led h 035 tutt kk Y GGG GRGA GR AG YA AX GA A G3 3003303 03 rna e n n n n n n n s 1pc types h macro declare stdinth O97 sss98kxk x n e n n e een Li cursor h si a systen lpelTTx 8x h Hdefine LCD PWR ENA DIS DLY 10000 a bsp define LCD ENA DIS DLY 10000 LA phylan lan8T20 h mE LA sdram nt481cl6n16 h define CRSR PIX 32 o pEr define CRSR PIX 64 3 fj Readme define CRSR ASYNC Figure 87 7 Macro Definition Note 4 The SBC1788 supports two LCD modules LCD6000 43T and LCD6000 70T which have a 480x272 4 3 and a 800x480 7 screen respectively B The red line of the LCD flat cable should be on the same side as the ist pin marked with a triangle of the CON9 interface 4 The capacitors C3 C5 C6 and C7 should be removed from the board if a 4 3 touch screen LCD is used The Keil project of SBC1788 emWin512 is saved under X code SBC1788 emWin512 MDK ARM Start where X is the label of the CD ROM drive Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 the LCD will display the demonstration images of emWin Two groups of LEDs LED1 amp LED3 and LED2 amp LED4 will light up alternately 6 2 2 httpraw sa Program 1 Connect the SBC1788 to PC with a cross over network cable and power o
26. C value and display via UART interface Turn the potentiometer to s ADC value changes Press q to stop the demo KKEKKKKKKKKKKKKKKKKKKK kk Ck kk kk kk Sk kk kk ck kk kk kc kk ck kc ko kc kckck ck ck XX kk kk ckckck ck ckck kck XX X DC value on channel 002 is 0000003889 DC value on channel 002 is 0000003853 DC value on channel 002 is 0000003640 DC value on channel 002 is 0000003459 DC value on channel 002 is 0000003270 DC value on channel 002 is 0000003146 DC value on channel 002 is 0000003002 DC value on channel 002 is 0000002847 DC value on channel 002 is 0000002730 DC value on channel 002 is 0000002604 DC value on channel 002 is 0000002594 DC value on channel 002 is 0000002596 pop o p op op pop po po pom p DC value on channel 002 is 0000002611 6 1 25 Dac SineWave Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 and then use an oscilloscope to detect the signal on the DAC OUT pin the 6 pin of the interface Page 88 t A Premier Farnell Company marked as UART1 3 4 amp DA amp AD 3CH in Figure 1 on page 2 A sine wave with Vpp 3 3V and frequency at 300Hz can be detected by oscilloscope as shown below pu wm YOKOGAWA 51 T 500kS S ZMSAliv Maint10k gt gt CH1 1 1 1 00 U div DC Full Figur
27. Core ARM CORTEX M3 UART Communication 115200 bps This example used to test UART component with autobaudrate function It will adjust its rate to synchronize with the sending data Page 70 em A Premier Farnell Company Please press any key to b choed Press ESC to terminate Cckckckckckckckck ck ck kckckck ck ck ck kk a Press r to re show the welcome string Ck ck ck ck ck ckck ckck ck kk ck KK ck ck ck kk Ck kk ck kk kk ck ck ck ck kk Ck ck ck kk ko Ckck ck ck kc kk ck Ck ck kk ck ck kck kk Type any character and the HyperTerminal window will respond with the same character Note Type r to show the welcome string again 4 Press ESC on your keyboard to terminate the program 6 1 9 Uart Rs485Master amp Uart Rs485Slave Programs 1 Connect the fifth and sixth pins of the RS485 interface marked as RS485 in Figure 1 on page 2 on an SBC1788 to the same pins on another SBC1788 as shown below SBC1788 1 RS485 Master Figure 79 Connection Between Two SBC1788 485A 9 485A 485B 485B SBC1788 2 RS485 Slave 2 Connect one of the boards to a PC with a cross over serial cable and open a HyperTerminal window 3 Power on both boards and recompile the Uart Rs485Master and Uart Rs485Slave projects and then download them to the flash memories of host the board with cross over seria
28. Evaluation ad Welcome to the InstallShield Wizard for IAR Embedded Workbench for ARM Evaluation The InstallShield Wizard will install IAR Embedded Workbench for ADM Evaluation on your computer To continue click Next j Cancel Figure 23 Click Next 4 Select the radio button I accept the terms of the license agreement and the click Next in the following window IAR Embedded Workbench for ARE 6 40 2 Evaluation This is an evaluation release of the software solely intended for TESTING and EVALUATION purposes Other use than for evaluation and testing is prohibited IAR Systems has no obligation to provide support or related services and gives no warranties IN NO EVENT SHALL IAR SYSTEMS BE LIABLE TO THE OTHER FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL CONSEQUENTIAL PUNITIVE OR TORT DAMAGES OF ANY NATURE w 9 accept the terms of the license agreement I do not accept the terms of the license agreement Figure 24 License Agreement 5 Enter your name and your company s name as well as the license number in the following window and then click Next Page 30 em A Premier Farnell Company IAR Embedded Workbench for ARE 6 40 2 Evaluation Enter your name the name of your company and your IARA Embedded Workbench for ARM Evaluation license number Name Company Can be found on the CD cover or via e mail registration License Figure 25 Enter User Information 6 Co
29. LED1 4 LEDs Definitions Descriptions LED1 P4 15 User LED2 P4 16 User LED3 P4 17 User LED4 P4 18 User Page 17 t A Premier Farnell Company 4 Preparations Before you get started with software development you need to make a series of preparations including configuring HyperTerminal setting up a network and installing a Keil MDK or IAR EWARM integrated development environment The following contents will show you how to complete the installation and configuration processes on a PC running Windows XP 4 1 Configuring HyperTerminal 6 Start All Programs 5 Accessories S Communications 8 HyperTerminal On your PC s desktop to open a HyperTerminal window as shown below L Connection Description Ap New Connection Enter a name and choose an icon for the connection Name Embest Icon Figure 4 New HyperTerminal Window Page 18 3 Configure the 2 Select the serial interface used to connect to the SBC1788 from the Connect using drop down menu as shown in the window to the right and then click OK serial interface according to the configurations in the window shown to the right and then click OK t A Premier Farnell Company Enter a name for the new HyperTerminal in the Name textbox and then click OK Connect To S Embest Enter details for the phone number that you want to dial Country region Area code Ph
30. OUT DAC_OUT 7 P1_05 P1 5 8 GND GND 9 TXD3 UART3_ TXD Page 14 Em A Premier Farnell Company 3 2 12 CON7 Pins Definitions Descriptions 10 TXD1 UART1 TXD 11 RXD3 UART3_ RXD 12 RXD1 UART1_ RXD 13 P1 13 P1 13 14 P5 02 P5 02 15 TXD4 UART4_ TXD 16 CTS1 UART1_CTS1 17 RXD4 UART4_ RXD 18 RTS1 UART1_RTS1 19 GND GND 20 GND GND GPIO amp I2C Interfaces CONS Pins Definitions Descriptions 1 VDD5V 5V power supply 2 VDD3V3 3 3V power supply 3 12C0_SCL I2CO SCL 4 I2C2 SCL I2C2 SCL 5 I2CO SDA I2CO SDA 6 I2C2 SDA I2C2 SDA 7 P4 21 P4 21 8 GND GND 9 P4 22 P4 22 Page 15 Em A Premier Farnell Company 3 2 13 CONS Pins Definitions Descriptions 10 PO 04 PO 04 11 P4 23 P4 23 12 PO 05 PO 05 13 P4 26 P4 26 14 PO 18 PO 18 15 P4 27 P4 27 16 P3 21 P3 21 17 P4 28 P4 28 18 GND GND 19 GND GND 20 GND GND CAN amp RS485 Interfaces CON4 Pins Definitions Descriptions 1 12V Power 2 GND_IN GND 3 CAN1H CAN1_H 4 CANIL CANT L 5 485A RS485 6 485B RS485 Page 16 3 2 14 Buttons em A Premier Farnell Company S1 SW1 SW3 Pins Definitions Descriptions S1 RESET System SW1 USER1 User defined Sw2 USER2 User defined SW3 ISP ISP 3 2 15 LED Indicators
31. PC1788 Erase block 0 0x000000 0x000FFF Erase block 1 0 001000 0 001FFF COM Port COM 3 rase block 2 0x0021 a ase block 3 0x0 Baud Rate 57600 Eres Eick eer Erase block 5 0x005000 Ox005FFF Erase all Flash Code Rd Prot Oscillator MHz 12 000 Erase blocks used by Hex File Interface None ISP Step 3 Hex File Hex File D Nvic_Priorties hex Modified Monday August 6 2012 8 59 56 AM more info Step 4 Options Step 5 Start Q Fill unused Flash Gen block checksums Execute On Line training classes for microcontrollers and embedded networking and Internetworking www esacademy com fag classes Figure 67 Flash Magic Advanced Options 2 Then select the Hardware Config tab and set the T1 T2 numbers according to figure below Flash Magic NON PRODUCTION USE ONLY File ISP Options Tools Help SH O3eebz uo Advanced Options Communications Hardware Config Security Just In Time Code Timeouts Misc Use DTR and ATS to control RST and ISP pin C Keep ATS asserted while COM Port open 1 50 ms T2 1100 ms Cl Assert DTA and RTS while COM Port open Visit the Flash Magic home page for info on the latest revision www esacademy com software flashmagic Figure 68 Flash Magic T1 amp T2 Settings Page 57 t A Premier Farnell Company 3 Ensure the Flash magic settings are
32. R IAR ROM monitor Preinclude T jet 5 Q J Link J Trace TI Stellaris Defined symbols one per Macraigor L1 Preprocessor output to PE micro m RDI JTAGjet ST LINK Third Party Driver TI XDS100 LEN PROJ DIR A e e Wore Device NXPALPC1T7x_8x Incluc SLE Weeks Wore Devife NXPALPC1TTx_8x Source Drivers include M Figure 58 Head File Paths 10 Click Linker on the left side of the window and select the Config tab in the right part of the window and then check the Override default checkbox and click the button as shown below to specify the paths of the linker configuration files 11 Click OK to Options for node Test save settings Category Factory Settings General Options C C Compiler Assembler Output Converter Config Library Input Optimizations Advanced Output Custom Build Build Actions Linker configuration file Override default Debugger SPROJ DIRV 1 V makesection mekerule link Simulator L GDB Server IAR ROM monitor I jet J Link J Trace TI Stellaris Macraigor PE micro RDI JTAGjet ST LINK Third Party Driver TI XDS100 Configuration file symbol definitions one per line OK Cancel Figure 59 Linker Configuration File Locations L 12 Right click the project name on Embedded Workbench IDE window and select Rebuild All to recompile the IAR Embed project ded Workbench IDE File Edit View Projec
33. RM LIMITED ARM FOR THE USE OF THE SOFTWARE ACCOMPANYING THIS LICENCE ARM IS ONLY WILLING TO LICENSE THE SOFTWARE TO YOU ON CONDITION THAT YOU ACCEPT ALL OF THE TERMS IN THIS LICENCE BY CLICKING I AGREE OR BY INSTALLING OR OTHERWISE USING OR COPYING w M agree to all the terms of the preceding License Agreement Keil pay 4 Setup lt Back Caes Figure 15 License Agreement 4 Click Browse in the window shown below to specify an installation path and then click Next Setup c7 14 4 22a Folder Selection KE i L Select the folder where SETUP will install files Tools by ARM SETUP will install px Vision in the following folder To install to this folder press Met To install to a different folder press Browse and select another folder r Destination Folder C Keil Browse Figure 16 Specify the installation path 5 Enter user information such as name company name and email and then click Next to start file installation process Page 25 Em A Premier Farnell Company Setup BEDE ARE 4 22a Customer Information P KE E Please enter your information Tools by ARM Please enter your name the name of the company for whom you work and your E mail address First Name Last Name Company Name E mail Back Next Cancel Figure 17 Enter User Information 6 After file installation is completed keep the default settings u
34. SBC1788 Industrial Single Board Computer User Manual Version 1 4 15 Jan 2014 t A Premier Farnell Company em A Premier Farnell Company Copyright Statement e SBC1788 and its related intellectual property are owned by Shenzhen Embest Technology Co Ltd Shenzhen Embest Technology has the copyright of this document and reserves all rights Any part of the document should not be modified distributed or duplicated in any approach and form without prior written permission issued by Embest Technology Co Ltd Revision History Version Date Description 1 0 06 08 2012 Original Version 1 1 29 11 2012 First Revision 1 2 14 06 2013 Second Revision 1 3 11 10 2013 Third Revision 1 4 15 01 2014 Localisation em A Premier Farnell Company Table of Contents 1 Product OVERVIEW xxxn NUES NENNEN ENNEN ENNEN NEEN Nee Nu us MEE D 1e BE ie ge odo PE m 1 dE icc MUTTER 1 1 3 Board ITS Tae S EE EEN 2 1 4 SY Ste RK e Le BEE 3 1 5 Physical eu Ee Ce EE 4 2 Hardware Feat GS usines uessuEENOHEARIFENSEMNdEEETENMENEFEEFEESYSESEENEE GAS D 2 1 PFOCOSSOLR 2 v e c V RN ee Poe eet EE 5 2 2 titel EEN 5 2 3 Operational Parameters e NEEN NENNEN 6 3 Hardware Detauleogessgagseeggagssggassgeggegesgeuegesggageeegg geg sg geg ee geg 7 S21 CPU Introduction E 7 E e eg ele E 7 3 2 1 Power Jacket ERI E RENI ne ca 7 3 2 2 RS232 Interface cien e xen e amener seve EVER EA entendues 7 3 2 3 Ethernet Interface iier repete
35. V 5V power supply 40 VDD12V 12V power supply 3 2 8 JTAG Interface CON5 Pins Definitions Descriptions 1 VTREF 3 3V power supply 2 VSUPPLY 3 3V power supply 3 NTRST Test system reset 4 GND GND 5 TDI Test data input 6 GND GND 7 TMS Test mode select 8 GND GND 9 TCK Test clock 10 GND GND 11 RTCK GND 12 GND GND 13 TDO Test data output 14 GND GND 15 NSRST Test system reset Page 12 Em A Premier Farnell Company CON5 Pins Definitions Descriptions 16 GND GND 17 DBGRQ Connect to GND 18 GND GND 19 DBGACK Connect to GND 20 GND GND 3 2 9 PWM Interfaces CON11 Pins Definitions Descriptions 1 P3 22 P3 22 2 VDD3V3 3 3V power supply 3 PWM1_1 PWM1 1 4 PWM1_2 PWM1 2 5 PWM1_3 PWM1 3 6 PWM1 4 PWM1 4 7 PWM1 5 PWM1 5 8 PWM1_6 PWM1 6 9 P3 23 P3 23 10 GND GND Page 13 3 2 10 SPI Interfaces em t A Premier Farnell Company 3 2 11 CON12 Pins Pins Pins 1 SPIO MOSI SPIO MOSI 2 VDD3V3 3 3V power supply 3 P3_20 P3 20 4 P3_19 P3 19 5 SPIO SSEL SPIO SSEL 6 P3 14 P3 14 7 SPIO SCK SPIO SCK 8 P2 25 P2 25 9 SPIO MISO SPIO MISO 10 GND GND UART amp ADC DAC Interfaces CON7 Pins Definitions Descriptions 1 VDD5V 5V power supply 2 VDD3V3 3 3V power supply 3 ADCO_INO ADCO_INO 4 ADCO_IN2 ADCO_IN2 5 ADCO_IN1 ADCO_INO 6 DAC_
36. alyzer M Run to main v Memory Display CPU DLL Parameter SARMCM3 DLL MPU Dialog DLL Parameter DARMPI DLL pLPC1788 Altera Blaster Cortex Debugger a Load Stelaris ICDI Signum Systems JTAGjet Cortex M R J LINK J Trace ST Link Debugger _JULINK Pro Cortex Debugger NULink Debugger Iv Watch Windows Iw Memory Display Driver DLL Parameter SARMCM3 DLL MPU Dialog DLL Parameter TARMP1 DLL pLPC1788 Figure 50 Debug Settings Page 45 PETER A Premier Farnell Company 8 Check the radio button Use at the top right of the Debug tab and select ULINK Cortex Debugger in the corresponding drop down menu and then click OK 9 Click the Debug button Q on the tool bar of the uVision4 window as shown below to start online debugging WD SBC1788 CD ROM code LPC177x_8x_StdPeriph_Deao Examples 16 GPIO GP10_LedBlinky Keil Gpio_LedBlinky uv EIS File Edit View Project ash Debug Peripherals Jools SV Help Hj channelVal 2 ppo gt amma m m g N c Os EET 224 return c entry Ox00000F64 OFA4 LSRS 0x00000F86 0000 Mous 0x00000F88 0000 Mous Ox00000F82 1000 ASRS int main void d return c entry r4 r4 30 r0 r0 r0 r0 r0 r0 0 LOAD FLASH Gpio LedBlinky axf INCREMENTAL a e Downlot 0x00000F80 Setup Setup for Runnin e gt ASSIGN BreakDisable BreakEnable BreakKill BreakList Type int 0
37. ated right click each group and select Add Files to Group to add relevant source code W D SBC1788 CD ROM code LPC177x_8x_StdPeriph Demo Examples Test Iest_example MDE Test uvp sh Debug Peripherals cools SVCS Window Help Tm E As Ae vA FA Target 1 127 Reset Handler PROC O Source Grow 128 EXPORT Reset_Handler WEAK ONSIS cNG 129 IMPORT SystemInit Drivers 130 IMPORT _ main al AN Options for Group Main 1t F7 RO SystemInit RO RO main RO mdlers infinite loops which can be modified RT NMI Handler WEAK Figure 43 Adding Source Code to Groups 8 Right click Target1 in the tree view of the uVision4 window and select Options for Target Target1 and then select C C tab in the pop up window as shown below W Options for Target Target 1 Device Target utput Listing User C C Asm Linker Debug Utilities r Preprocessor Symbols Define Undefine r Language Code Generation Strict ANSI C Warnings Optimization flevelO 00 Enum Container always int kunspecified Optimize for Time Plain Char is Signed Split Load and Store Multiple J Read Only Position Independent One ELF Section per Function Bead Write Position Independent n Made diens AAA ACore CMSI1S Include 4 4 Core Device NXPSLPC1 7x_8x Mnclude 4 4 ADriversNin aths Misc Controls Compiler c cpu Cortex M3 g 00 apcs interwor
38. ation process Page 32 em A Premier Farnell Company TAR Embedded Forkbench for ARE 6 40 2 Evaluation Click Install to begin the installation If you want to review or change any of your installation settings click Back Click Cancel to exit the wizard Install Cancel Figure 29 Select Install 10 Click Finish in the following window to finish the installation process IAR Embedded Workbench for ARE 6 40 2 Evaluation InstallShield Wizard Complete The InstallShield Wizard has successfully installed IAR Embedded Workbench for ARM Evaluation Click Finish to exit the wizard View the release notes Launch IAR Embedded Workbench for ARM Figure 30 Installation is Complete 4 5 Installing Flash Magic Optional Flash Magic is a free downloadable tool designed to run on a Windows based PC It is used for downloading programs to NXP s Flash MCU by Page 33 em A Premier Farnell Company using serial or Ethernet protocols The supported chips include the ARM C51 and LPC families Please visit http www flashmagictool com supporteddevices html To view all the supported target devices Note If you don t want to use this tool to download programs please ignore this section 1 Download Flash Magic from http www flashmagictool com 2 Double click the installation file to open the window as shown below ie Setup Flash Magic W
39. based on given data by using the LPC1788 s CRC function Crc Dma Implementing CRC 32 calibration based on given data under DMA mode by using the LPC1788 s CRC function IAP Using IAP to update the space after the user code in flash and read chip information including ID boot code version and serial number 6 1 2 LCD Display Program 1 Connect an LCD screen to the CONO interface marked as LCD amp Touch in Figure 1 on page 2 of the SBC1788 with an LCD flat cable 2 Expand the Main branch in the tree view on the left side of the uVision4 window and double click Icd driver h and then select a definition of initialization macro on the right side according to the LCD screen size as shown below Page 63 Pi t A Premier Farnell Company DEE E FLASH Poor 998RRTRRTSTTITTTITTIAT T3333 33 333 2 23 9 2 9 2 4 3 8 9 8 2 3 8 0 REET ET EE Startup 028 LCD Type Config CMSIS CM3 D29 GGG RR RW GER RR EE EE EE EE EE RR EE EE AREA 7 Drivers 030 EE Main 032 define LCD_s800480 main e 033 3 logo h 034 s 1pe1TTx 8x 1cd h DU TYX4XYT4TYYTETTAYTATYYTA Y YAYYA 4 YYAXY A Y AY WA A Y 3 RA YR AY Rt s 1pc types h 036 macro declare D stdint h O37 WXXRAXA4YXRA TA YRTATRA Y AAT RAT ATA RR Y 4 3 4 33 4 3 3 G3 n gn nen i cursor h 038 LA system_lpe1TTx_8x h 039 define LCD PWR ENA DIS DLY 10000 bsp h 040 define LCD ENA DIS DLY 10000 LA phylen_lan8720 h 041 B x
40. ck ck kck ck ck ck ck kock ckck kk ck ck ck ck kck kckckckckckckck kckockckockckckck ckck ckckckck ckckckck kck ck ck kck kk kk Ckckckck ckck ckckck ck kck ckck kk ck kk Hello NXP Semiconductors Timer Match Interrupt demo MCU LPC177x 8x Core ARM CORTEX M3 UART Communication 115200 bps Use timer x toggle MATx 0 at frequency 1Hz Cckck ck ck kck ck ck ck ck ockock ckock kk ck ck ok ck kck kk ck kockckckck kckock ck ckckckck ckckckckockck ckckckck kck ckck kk kk kk Ck ck ckck ckck ckckck ck kck ckck kk ck k XX Match interrupt occur Meets M OC CHE EE Male chagiimiseq t EE Mate Amusement CCCUur 0 A 0 5Hz spare wave can be viewed using an oscilloscope detecting the output signal from CON11 4 the 4th pin of the interface marked as PWM 6CH amp GPIO in Figure 1 on page 2 on the SBC1788 Page 80 t A Premier Farnell Company 6 1 17 Systick_10msBase Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 A 100Hz spare wave can be viewed using an oscilloscope as shown below detecting the output signal from CON12 4 the 4th pin of the interface marked as SPI amp GPIO in in Figure 1 on page 2 on the SBC1788 e Normal Tl YOKOGAWA 21 5OkS s 20ms diw CH1 1 1 1 00 U diu DC Full Edge CHi F Auto 59 9
41. cts contained in the CD ROM provided along with the board are created in MDK 4 22a You can download the latest version from Keil s official website www keil com The following content will show you how to install the Keil MDK integrated development environment using MDK 4 22a as an example 1 Launch the installation package to open the window shown below Setup BMDE ARE 4 22a Welcome to Keil u Vision KE l L Release 9 2011 Tools by ARM This SETUP program installs MDK ARM V4 22a This SETUP program may be used to update a previous product installation However you should make a backup copy before proceeding It is recommended that you exit all Windows programs before continuing with SETUP Follow the instructions to complete the product installation Next gt gt Figure 14 Installation Program 2 Click Next to continue 3 Check I agree to all the terms of the preceding License Agreement and click Next in the window shown below Page 24 Pa t A Premier Farnell Company Setup 10 3 14 4 22a License Agreement KE l L Please read the following license agreement carefully Tools by ARM To continue with SETUP you must accept the terms of the License Agreement To accept the agreement click the check box below END USER LICENCE AGREEMENT FOR MDK ARM THIS END USER LICENCE AGREEMENT LICENCE I8 A LEGAL AGREEMENT BETWEEN YOU EITHER A SINGLE INDIVIDUAL OR SINGLE LEGAL ENTITY AND A
42. display 4 colour stripes red green blue and yellow as well as a light blue round spot moving along the red stripe Page 64 Pa t A Premier Farnell Company 6 1 3 LCD_Touch Program 1 Connect the LCD screen to the CONO interface marked as LCD amp Touch in Figure 1 on page 2 of the SBC1788 with an LCD flat cable 2 Expand the Main branch in the tree view on the left side of the uVision4 window and double click Icd driver h and then select a definition of initialization macro on the right side according to LCD screen size as shown below Ga cu ira are e SCH FLASH O27 TERRA AA AAAAAAAAAAAATAALAAATRALAATTRTAAAATAEAATATREAAAA TELE H Startup 028 LCD Type Config Di CMSIS CM3 2g 5 5ttA RA AAA AA AAA AAA AAA AAA A TARA AA AAA AAA AREA AAA EAA A ATA TT 0 Drivers 03 SH Main 032 define LCD_800480 main c 033 s Logo h 034 el Apel T7x_8x_led h DR MAAR AAAA AAA AAA TAA AAA AAA AAA AUR AAA RAR AEA AEA AERA TRAE AERA AU A A s 1pc types h 03 macro declare a stdint h 03 trates TTT DT EE EE i cursor h 03 si a system 1pelTTx Bx h 039 fdefine LCD PWR ENA DIS DLY 10000 Le bsp h 040 define LCD_ENA_DIS_DLY 10000 s phylan_len8720 h 041 o s sdram mt481c16m16 h 042 define CRSR PIX 32 o 1 drive h 043 define CRSR PIX 64 1 7j Readme 044 define CRSR ASYNC o Figure 72 Macro Definition for 4 3 1ed arive ne SCH
43. drive Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 The LCD will display demonstration images of uC OSII uC GU Two groups of LEDs LED1 amp LED3 and LED2 amp LED4 will light up alternately 6 2 5 SBC1788 uCOS II v2 86 Program 1 Power on the SBC1788 and recompile the project and then download it to flash 2 Reboot the SBC1788 Two groups of LEDs LED1 amp LED3 and LED2 amp LED4 will light up alternately Press and hold the SW1 Page 97 t A Premier Farnell Company button LEDs will blink at a higher frequency Press and hold the SW2 button LEDs will blink at a lower frequency Page 98 em A Premier Farnell Company 7 Function Test The testing entries listed in the following table can help users verify the function of the peripherals on the SBC1788 Entries Descriptions LCD amp Touch Screen Please refer to 6 1 2 LCD Display Program and 6 1 3 LCD Touch Program Please refer to 6 1 4 USB MassStorage Program and 6 1 5 USB Device USB VirtualCom Program USB Host Please refer to 6 1 6 USB HostLite Program Ethernet Please refer to 6 1 7 Emac EasyWeb Program UART Please refer to 6 1 8 UART Autobaud Program Please refer to 6 1 9 Uart Rs485Master amp Uart Rs485Slave RS485 Programs NAND Flash Please refer to 6 1 10 Emc NandFlashDemo Program SDRAM Please refer to 6 1 11 Emc_SdramDemo Program RTC Please re
44. e 3 channel ADC interface DAC interface SPI interface I2C interface 18 separated GPIO interfaces 5x5 matrix keypad interface External 12V power jack high precision RTC interface 2 WDT in chip and an on board spare interface for external hardware WDT Power indicator USB Device FS indictor USB Host FS indicator 4 user customisable indicators 2 3 Operational Parameters Dimensions 120x87mm 6 layer PCB Operating Temperature 40 85 C Storage Temperature 40 85 C Operating Humidity 0 90 Non Condensing Power Supply 12V 1 25A Electric Standards CE FCC and CCC Page 6 Em A Premier Farnell Company 3 Hardware Details This chapter will give you an overview of the product hardware system by introducing the CPU and interfaces used on the SBC1788 3 1 CPU Introduction The SBC1788 uses an LPC1788FBD208 from NXP a low power ARM Cortex M3 MCU with high performance price ratio This MCU works at a frequency of up to 120MHz and integrates an LCD image controller 512 KB of flash memory 96KB of SRAM 4KB of EEPROM and abundant peripherals including Ethernet USB device host OTG 5 UARTs 3 SPI SSPs 3 I2Cs and 165 GPIOs 3 2 Interface Introduction The SBC1788 provides many different on board interfaces such as RS232 Ethernet USB host OTC TF card and LCD interfaces This section will give you brief introductions for each of these interfaces 3 2 1 Power Jack
45. e 85 Oscilloscope Showing Sine Wave 6 1 26 BOD Program 1 Use a regulated DC power supply to provide 12V voltage for the SBC1788 2 Recompile the project and download it to flash 3 Reboot the SBC1788 and use a multimeter or oscilloscope to monitor VDD3V3 and then adjust the input voltage of the regulated DC power supply When 1 85V VDD3V3 lt 2 2V the BOD program generates a NVIC interrupt which triggers LED1 to blink for 5 times When VDD3V3 1 85V the BOD generates a reset signal which will trigger LED1 to blink constantly 6 1 27 Crc Demo Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 the HyperTerminal window will display information as shown below Page 89 Pe t A Premier Farnell Company KKEKKKKKKKKKKKKKKKKKKK KK KK KK KK KK Sk kk kk ck ck kk kk kk ck kc kk ko kck ck ck ck ko kk kk kckckckckckck ckckckck ck ck ckck ck ck ck ck ck ck Hello NXP Semiconductors CRC Demo example MCU LPC177x 8x Core ARM CORTEX M3 UART Communication 115200 bps Use CRC engine on WAC ie Bx TO CzlewlecSe CRC for m Sie block data You can choose one of three polynomial type CR CC CAT CROSIO CRC 32 Ck ck ck ck ck ckck ckck ck ck ck ck kck KK KK KK KK KK KK KK KK ck ko kk Ckck ck kk ck Ckck ck ck ok ko kc k Ck ck k ck k kc kck k
46. eX REPE E ee 8 3 2 4 USB Host Interface wo nnn nnn nnn 9 3 2 5 USB Device Interface xe EE SEENEN ea latex teste a eek 9 3236 TF CaEd SlOEs EE 9 3 2 7 LED Interface EE 10 3 2 8 JTAG Interfaces ses een danse ua ere ea Rr vx Pr CE iat 12 3 2 9 PWM Interfaces iiie ehe nee peer a enn nd rr E HE XR Ease Ee Rede ceva rere 13 Kb KH AE Tel ie 14 3 2 11 UART amp ADC DAC Interfaces cseessseeenn emen nn nna 14 3 2 12 GPIO amp I2C Interfaces weet nmm nennen 15 3 2 13 CAN amp RS485 Interfaces sisi emen nen 16 Em A Premier Farnell Company 3 2514 BUTCONS EE 17 3 2 15 LED Indicators ssn irinna aAA AE A AAAA aee 17 4 Preparations cac rco cc oo ca onc o or cic ooo ae LS 4 1 Configuring HyperTerminal seeeeeee nnn 18 4 2 Configuring Gleeweg dere ge 20 2 3 Installing Keil MIDI asse dusud a aduxa tune dus exu depui 24 4 4 Installing IAR EWARM sese mmn nnn 29 4 5 Installing Flash Magic Optional 33 5 Software Development Process OO 5 1 Development Based on the Keil MDk eese 38 5 1 1 Creating and Compiling a New Project 38 5 1 2 Programming and Debugging Us 43 5 2 Development Based on IAR EWARM nnn 47 5 2 1 Creating New Project Compiling essem 47 5 2 2 Programming and Debugging ss 53 5 9 In System Programming see exa ibas ova oix aod 55 5 3 2 Create a HEX file with MDK ARM Henne 55 5 3 3 Create HEX file with TAR EWARM emen 56 SESSEL TRITT 5
47. ean the LCD after long time use avoid cleaning the surface with fingers or hands as this may leave fingerprints or smudges 3 Do not clean the surface of the screen with unsuitable chemicals Page 5 em A Premier Farnell Company Note UI Embest do not supply a maintenance service for LCDs We suggest the customer immediately checks the LCD once in receipt of the goods In the event that the LCD does not run or shows no display the customer should inform Embest within 7 business days of delivery 2 4 Value Added Services We will provide following value added services e Driver development based on Embest embedded platforms for devices such as serial ports USB interface devices and LCD screens e Control system transplantation BSP driver development API software development e Other value added services including supply of power adapters and LCD parts e Other OEM ODM services e Technical training Please contact Embest with any technical support queries http www embest tech com contact us html Page 6
48. ed CH Setup will install Flash Magic into the following folder To continue click Next If you would like to select a different folder click Browse c Program Files Flash Magic Atleast 19 6 MB of free disk space is required Embedded Systems Academy Inc Figure 33 Installation Path 6 Click Browse in the window shown below to specify the position of the Flash Magic shortcut icon in the Start Menu and then click Next Page 35 em A Premier Farnell Company s Setup Flash Magic Select Start Menu Folder Where should Setup place the program s shortcuts ua Setup will create the program s shortcuts in the following Start Menu folder To continue click Next If you would like to select a different folder click Browse Figure 34 Position of Short Cut Icon 7 Select the options Create a desktop icon and Create a Quick Launch icon according your requirements and then click Next Lal Setup Flash Magic Select Additional Tasks Which additional tasks should be performed Select the additional tasks you would like Setup to perform while installing Flash Magic then click Next C Create a Quick Launch icon Figure 35 Create Icons 8 Click Install in the window shown below to start installation Page 36 t A Premier Farnell Company em iB Setup Flash Magic Ready to Install Setup is now ready to begin installing Flash Magic on your computer C
49. elcome to the Flash Magic Setup Wizard This will install Flash Magic 7 20 on your computer It is recommended that you close all other applications before continuing Click Next to continue or Cancel to exit Setup Cancel Figure 31 Flash Magic Installation Window 3 Click Next to continue 4 Select I accept the agreement in the window shown below and click Next Page 34 Pa t A Premier Farnell Company iB Setup Flash Magic License Agreement Please read the following important information before continuing Please read the following License Agreement You must accept the terms of this agreement before continuing with the installation FLASH MAGIC LICENSE EMBEDDED SYSTEMS ACADEMY INC You should carefully read the following terms and conditions before using this software Unless you have a different license agreement signed by Embedded Systems Academy Inc ESA your use distribution or installation of this copy of Flash Magic indicates your acceptance of this license If you do not agree to any of the terms of this License then do not install distribute or use this copy of Flash Magic ets O1 do not accept the agreement Re KEEN e Embedded Systems Academy Inc Figure 32 License Agreement 5 Click Browse in the window shown below to specify an installation path and then click Next iB Setup Flash Magic Select Destination Location Where should Flash Magic be install
50. er Farnell Company 7 After all the files are added right click the project name and select Options to open the window below Options for node Test Category General Options C C Compiler Assembler Output Converter Custom Build Build Actions Linker Debugger O Core Cortex M3 Dima NXP LPC1788 Processor variant Simulator Angel GDB Server IAR ROM monitor I jet Endian mode J Link J Trace I TI Stellaris Macraigor PE micro RDI JTAGjet ST LINK Third Party Driver Ce Figure 57 Project Options Window 8 Under the Target tab check the radio button Device and click the E button on the right and then select NXP LPC1700 NXP LPC1788 in the pop up menu Page 50 em A Premier Farnell Company 9 Click C C Compiler on the left side of the window and select the Preprocessor tab in the right part of the window and then add the paths of the head files to the Additional include directories textbox Options for node Category Factory Settings General Options C Multi file Compilation C C Compiler Discard Unused Publics Assembler Output Converter Output List Preprocessor Diagnostics MISRA C 2004 n gt Custom Build 2 gt Build Actions Clianore standard include direc Linker Additional include directories one per line Debugger PROJ DIR A Simulator PROJ_DIR Core CMSIS Include Angel SPROJ_DIR GDB Server PROJ_DI
51. ernal reset or WDT time out The program is currently working in FLASH mode Ck ck ck ck kk ck kck ck kk ck kk KK KK KK KK KKK KKK KK KK KK KK KK KK KK KK kk kk ck ck ck ko kc k Ck ck kk XX EX ck kckck ck ck ckckckck ck ck kk XX kk Last MCU reset caused by External Ck ck ck ck kk ck kck ck kk Ck kk ck ck ck kk kk KKK Ck kk ck ck ck ko kk kk ck ck kk kk ck ck ck ko kc k Ck ck ck kk k kc k kk XX XX kckck ck ck ckckckck ck ck k kk kk This Welcome Screen below will executive after reset event Hello NXP Semiconductors Watch dog timer reset when timeout demo MCU LPC177x 8x Core ARM CORTEX M3 WAR CommiLmiCercaoias ILLSZ00 loy Use WDT with Internal RC OSC reset mode timeout 5 seconds To reset MCU when time out After reset program will determine what cause of last reset time external reset or WDT time out The program is currently working in FLASH mode KKEKKKKKKKKKKKKK KKK KKK KK KK KK KK KK KK KK KK KK KK KK ck kk ko kk Ck ck ck ko kc k Ck ck kk XX EX EX kckck ck ck ckckckck ck ck k kk kk Last MCU reset caused by WDT TimeOut Page 79 em A Premier Farnell Company 6 1 16 Timer MatchInterrupt Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 the HyperTerminal window will display information as shown below ckck
52. fer to 6 1 12 RTC Calendar Program CAN Please refer to 6 1 13 Can Aflut Program LED amp Buzzer Please refer to 6 1 20 GPIO LedBlinky Program MicroSD Please refer to 6 1 22 Mci Fatfs v008a Program ADC Please refer to 6 1 24 ADC Polling Program DAC Please refer to 6 1 25 Dac SineWave Program Page 1 em A Premier Farnell Company Appendix 1 ESD Precautions amp Handling Procedures Please note that the board comes without any case box and all components are exposed Therefore extra attention must be paid to ESD electrostatic discharge precautions To effectively prevent electrostatic damage please follow the steps below e Avoid carpets in cool dry areas Leave A development kits in their anti static packaging Li 4 until ready to be installed e Dissipate static electricity before handling any system components development kits by touching a grounded metal object such as the system unit unpainted metal chassis e If possible use antistatic devices such as wrist straps and floor mats e Always hold an evaluation board by its edges Avoid touching the contacts and components on the board e Take care when connecting or disconnecting cables A damaged cable can cause a short in the electrical circuit e Prevent damage to the connectors by aligning connector pins before you connect the cable Misaligned connector pins can cause damage to system components at power on e When disconnecting
53. ings DNS WINS Options IP addresses Subnet mask IP address 255 255 255 0 192 192 192 116 Remove Default gateways Gateway Metric 192 192 192 101 Automatic Add Edit Remove Automatic metric OK Cancel Figure 11 Click Add IP Settings DNS WINS Options IP addresses TCPAP Address address is 192 168 0 232 Subnet mask e g 192 168 0 40 in the pop up window and then enter a subnet mask and 192 192 192 101 Automatic click Add meee e Add Edit Remove Automatic metric i Figure 12 Enter an IP Address Note Q You can use any IP address from 192 168 0 1 to 192 168 0 254 except 192 168 0 100 because this address will cause IP conflict when the Ethernet example program is running Page 22 t A Premier Farnell Company 6 The window shown below indicates that a new IP address has been added to the PC Now click OK to finish the configuration Advanced TCP IP Settings IP Settings DNS WINS Options IP addresses a Sub 192 192 192 116 255 255 2550 92 168 0 20 255 255 255 0 Default gateways Gateway Metric 192 192 192 101 Automatic Automatic metric Interface metric Figure 13 Click OK Page 23 em A Premier Farnell Company 4 3 Installing Keil MDK Development on the LPC1788 requires version 4 20 or higher of the Keil MDK All the MDK proje
54. ion e Home automation e Medical diagnosis e Motor control 1 2 Kit Contents e SBC1788 e Cross Over Serial Cable DB9 150CM e Cross Over Network Cable 150CM e USB A Male to MINI USB B Male Cable e 12V 1 25A Power Adaptor e Four Hex Head Cap Screws with four Brass Tube Plugs e CD ROM e Optional LCD Touch Screen 4 3 with 480x272 resolution or 7 with 800x480 resolution Page 1 PERE A Premier Farnell Company 1 3 Board Interfaces Power i uU x ais r A9 NEM Uu Power In ro E 1 x RS485 Den Jw e D h y g omg m es 5522 ISP Key TX UART1 3 4 amp I2C amp KeyBoard spa GPIO Buzzer DA amp AD 3CH amp GPIO sin Figure 1 SBC1788 Board Interfaces LCD amp JTAG PWM 6CH amp GPIO Page 2 A Premier Farnell Company 1 4 System Diagram 3CH AD 1 DA 6CH PWM BUZZER 4 Key amp 4 LED 5 5 Keyboard Up to 18GPIO Figure 2 SBC1788 System Block Diagram Block Description Interface modules of CPU Chips or spare solder pads on NEN the board EN Interfaces on the board Page 3 1 5 Physical Dimensions A 2 Et EE GE WEES EGER EE 2 32 g 38 OOOOLI 100900 au gt mig O out EE EEE CRE EEE LULL EEG 3 BASS ass lom BR ews E We TAAA B sse E HER t A Premier Farnell Company oo trte a S555H B88 ge ode 323
55. irtualCom Program 1 Connect the SBC1788 to your PC with a USB A M to USB B M cable and a cross over serial cable 2 Open a HyperTerminal window on your PC refer to 4 1 Configuring HyperTerminal on page 18 3 Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 The board will be recognized as a virtual serial device and the LED6 indicator will light up You can find a serial device named LPC178x USB VCOM Port COMx under the Ports COM amp LPT branch in the Device Manager window of your PC as shown below Computer Management Fie Action View Window Help e DS m 3 R a Computer Management Local B PC 201206292303 B A System Tools EI Batteries gj Event viewer Computer Performance Logs and Alert 2 DVD CD ROM drives Device Manager CN IDE ATA ATAPI controllers c Keyboards Removable Storage Mice and other pointing devices Disk Defragmenter b Modems Z Disk Management EI Monitors D n Services and Applications 8 Network adapters Y Ports COM amp LI F Shared Folders ze Disk drives Local Users and Groups 9 Display adapters Com Port COM4 Comm Port COM3 g s Processors Sound video and game controllers System devices Universal Serial Bus controllers Figure 75 LPC177x Working as a Serial Device Note A If the PC prompts you to install a driver you can find the dr
56. iver under X code LPC177x_8x_StdPeriph_Demo Examples 02 USB Device USB_VirtualCom where X is the label of CD ROM drive 5 Open a HyperTerminal window for the virtual serial device Any characters entered in a window will be received and displayed in the other as shown below Page 67 Em A Premier Farnell Company x Tee LL Embest HyperTerminal e LPC177x Bx USB VCOM HyperTerminal EIS File Edit View Cal Transfer Help De co 0a ge D S 29 e Message from LPC177x 8x USB VCOM Message from Ture COM v lt s Si Connected 0 03 53 Auto detect 115200 8 N 1 Connected 0 03 31 Auto detect 115200 6 N 1 Figure 76 Communication Between Serial Devices 6 1 6 USB HostLite Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Copy the folder Folder and the file FILENAME R txt from 3 X code LPC177x_8x_StdPeriph_Demo Examples 03 USBHostLiteNUsbHost MassStorage to a USB flash drive where X is the label of CD ROM drive and then insert the drive into the USB interface of the SBC1788 Note A Due to the uncertainty of compatibility some USB flash drives may not work properly with this program Please try another drive if you encounter this issue 4 Power on the SBC1788 and recompile the project then download it to flash 5 Reboot the SBC1788 the HyperTerminal window will display information as shown bel
57. k Cckckckckckckckck ck ck kckckck kc k ck kk Block data 0x00000000 0x00000001 0x00000002 0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008 0x00000009 0x0000000A 0x0000000B 0x0000000C 0x0000000D 0x0000000E 0x0000000F 0x00000010 0x00000011 0x00000012 0x00000013 0x00000014 0x00000015 0x00000016 0x00000017 0x00000018 0x00000019 0x0000001A 0x0000001B 0x0000001C 0x0000001D 0x0000001E 0x0000001F 0x00000020 0x00000021 0x00000022 0x00000023 0x00000024 0x00000025 0x00000026 0x00000027 0x00000028 0x00000029 0x0000002A 0x0000002B 0x0000002C 0x0000002D 0x0000002E 0x0000002F 0x00000030 0x00000031 0x00000032 0x00000033 0x00000034 0x00000035 0x00000036 0x00000037 0x00000038 0x00000039 0x0000003A 0x0000003B 0x0000003C 0x0000003D 0x0000003E 0x0000003F Choose what polynomial that you want to use type c Ug Ue INC Cie aL UZUgS CIL 1915 CNO SZ Us Ou CRC CCITT Result 0x0000FD2F Choose what polynomial that you want to use type VIV CRC CCIUNME USUO CIL c USER CRC ES Vols Gau Page 90 em A Premier Farnell Company CRC 16 Result 0x00002799 Choose what polynomial that you want to use type HIH 9 CRC 203 CRC 16 1312 RC 32 O R Oute CRC 32 Result O0x100ECESC 6 1 28 IAP Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then 3 download it t
58. k I 4 Core CMSIS Include control s Core Device NXPALPC177x_8x Include JA A A Drivers include string Figure 44 C C Tab Specify the paths where the head files are saved in the Include Paths textbox and then click OK Page 41 t A Premier Farnell Company 9 Click the Rebuild button following window to start compiling all the files on the tool bar as shown in the M D XSBCIT88 CD ROM code LPC177x_8x_StdPeriph_ Demo Examples 16 GPIO GP10_LedBlinky Keil Gpio_LedBlinky uv EIS File Edit View Project Flash Debug Peripherals I FRRRERRRAARERERR RRA RERERERARAEREEREREREREEE ERR REREER TAA A ATA TAA A Y Y Y ER EERE Deg Copyright C 2012 2014 Embest Tech Co Ltd 1 Drivers FileName Gpio LedBlinky c SCH Main Author lichy amp Gpio_Led Version 12 0 0 3 Readme Date 2012 04 26 Description This example describes how to use GPIO interrupt to drive LEDs Function List History lt author gt lichy lt time gt 2012 04 26 lt version gt 1 0 0 desc build this moudle REREAARAAERE RAAT AERA ERA A AERA RENE AR AERA SES R AERA AER R REE A ATER AREA ARTA A RET ae Includes Build Output compiling Gpio LedBlinky c linking Program Size Code 3744 RO data 260 RW data 24 ZI data 512 FromELF creating hex file MFlashiGpio LedBlinky axf 0 Error s 0 Warning s Rebuild all target files ULINK Cortex Debugger
59. kck kck ckck kck ck ck kck ck ck ck ck ck ck kck ckck kk ck ck k ck ck ck kck ck ck k ck ck ck ck ck k ck kk kk kk k k k KKKKKKKKKKKKKKKKKKKKK Hello NXP Semiconductors GPDMA FLASH to RAM example MCU LPC177x_8x Core ARM CORTEX M3 UART Communication 115200 bps This example used to test GPDMA function by transfer data from Flash to RAM memory KEKKKKKKKKKKKKKKK KK kk kk kk kk kk kk kk ck ko kk ko ck ck ko ck ko kk ko ck Ck ko ko ko ko A kc ko ko ko ko Ckckckck kck ckckckck ck ck ckck kk ck kk Start transfer on channel 000 Buffer Check success Demo terminated Page 78 mbes A Premier Farnell Company 6 1 15 Wdt_Reset Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 the HyperTerminal window will display information as shown below KKEKKKKKKKKKKKKKKKKKKKKK ck kk ck Ckck ck ck KK kk Ck ck ck ko KK Ckck ck ck kk kk ck ck ck ko kc k Ck k kk kc kckock kckck ck ck ckckckck ck ck k kk kk This Welcome Screen below will executive after reset event Hello NXP Semiconductors Watch dog timer reset when timeout demo MCU LPC177x 8x Core ARM CORTEX M3 WAR emmmer ILLSZ00 loy Use WDT with Internal RC OSC reset mode timeout 5 seconds To reset MCU when time out After reset program will determine what cause of last reset time ext
60. l cable and slave respectively 4 Reboot both SBC1788s The HyperTerminal information as shown below will display Hello NXP Semiconductors Page 71 em A Premier Farnell Company RS485 demo in Master mode Sending to A Receive ACK Sending cB Receive No Dev Reply Sending to A Receive ACK Sending to B Receive No Dev Reply 6 1 10 Emc NandFlashDemo Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 the HyperTerminal window will display information as shown below Ck ck ck ck ck ckck kck ck kk ck kck ck ck ck kk Ckck ck kk kk ck ck ck ck ko kck Ckck ck kk ck Ck ck ck ck ck kk ck Ck ck k ck k ck kck kk Ckckckckckckckckckck kckckck ck ck ck kk Hello NXP Semiconductors NANDFLASH K9F1G08U0B testing MCU LPCl77x 8x Core Cortex M3 UART Communication 115200 bps Write and verify data with on board NAND FLASH Ck ck ckckckckck kck ck ck ck ck kck ck ck ck kk ck Ckck ck kk kk ck kk kk kk Ck ck ck kk ck Ck ck ck ck ck kk ck Ck ck k ck k ck kk kk Ckckckckckckckckckck kckckck XX ck kc kk Init NAND Flash Read NAND Flash ID ECF19500 Clavexelesuee wwellbaol iedbexelss s a Erase entire NAND Flash Write a block of 2K data to NAND Flash Read back a block of 2K data from NAND Flash
61. lick Install to continue with the installation or click Back if you want to review or change any settings Destination location C Program Files Flash Magic Start Menu folder Flash Magic Embedded Systems Academy Inc Figure 36 Start Installation 9 The window shown below indicates that installation has been completed If Launch Flash Magic is checked Flash Magic will be launched immediately after you click Finish If View the Release Notes is checked the software release notes will be opened immediately after clicking Finish B Setup Flash Magic Completing the Flash Magic Setup Wizard Setup has finished installing Flash Magic on your computer The application may be launched by selecting the installed icons Click Finish to exit Setup C Launch Flash Magic Figure 37 Installation Finished Page 37 t A Premier Farnell Company 5 Software Development Process After all the preparations are completed the development process can be started This chapter will introduce how to conduct software development under two different environments Keil MDK and IAR EWARM by using the development of NXP s LPC1788 processor as an example Note Development on LPC1788 requires version 4 20 or higher of Keil MDK or version 6 20 or higher of IAR EWARM this document uses Keil MDK 4 60 and IAR EWARM 6 40 2 5 1 Development Based on the Keil MDK The following content is composed of two parts
62. ls on the screen to implement calibration When please touch the screen appears on the screen please use a stylus to touch a random point on the screen The voltage value generated by the touching will be converted by the ADC and displayed on the screen along with the corresponding coordinates 6 1 4 USB MassStorage Program 1 Connect the SBC1788 to your PC with a USB A M to USB B M cable and a cross over serial cable 2 Open a HyperTerminal window on your PC please refer to 4 1 Configuring HyperTerminal on page 18 3 Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 The board will be recognized as a USB mass storage device by the PC and the LED6 indicator will light up You can find a file named README TXT by opening the drive LPC178x in the My Computer window on your PC as shown below fi LPC178x H File Edit View Favorites Tools Help Q Bak 5 5 D Search lie Folders EZ 53 SSE Address HA I Folders x o README B Desktop Text Document gf My Documents ZJ E my Computer Se Local Disk C Se Software D Se Document E Se Local Disk F E 25 DVD CD RW Drive G id LPC1 73x H E G Control Panel amp Shared Documents C Administrator s Documents E g My Network Places ni Recycle Bin Figure 74 LPC178x Working as a USB Mass Storage Device Page 66 em A Premier Farnell Company 6 1 5 USB V
63. ms occurring on embedded software hardware platforms if users have followed the instructions provided e Judge whether a product failure exists The situations listed below are not covered by our free technical support service and Embest will handle the situation at our discretion e Customers encounter issues related to software or hardware during their development process Page 3 2 2 em A Premier Farnell Company Issues occur when users compile run the embedded OS which has been modified by themselves Customers encounter issues related to their own applications Customers experience problems caused by unauthorised alteration of our software source code Maintenance service clause Product warranty will commence on the day of sale and last 12 months provided the product is used under normal conditions The following situations are not covered by the warranty Embest will charge service fees as appropriate Customers fail to provide valid proof of purchase or the product identification tag is damaged unreadable altered or inconsistent with the product Products are subject to damage caused by operations inconsistent with their specification Products are subject to damage in either appearance or function due to natural disasters flood fire earthquake lightning strike or typhoon or natural aging of components or other force majeure Products are subject to damage in appearance or function due to po
64. n the board the LED1 indicator will light up which indicates the network is connected properly 2 The Keil project httpraw sa is saved under X code SBC1788 Lwip v1 4 0 lwip_Ipc nxpcommon examples SBC1788 http Page 93 Em A Premier Farnell Company raw sa where X is the label of the CD ROM drive Turn on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 Select Start Run on your PC s desktop and type cmd in the pop up window and then press Enter on your keyboard Type ping 192 168 0 232 t in following command line window and press Enter again to receive replies from the board ca C windows system32 ping exe Pinging 192 168 0 232 with 32 bytes of data Reply from 192 168 8 232 hbytes 32 time lt ims TTL 255 Reply from 192 168 0 232 bytes 32 time lt ims TTL 255 Reply from 192 168 80 232 bytes 32 time lt ims TTL 255 Figure 88 Network Test 4 Open an Internet browser and type http 192 168 0 232 in the address bar to open the following page twiP A Lightweight TCP IP Stack Windows Internet Explorer 4 http 192 168 0 232 Fie Edit View Favorites Tools Help YE Be Gp A Lightweight TCP IP stack Q E SICS IwIP A Lightweight TCP IP Stack The web page you are watching was served by a simple web server ruming on top of the lightweight TCP IP stack lwIP lwIP is an open source implementation of the TCP IP protocol suite that was originall
65. nchanged in the window shown below and click Next Setup EDK ARE 4 22a File installation completed P KE i L Tools by ARM n Vision Setup has installed all files successfully Iw Retain current Vision configuration Iw Add example projects to the recently used project list Preselect Example Projects for Simulated Hardware Back Cancel Figure 18 Installing Example Projects 7 Keep the default settings unchanged in the window shown below and click Finish Page 26 em A Premier Farnell Company Setup 10 3 14 4 22a MDK ARM V4 22a Keil u Vision4 Setup completed D KE l L Tools by ARM HVision Setup has performed all requested operations successfully Iw Launch Driver Installation ULINK Pro Driver V1 0 Iw Show Release Notes Cancel Figure 19 Installing ULINK Pro Driver 8 Click Continue Anyway in the pop up window as shown below Software Installation 4 The software you are installing has not passed Windows Logo testing to verify its compatibility with Windows XP Tell me why this testing is important Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the software vendor for software that has passed Windows Logo testing Continue Anyway STOP Installation Figure 20 Click Continue Anyway
66. nction in MASTER mode Read the LCD Touch Sensor Value KK KK ok ek kk ok KK KK CK eK ok koe ok KK KK ok ok ek dk ok Kok ok III EX Ik kk kk ok D D EX XX Detect the LCD Touch Event Channel X data is 00000 Channel Y data is 00000 Channel X data is 00000 Channel Y data is 00000 5 The values of X and Y change in the HyperTerminal window when using a stylus to slide across the surface of the touch screen 6 1 24 ADC Polling Program 1 Connect the input lead of a 10K potentiometer to a 3 3V input and the output lead to the ADCO IN2 pin on the SBC1788 the 4 pin of the connector marked as UART1 3 4 amp DA amp AD 3CH in Figure 1 on page 2 and the last one to ground 2 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 3 Power on the SBC1788 and recompile the project and then download it to flash Page 87 em A Premier Farnell Company 4 Reboot the SBC1788 When the potentiometer is being turned the voltage value converted by the ADC changes accordingly and is displayed in the HyperTerminal window as shown below KKEKKKKKKKKKKKKKKKKKKK Ck ck Ck kk Sk kk ck ck Sk kk kk ck ck kk kk k ck ck kc ko kc kc kck ck kk ck kck kk ckckck ck ckck kck XX X Hello NXP Semiconductors ADC POLLING example MCU LPC177x 8x Core ARM CORTEX M3 Communicate via UARTO 115200 bps Use ADC with 12 bit resolution rate of 400KHz read in POLLING mode To get AD
67. nloading and debugging g bedded orkbe D m File Edit View Tools Window Help DS Aan Pis Je VV EP ee pm Add Group fi x Import File List Debug z Edit Configurations Files B 8 Remove I C1custs Create New Project I CIDrivers aa Existing Project Main E Output Options ALt FT E Startup Version Control System Make FT Compile CtrltFT Rebuild All Clean Batch build F8 Stop Build CtrltBreak Download and Debug Ctrl D Debug without Downloading Make amp Restart Debugger Ctrl R Restart Debugger Ctrl Shi ft R Download gt L SFR Setup Test Open Device File L Download the application and start the debugger Figure 64 Select Download and Debug Page 54 em A Premier Farnell Company 5 3 In System Programming The LPC1788 contains a bootloader in ROM that can be enabled by pulling pin P2 10 low during reset The application can then be downloaded over UART ZO serial channel In order to run ISP please follow the steps below 1 Connect a null modem female female RS232 cable between the DB9 connector COM1 USARTO and the PC serial port 2 Plug in the 12V power adapter 5 3 2 Create a HEX file with MDK ARM 1 Open an MDK project configure Target Option and select Create HEX file 2 Rebuild the Project generate the HEX file 3 The HEX file is located in the Keil Flash subfolder of the project directo
68. o flash Reboot the SBC1788 the HyperTerminal window displays information as shown below which includes chip related information such as PartID Boot code version and UID as well as the feedback of whether the flash programming was successful Ck ck ck ck kk ck kk ck Ck Ck kk kk Sk Ck Ck kk kk kk Sk kk kk kk kk kk kk Sk kk ke Sk ko Ck ko kv ko k ko k ck kocko kk Ckckckck ckck kckck ck ck ck ck ck kk ck k kk Hello NXP Semiconductors IAP Demonstration MCU LPC177x 8x Core ARM CORTEX M3 UART Communication 115200 bps KK KK ok ek ok KK KK CK eK ek ok ok KK KK CK eK IC 2 kk ok I k kK I I IO Ik kk kk ok D D EX XX PartID 0x281D3F47 Boot Code Version 008 001 DU LEE E 1307563050 181065609 41110417027 Erase chip Success Program chip Success Demo termination Page 91 em A Premier Farnell Company 6 2 Application Programs Application programs are the developed based on the basic ones in order to provide system level demonstration programs with extended features These programs include uC OS II GUI and LWIP examples The table shown below lists all the application programs and their corresponding descriptions This section will introduce the detailed operations to run the application programs Name Description SBC1788 emWin512 Demonstrating the GUI of emWin SBC1788 Lwip httpraw sa Implementing a HTTP server on SBC1788 1 4 0 KR tcpecho sa Implementing a TCP echo
69. ode and is PWR PowerDown woken up by an NMI interrupt System enters sleep mode and is woken up PWR Sleep by a WWD interrupt GPIO_Interrupt Using the interrupt function of the GPIO one Using GPIO to receive button interrupts GPIO LedBlinky drive the LED and the buzzer Generating a PWM signal under single dual Pwm DualEdge edge mode Using the PWM matching function under PWM Pwm MatchInterrupt interrupt mode Generating a PWM signal under single edge Pwm SingleEdge mode Using the MCI Multimedia Card Interface of Mci CidCard the LCP1788 MCI Mci Fatfs v008a Using a MicroSD in the file system Mci ReadWrite Writing and reading the MCI of the LPC1788 SSP Dma Testing SSP under DMA mode SEP Configuring the touch function chip of an SSP LCD Touch LCD through the SPI bus ADC ADC Burst Using AD conversion under burst mode Page 62 em A Premier Farnell Company Name of Example Programs Descriptions ADC Dma Using the AD conversion function and transferring AD conversion results under DMA mode ADC Interrupt Using AD conversion under interrupt mode ADC Polling Using AD conversion under polling mode DAC Dac Dma Using the DAC to generate an analog output under DMA mode Dac SineWave Generating a sine wave output by using the DAC BOD Using BOC Brown Out Detector function CRC Crc Demo Implementing a CRC CCITT CRC 16 and CRC 32 calibration
70. oller WIC 3 LPC1785 Up to 512 kB on chip Flash ISP and IAP capabilities Upto 96 kB on chip SRAM a pid 786 Upto 4kB on chip EEPROM External Memory Controller EMC DMA controller GFDMA P3 LFCTETU JTAG interface Serial Wire Debug and Serial Wire Trace Port options 3 LPC1820 Four reduced power modes Sleep Deep sleep Power down Deep pou 3 LPC1830 Clocks 3 LPC1850 On chip crystal oscillator operating range of 1 MHz to 25 MHz 3 LPC2101 Figure 40 CPU Selection Page 39 t A Premier Farnell Company 5 The following pop up window prompts you to determine if NXP LPC177x 8x Start Code should be copied to the project folder Yes is recommended E Copy NXP LPC177x_8x Startup Code to Project Folder and Add File to Project No Figure 41 Adding Start Code 6 Right click the project Targetl in the tree view on the left part of the following window and select Add Group to create different groups to which the corresponding code will be added for example a group named Drivers to which the EDM1070xx s driver source files will be added later W D SBC1788 CD ROM code LPC177x_8x_StdPeriph_Demo Examples Iest Iest_example MDE Jest uvp E II Bytes lt OxO OxFFFFFFFF 6 gt 0x00000200 STACK NOINIT READWURITE ALIGN 3 Stack Size Figure 42 Add New Groups Page 40 Pa t A Premier Farnell Company 7 After all the groups are cre
71. om the board c C windows system32 ping exe 0 x Pinging 192 168 080 232 with 32 bytes of data Reply from 192 168 0 232 bytes 32 time lt ims TTL 255 Reply from 192 168 0 232 bytes 32 time lt ims TTL 255 Reply from 192 168 0 232 bytes 32 time lt ims TTL 255 4 Figure 90 Network Test 5 Copy the file echotool exe from X code SBC1788 Lwip v1 4 0 Utilities PC_Software where X is the label of the CD ROM drive to the drive C root directory Select Start gt Run on your PC s desktop and type the command line as shown blow in the pop up window and press Enter on your keyboard C gt echotool exe IP address p tcp r 7 n 10 t 2 d Testing LwIP TCP echo SIE WE 6 Running information of the program is shown in the following window Page 95 C Documents and Settings Administrator gt cd ciN C Yechotool exe 192 168 0 232 p tcp 7r 7 7n 15 7t 2 d Testing LWIP TCP echo s erver Hostname 192 168 6 from from from from from from from from from from from from from from from Statistics KK 192 192 192 192 192 192 192 192 192 192 192 192 192 192 192 232 resolved as 168 6 168 168 168 168 168 168 168 168 168 168 168 168 168 168 8 Received 15 Seoeeogcegegcegcseqceo amp time time time time time time time time time time time time time time time Corrupted 8 t A Premier Farnell Company 192
72. ompile the project and then download it to flash 3 Reboot the SBC1788 The buzzer will beep 3 times and all the LEDs will blink in sequence repeatedly Press and hold the SW1 button the LEDs will blink at a higher frequency Press and hold the SW2 button the LEDs will blink at a lower frequency Page 83 em A Premier Farnell Company Note For the location of the SW1 and SW2 buttons please refer to the components marked as User1 amp 2 Key in Figure 1 on page 2 6 1 21 Pwm SingleEdge Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 the PWM1 pin will provide a 234 4KHz output signal Please view the output signal from the channels in the following table by using a oscilloscope PWM Pins eh T CON11 3 the 4th pin of the interface marked as PWM 6CH amp GPIO in anne Figure 1 on page 2 CON11 4 the 6th pin of the interface marked as PWM 6CH amp GPIO in Channel 2 Figure 1 on page 2 Ch 13 CON11 5 the 8th pin of the interface marked as PWM 6CH amp GPIO in anne Figure 1 on page 2 CON11 6 the 10th of the interface marked as PWM 6CH amp GPIO in Channel 4 Figure 1 on page 2 eh l5 CON11 7 the 12th pin of the interface marked as PWM 6CH amp GPIO anne in Figure 1 on page 2 CON11 8 the 14th pin of the interface marked as PWM 6CH
73. one number Connect using v Figure 5 Select Serial Interface COM3 Properties Port Settings Bits per second P 5200 Data bits Parity Stop bits Flow control Figure 6 Configure Serial Interface Page 19 t A Premier Farnell Company 4 The window below indicates that the HyperTerminal configuration has been set up successfully Embest HyperTerminal File Edi View Call Transfer Help De 535 mmis TUNE L Figure 7HyperTerminal Is Connected 4 2 Configuring the Network 1 Click Start Control Panel L Local Area Connection Status General Support 76 Network and Internet Connection Status Connected Network Connections PAGG DE Speed 100 0 Mbps On your PC s desktop and then double click Local Area Connection to open the window as shown right Activity Received Then click Properties to open the Local Area Connection Properties window Packets Gesi rar Figure 8 Local Area Connection Status Page 20 2 Double click Internet Protocol TCP IP as in the window shown to the right 3 Click Advanced in the window shown to the right t A Premier Farnell Company 4 Local Area Connection Properties General Advanced Connect using HB Realtek RTL8139 810x Family Fast E This connection uses the following items M El cient for Microsoft Networks v Jl
74. onfigure Can Aflut CAN and alter the receiving filter loot up table Can Selftest Self test mode of CAN DMA Flash2Ram Testing GPDMA General Purpose Direct Memory Access by data transfer from flash to RAM Wdt Interrupt Using WDT to generate interrupts after a certain period of time Using WDT to generate reset signal after a WDT Wat Reset certain period of time to reset MCU Generating interrupt or reset signal under Wdt WindowMode WDT window mode Timer Capture Using the input capture function of the timer Using the timer to measure the frequency of Timer FregMeasure an input signal Timer Using timer matching to generate a certain Timer MatchInterrupt time interval e g 1 second under interrupt mode System timer generates an interrupt every Systick 10msBase i ms SYSTICK Systick Stclk System timer uses an external clock signal NVIC Nvic Priorities Testing Tail chaining or Late arriving interrupt mode through NVIC priority Page 61 em A Premier Farnell Company Name of Example Programs Descriptions grouping Nvic VectorTableRelocation Relocating vector table PWR DeepPowerDown System enters deep power down mode and is woken up by an RTC interrupt PWR DeepSleep System enters deep sleep mode and is woken up by an external interrupt PWR System enters power down m
75. ow Ck ck ck ck kk ck kk Ck ck kk kk Sk Ck Ck Ck Ck kk kk Sk Ck ck kk kk kk kk kk Sk ko Sk ke Sk k ck ko kv A Mk ko k ck KK KK Ckckckck ckck ckckck ck kck ckck kk ck k kk Hello NXP Semiconductors UART Host Lite example MCU LPC177x 8x Core ARM CORTEX M3 UART Communication 115200 bps Page 68 t A Premier Farnell Company This example used to test USB Host function kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkk Host Initialized Connect a Mass Storage device Mass Storage device connected COBVATOMENENNE Copy completed 6 Connect the USB flash drive to your PC and check the contents of the drive to see if FILENAME R txt has been copied to the folder Folder 6 1 7 Emac EasyWeb Program 1 Connect the input lead of a 10K potentiometer to a 3 3V input and the output lead to the ADCO IN2 pin on the SBC1788 the 4 pin of the connector marked as UART1 3 4 amp DA amp AD 3CH in Figure 1 on page 2 and the last one to ground 2 Connect the SBC1788 to your PC with a cross over network cable and a cross over serial cable and then open a HyperTerminal window 3 Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 The HyperTerminal window displays the IP address 192 168 0 100 of the SBC1788 5 Click Start Run on your PC s desktop type cmd in the pop up window and then press Enter on your keyboard
76. py your license key into the License Key textbox or click Browse to specify the path where the license key is saved and then click Next IAR Embedded Workbench for ARE 6 40 2 Evaluation The license key can be either your QuickStart key or your permanent key If you enter the QuickStart key found on the CD cover you have 30 days to try the product out If you have received the permanent key via email you paste it into the License Key textbox License tf License Key Read license Key Fi rom File Figure 26 Enter License Key 7 Click Change in the following window to specify installation path and then click Next Page 31 em A Premier Farnell Company Install IAR Embedded Workbench for ARM E valuation to C Embedded Workbench 6 4 E valuation i Cancel Figure 27 Select Installation Path 8 The following window allows you select a folder in which the software icon is contained You may keep the default settings unchanged and click Next IAR Embedded Workbench for ARE 6 40 2 Evaluation Setup will add program icons to the Program Folder listed below You may type a new folder name or select one from the existing folders list Click Next to continue Program Folder IAR Embedded Workbench for ARM 6 40 E valuatiorl Existing Folders Microsoft Office Microsoft Silverlight Figure 28 Select Software Icon Location 9 Click Install in the following window to start the install
77. ries from NXP This chapter will introduce how to learn about the features of the LPC1788 through a variety of example programs which consist of basic and additional examples 6 1 Basic Example Programs for Peripherals The basic example programs are saved under X code LPC177x_8x_StdPeriph_Demo Examples of the CD ROM where X is the label of CD ROM drive as shown below Ca code E E LPCITTx 8x StdPeriph Demo e BoardSupport e Core e Drivers 4 w Examples e makesection The folders that are saved under the same directory as Examples include BoardSupport Core Drive and makesection The following numbered entries give a brief introduction of the files contained in these folders 1 BoardSupport The drivers for the on board peripherals of the SBC1788 including SDRAM NAND Flash PhyLAN and LCD interfaces 2 Core CMSIS files and the startup code from NXP for MDK and IAR environments 3 Drivers Driver codes for peripherals of the LPC177x 8x including two folders include and source 4 Examples Basic example programs for peripherals of the LPC1788 under Keil and EWARM environments 5 Makesection Configuration files for development environments Page 59 em A Premier Farnell Company The table shown below lists all the basic example programs for peripherals and their relevant descriptions This section will use a selection of the example programs to introduce the detailed operations
78. ry F Options for Target Target 1 Device Target Output Listing User C C Asm Linker Debug Utilities Select Folder for Objects Name of Executable Jade e Create Executable obj ade Iw Debug Information Create Batch File M Create HEX File v Browse Information C Create Library obj ade LIB Figure 65 Configure MDK output option Page 55 em A Premier Farnell Company 5 3 3 Create HEX file with IAR EWARM 1 Open an EWARM project configure the options and select the output format 2 Select Intel extended for output Rebuild the Project generate the HEX file 3 The HEX file is located in the EWARM Flash Exe subfolder of the project directory Options for node Adc_Dma Category General Options C C Compiler Assembler Custom Build Build Actions Linker Debugger Simulator Angel GDB Server TAR ROM monitor T jet J Link J Trace TI Stellaris Macraigor PE micro RDI JTAGjet ST LINK Third Party Driver TI D5100 Factory Settings Output Generate additional output Intel extended v Output file Override default Ad Dma hex Figure 66 Configure EWARM output option 5 3 4 Flash Magic 1 Open the Flash magic software select Options gt Advanced Options Page 56 PET A Premier Farnell Company Flash Magic NON PRODUCTION USE ONLY File ISP E 5 e dy ns Disable Hints Update L
79. s ram nt48le18n16 h 042 define CRSR PIX 32 L3 TAY 043 define CRSR PIX 64 1 pj Readme 044 define CRSR ASYNC o Figure 70 Macro Definition for 4 3 Maure ded drive ne E FLASH Q 5 5AXARETETATATARARTIRTATATATARAR AAA 4A A IA 4 43 4 4 s 4 ng Startup 028 LCD Type Config 7 CHSIS CHS 029 f5ttttte f t 44 4 3 4 A4 4 9 33 4 4 RTITAI El amp Drivers 030 EH App 031 define LCD_480272 A main e 033 3 logo h 0 a lpelT7x_8x_led h DR TERRA AR RRAAAAAEAAAAAAERARAERERAEREREREEEEREREEREREREE EER EEE S s Lpe_types h 036 macro declare luc stdint h TE a cursor h 03 si s system lpelTTx 8x h 039 define LCD PWR ENA DIS DLY 10000 bsp h 040 define LCD_ENA_DIS_DLY 10000 LA phylan_lan8T20 h 041 Ce sdram mt48lel amp m15 h 042 define CRSR PIX 32 o LH 043 define CRSR PIX 64 i e 3 Readme 044 define CRSR ASYNC o Figure 71 Macro Definition for 7 Note 1 The SBC1788 supports two LCD modules LCD6000 43T and LCD6000 70T which have a 480x272 4 3 and an 800x480 7 screen respectively LH The red line of the LCD flat cable should be on the same side as the 1 pin marked with a triangle of the CONO interface 4 The capacitors C3 C5 C6 and C7 should be removed from the board if a 4 3 touch screen LCD is used 3 Power on the SBC1788 and recompile the project and then download it to flash 4 Reboot the SBC1788 The LCD will
80. s Descriptions 3 CMD Command Signal 4 VDD VDD 5 CLK Clock 6 VSS VSS 7 DATO Card data 0 8 DAT1 Card data 1 9 CD Card detect 3 2 7 LCD Interface CON9 Pins Definitions Descriptions 1 GND GND 2 DCLK DCLK 3 HSYNC HSYNC 4 VSYNC VSYNC 5 GND GND 6 RST RST Reserved 7 R3 Red data input 8 R4 Red data input 9 R5 Red data input 10 R6 Red data input 11 R7 Red data input 12 GND GND 13 G2 Green data input Page 10 Em A Premier Farnell Company CON9 Pins Definitions Descriptions 14 G3 Green data input 15 G4 Green data input 16 G5 Green data input 17 G6 Green data input 18 G7 Green data input 19 GND GND 20 GPIO 0 GPIO Reserved 21 B3 Blue data input 22 B4 Blue data input 23 B5 Blue data input 24 B6 Blue data input 25 B7 Blue data input 26 GND GND 27 DEN Display enable 28 VDD3V3 3 3V power supply 29 VDD3V3 3 3V power supply 30 GPIO_1 I2C SCL Reserved 31 GPIO 2 I2C SDA Reserved 32 Y Terminal of touch panel 33 X Terminal of touch panel 34 Y Terminal of touch panel 35 X Terminal of touch panel 36 PWREN LCD power enable Page 11 emm t A Premier Farnell Company CON9 Pins Definitions Descriptions 37 VDD5V 5V power supply Si Se LED Dimming Control by PWM Signal 39 VDD5
81. server on SBC1788 SBC1788 uCOSII uCGUI Demonstration programs of uC OS II amp uC GUI SBC1788 uCOS II v2 86 Demonstration programs ouC OS II v2 86 1 1 1 SBC1788 emWin512 Program 1 Connect an LCD to the CONO interface marked as LCD amp Touch in Figure 1 on page 2 on the SBC1788 with a LCD flat cable 2 Expand the Main branch in the tree view on the left side of the uVision4 window and double click Icd driver h and then select a definition of initialization macro on the right side according to LCD screen size as shown below Ce led_drive ne SCH FLASH 3 Startup 028 LCD Type Config e CO CMSIS CN3 E Drivers 030 ES Main 032 define LCD 800480 E main c 033 a Logo h 0M s IpeiTTx 8x lcd h DER RATRRAYXAXRRTAATERRAEAETXRTXATRTEAATA PPAR ARATE RARE TEAR xx 1pe types h 036 macro declare GJ stdint h D TAG RR GRAGUGOEG GR RA AREA EEEAEAREREREREEREEERER EE EES 3 cursor h 03 ei s system lpelTTx Dh 039 define LCD PUR ENA DIS DLY 10000 is bsp h 040 fdefine LCD ENA DIS DLY 10000 s bien lan8T20 h 041 s sdram mt481ci6m16 h 042 define CRSR PIX 32 o I en driven 043 define CRSR PIX 64 1 Oy Readme 044 define CRSR ASYNC o Figure 86 4 3 Macro Definition Page 92 Em A Premier Farnell Company D ass FLASH E sr raneenmenenmenenenenenenenennenenaneneneaneneneenena ane 73 Startup LCD Type Config 7j CHSIS CH3 GOGARTERURTYZTTAETRE
82. t CPicturet Documents Desktop My Documents My Computer File name E Save as type Project Files ewp My Network Figure 54 Set New Project Save Path Page 48 A Premier Farnell Company 5 Right click the project name on the left side of the IAR Embedded Workbench IDE window and select Add Add Group to create different groups to which the corresponding code will be added for example a group named Drivers to which driver source files will be added later X IAR Eabedd File Edit View ed Forkbench IDE Project Simulator Tools Window Help Dn ug Workspace amp Debug alee ile Options 44 Y 3 x e Eh Di Make Compile Rebuild All Clean Stop Build Remove Rename Version Control System Open Containing Folder File Properties Figure 55 Create New Groups 6 After all the necessary groups are added right click each group and select Add gt Add Files to add relevant source code IAR Embedded Workbench IDE File Edit View Project Simulator Tools Window Help IWF RUE RP OPH WH S a Files C3 Output E Test Debug Compile Rebuild All Version Control System gt ad gt Add Files Add Group Add one or more files to the project Figure 56 Add Source Code to Groups Page 49 em A Premi
83. t Simulator Tools Window Help A Premier Farnell Company the left side of the IAR DH LYE Owe Ba MES ca x Debug i Files Bag E CMSI Drive C3 Main E Outp E Staru 2 amp Options Compile Rebuild All Clean Stop Build Add Remove Rename Version Control System gt Open Containing Folder File Properties t as ctive D My Documents Test ewp f Tx Figure 60 Recompile the Project 13 Now the creation and compilation of a new project has been completed successfully Page 52 em A Premier Farnell Company 5 2 2 Programming and Debugging 1 You can now proceed with flash programming and debugging by following the steps listed below 2 Right click the Options for node Test project name H E on the left side 2 of th e IA R C C Compiler Assembler H Embedded Output Converter Target Qutput Library Configuration Library Options M Custom Build Workbench udis Processor variant inker IDE window Debugger Core m Simulator Device NAP LPC1788 Angel J gn d sel ect GDB Server O pt i ons to MS T J Link J Trace I o pe n t h e TI Stellaris following s window Third Party Driver TI xDS100 Figure 61 Project Options Window 3 Click Options for node Test Debugger on the left side of 7 General Options
84. t expires the ADC interrupt will take back control and LED2 will resume blinking Page 82 t A Premier Farnell Company 6 1 19 PWR DeepSleep Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 Type 1 in the HyperTerminal window to instruct the system enter deep sleep mode and then press the ISP button marked as ISP Key in in Figure 1 on page 2 to wake up the system as shown below ck ck ck ck ck ck ck kk ck ck ck ck ck Ck kk kk ck KKK kk ck ck kk ck ck ck ok kk ck ck kk ck ck ck ok kk ck kk ko ck Sk Sk ko ko ko ko ko ko kkkkkkkkkkkkkkkkkkkkk Hello NXP Semiconductors Power Deep Sleep exampl MCU LPC177x 8x Core ARM CORTEX M3 UART Communication115200 bps This example used to enter system in deep sleep mode and wake up it by using external interrupt Ck ck ck ck kk kk Ck Ck ck kk Sk kk Sk Ck ck kk kk kk Sk kk kk kk kk kk kk Sk ko Sk Sk Sk k ck ko kv A ko ko ko KKK KK Ckckckck ckck kckck ck kck ckck ck ck ck k kk Press 1 to enter system in deep sleep mode If you want to wake up the system press ISP button Im make wel gt 6 1 20 GPIO_LedBlinky Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and rec
85. to open a command line window Type ping 192 168 0 100 t in the window and press Enter again to receive the information as shown below c C windows systenm32 ping exe Pinging 192 168 6 166 with 32 bytes of data Reply from 192 168 0 1080 bytes 32 time lt ims TTL 64 Reply from 192 168 80 100 bytes 32 time lt ims TTL 64 Reply from 192 168 80 108 bytes 32 time lt ims TTL 64 Reply from 192 168 6 166 bytes 32 time lt ims TTL 64 Figure 77 Network Testing Page 69 t A Premier Farnell Company 6 Type http 192 168 0 100 in the address bar of your Internet browser and press Enter on your keyboard to open the page as shown below Sg er x uve search DD Mec tee Dier Figure 78 Potentiometer Level Display When the potentiometer is being turned the voltage value converted by the ADC will change accordingly 6 1 8 UART_Autobaud Program 1 Connect the SBC1788 to your PC with a cross over serial cable and open a HyperTerminal window 2 Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 and type a in HyperTerminal window as shown below to enter auto baud mode AutoBaudrate Status Synchronous KKEKKKKKKKKKKKKK KK KKK KKK KK KK KK KK KK KK KK ck kk ko kk Ck ck ck ko kc k Ck ck ck ck kc kckck kk Ckckckckckckckck ck ck ck ck ck ck ck k ck kk Hello NXP Semiconductors UART Auto Baudrate example IMCS Je T pes es
86. wer failure external forces water animals or foreign materials Products malfunction due to disassembly or alteration of components by customers or repair by persons or organizations unauthorized by Embest Technology or alteration from factory specifications or configured or expanded with components that are not provided or recognized by Embest Technology Product failures due to the software or systems installed by customers inappropriate software settings or computer viruses Page 4 t A Premier Farnell Company e Products purchased from unauthorized merchants e Embest Technology takes no responsibility for fulfilling any warranty verbal or written that is not made by Embest Technology and not included in the scope of our warranty 3 Within the period of warranty the cost for sending products to Embest should be paid by the customer The cost for returning the product to the customer will be paid by Embest Any returns in either direction occurring after the warranty period has expired should be paid for by the customer 4 Please contact technical support with any repair requests Note Embest Technology will not take any responsibility for products returned without the prior permission of the company 2 3 Basic guidelines for protection and maintenance of LCDs 1 Do not use finger nails or other hard sharp objects to touch the surface of the LCD 2 Embest recommends purchasing specialist wipes to cl
87. xt 14 hello txt Test completed E Page 85 t A Premier Farnell Company 6 1 23 SSP LCD Touch Program 1 Connect an LCD to the CONO interface marked as LCD amp Touch in Figure 1 on page 2 on the SBC1788 using an LCD flat cable 2 Expand the Main branch in the tree view on the left side of the uVision4 window and double click Icd driver h and then select a definition of initialization macro on the right side according to LCD screen size as shown below mem c BEER SCH FLASH 027 Startup 028 LCD Type Config Og CMSIS CM3 ir TENA ARRAA ARRAN AREER A AREA AAA RERA ARENA RE REAA AREER ARR ERE RAREST 3 Drivers 030 Fad Main 032 define LCD 800480 E main c 033 E Logo h 034 lpelTTx 8x Led bh x anenee RRE A AAA A AERA AAA A AAA EE EE ARERR ERG GUI AG Im lpe types h 035 macro declare stdint h 037 enee EE EE EERE EE EE EE EE EE EE La cursor h 039 si s system lpeiTTx 8x h 039 aefine LCD PUR ENA DIS DLY 10000 s bsp h 040 define LCD ENA DIS DLY 10000 i phylan lan8T20 h 041 ub x sdram mt4Blci amp ni8 h 042 define CRSR PIX 32 ID drive h 043 define CRSR PIX 64 1 7 Readme 044 define CRSR ASYNC o SES EE EES EE AREA AAA AARAR ERA A RA AAR AREA REAR AREA ARETE Figure 83 4 3 Macro Definition fa FLASH IER cg Startup 028 LCD Type Config a CO CMSIS CMS 2Q enee EE EE EE EE EE E n E Drivers 0
88. y written by Adam Dunkels of the Swedish Institute of Computer Science but now is being actively developed by a team of developers distributed world wide Since it s release lwIP has spurred a lot of interest and has been ported to several platforms and operating systems lwIP can be used either with or without an underlying The focus of the lwIP TCP IP implementation is to reduce the RAM usage while still having a full scale TCP This makes lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM More information about lwIP can be found at the lwIP homepage at http www sics se adam lwip Lg Internet Figure 89 1wIP Landing Page 6 2 3 tcpecho_sa Program 1 Connect the SBC1788 to a PC with a cross over network cable and power on the board the LED1 indicator will light up which indicates the network is connected properly Page 94 t A Premier Farnell Company 2 The Keil project tcpecho sa is saved under X code SBC1788 Lwip v1 4 0 lwip_Ipc nxpcommon examples SBC1788 tcp echo_sa where X is the label of the CD ROM drive Power on the SBC1788 and recompile the project and then download it to flash 3 Reboot the SBC1788 Select Start gt Run on your PC s desktop and type cmd in the pop up window and then press Enter on your keyboard Type ping 192 168 0 232 t in following command line window and press Enter again to receive replies fr
Download Pdf Manuals
Related Search
Related Contents
YAGー Manual de Usuario Evaluador technical & service manual dc inverter split system air Installation/Care/Use Manual Manual de Instalación/Cuidado Samsung Galaxy Europa User Manual IP60032N - 東芝ライテック Operating Instructions Busch-Dimmer® Universal - Busch (Microsoft PowerPoint - FT-Jex Professionnel Nature lessive Copyright © All rights reserved.
Failed to retrieve file