• No results found

Open1788 User Manual. Features

N/A
N/A
Protected

Academic year: 2021

Share "Open1788 User Manual. Features"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

Open1788 User Manual

Features

The Open1788 is an LPC development board designed for the LPC1788FBD208 microcontroller, consists of the mother board and the MCU core board Core1788.

The Open1788 supports further expansion with various optional accessory boards for specific application. The modular and open design makes it the ideal for starting application development with NXP LPC series microcontrollers.

(2)

目 录

Features ... 1

目录 ... 2

1. What's on board ... 4

2. Basic operation ... 7

2.1. Download programs ... 7

2.2. Serial communication ... 10

3. Demo parse ... 12

3.1. AD demo ... 12

3.2. CAN ... 12

3.3. CRC ... 14

3.4. DA ... 16

3.5. DS18B20 ... 17

3.6. EMAC_EasyWeb ... 18

3.7. EMC_NandFlash ... 20

3.8. EMC_SDRAM... 20

3.9. I2Cx ... 21

3.10. JOYSTICK_KEY_LED ... 22

3.11. LCD ... 23

3.12. LCD TouchPanel ... 23

3.13. Mci_FATFS ... 24

3.14. MDK-emWIN512 ... 25

(3)

3.15. RTC ... 26

3.16. SSPx ... 26

3.17. UART ... 27

3.18. uCOS-ii ... 28

3.19. UDA1380 Board ... 28

3.20. Usb_MassStorage ... 29

3.21. USBHostLit ... 29

3.22. VS1003B MP3 Board ... 30

4. Revision history ... 31

(4)

1. What's on board

1. LPC1788FBD208 (core board): the high performance LPC MCU which features:

o Core: Cortex-M3 32-bit RISC o Operating Frequency: 120MHz Max o Operating Voltage: 2.4-3.6V (3.3V typical) o Package: LQFP208

o I/Os: 165

o Memories: 512KB Flash, 96KB SRAM, 4K EEPROM o MCU communication Interfaces:

1 x LCD, 1 x 10/100 ETH MAC, 1 x GP DMA Controller

USB Device/Host (Onchip PHY and DMA Controller)

5 x UART, 3 x SSP, 3 x I2C, 1 x I2S, 2 x CAN,1 x SDIO

8 x 12Bit ADC, 1 x 10Bit ADC, 1 x DAC, 1 x MOTOR PWM

6 x GP PWM, 1 x Quadrature Encoder Interface, 1 x EMC

o AD & DA converters: 3 x AD (12-bit, 1μs, shares 24 channels); 2 x DA (12-bit)

(5)

o Debugging/Programming: supports JTAG/SWD (serial wire debug) interfaces, supports ISP via UART

2. H57V1262GTR-75C (core board): 2PCS x 128M Bit SDRAM 3. K9F1G08U0B (core board): 1G Bit NandFlash

4. SST39VF3201 (core board): 32M Bit NorFlash

5. LM3526-L (mother board bottom side): onboard USB power switch and over-current protection 6. AMS1117-3.3, 3.3V voltage regulator

7. Power supply switch 8. Power indicator

9. LEDs: convenient for indicating I/O status and/or program running state 10. USB communication LED1: USB GOOD LINK1

11. USB communication LED2: USB GOOD LINK2 12. Reset button

13. User key: convenient for I/O input and/or interact with running code 14. Joystick: five positions

15. 12M crystal oscillator (core board): used to boost operating frequency by frequency multiplication 16. 32.768K crystal (core board), for internal RTC with calibration

17. USB type A interface: for connecting USB devices such as USB flash drive

18. CAN2 interface: communicates with accessory boards which feature the CAN device conveniently 19. CAN1 interface: communicates with accessory boards which feature the CAN device conveniently 20. AD+DA interface: for AD/DA testing

21. USB OTG transceiver interface: for connecting USB OTG transceiver module

22. SPI0 | SPI1 interface:easily connects to SPI peripherals such as DataFlash (AT45DBxx), SD card, MP3 module, etc.

23. I2C1 | I2C2 interface: easily connects to I2C peripherals such as I/O expander (PCF8574), EEPROM (AT24Cxx), etc.

24. I2S | I2C0 interface: for connecting I2S and/or I2C modules such as UDA1380 module, FRAM FM24CLxx, etc.

25. Modem | UART1 interface: for connecting Modem and/or UART modules such as RS232, RS485, USB TO UART, etc.

26. SDIO interface: for connecting Micro SD module, features much faster access speed rather than SPI 27. Ethernet interface: easily connects the MCU to ethernet network by using an additional ethernet

module, such as DP83848 Ethernet Board

(6)

33. 5V/3.3 V power input/output: usually used as power output, also common-grounding with other user board

34. MCU pins connector: all the idle pins are accessible on expansion connectors for further expansion 35. JTAG/SWD interface: for debugging/programming

36. LEDs jumper 37. User key jumper 38. Joystick jumper 39. SD card detect jumper

o short the jumper to enable SD card detection function o open the jumper to disconnect from I/O port

40. USB enable jumper

o short the jumper to enable USB

o open the jumper to disconnect from I/O port 41. USB HOST jumper

o short the jumper when using USB HOST o open the jumper to disconnect from I/O port 42. VBAT selection jumper

o short the jumper to use the onboard battery

o open the jumper to connect the VBAT to other external power 43. VREFP selection jumper

o short the jumper to connect VREFP to VCC

o open the jumper to connect VREFP to other custom pin via jumper wire

(7)

2. Basic operation

2.1. Download programs

You should download program to the board to run it. The demo programs of the present development board can be found from Waveshare web site or Waveshare Wiki site. Flexible

programming methods are supported by the onboard LPC chip. That is, it can be programmed by ISP, JTAG and SWD. You can choose different programming methods, however, using a different method means a different programmer may be required. Some of which are not contained in this product. For example, if the chip is programmed by JTAG or SWD, a ULINK or other JTAG or SWD supported programmer is required, but it is not contained in this product. If the chip is programmed by ISP, the LPC ISP (mini) board in the package is enough.

ISP programming method is mainly introduced in the present document. If you choose other programming method, please see the related manual. Here the software Flash Magic is used to program hex files.

1) Set jumper ISP JMP to on. (Some development boards have none of ISP JMP, so it is no need to set on ISP JMP of these boards.)

2) Connect the USART interface of the board to the USB port of a PC with LPC ISP (mini) board.

3) Install software Flash Magic.

4) Power up and run Flash Magic.

5) Set the software:

- Click Select and select LPC1788.

- COM Port: choose the COM Port according to which port has connected to the USART.

- Baud Rate: choose appropriate baud rate as 230400. (Download speed and stability depend on baud rate)

- Oscillator (MHZ): input 12, according to the onboard crystal.

- Check "Erase blocks used by Hex File" and "Verify after programming";

(8)

- Open Advanced Options -> Hardware Config -> check "Use DTR and RTS to control RST and ISP pin" -> input T1: 50 ms T2: 150 ms. (A shorter time input makes downloading faster. However, it can also cause instability.) As shown in the following figure.

(9)

- Click Browse and select the Hex file for programming.

- Click Start to start programming. (If any error occurs, please reconnect the board, reset it, and restart the software.)

(10)

- Check the programming progress bar, at the bottom of the window, to confirm if finished.

2.2. Serial communication

Each step, concerning to serial operation, requires serial monitor software (PuTTY, secureCRT, etc.), the software should be set to:

 Choose corresponding COM port.

 Baud rate: 115200

 Data bits: 8

 Stop bits: 1

 Parity: None

 Flow control: None

(11)

Each demo for the product, as long as any UART communication used, is set to ISP+UART0 interface by default. In other words, a TTL to serial module (here a LPC ISP (mini) module can also be used as TTL to serial module) should be connected to the ISP+UART0 interface for using these demos. As shown in the following figure:

(12)

3. Demo parse

3.1. AD demo Example overview

This is a demo of Analog to digital conversion.

Hardware connection

1) Connect a TTL to serial module to the ISP+UART interface.

2) Connect an Analog Test Board to the ADC+DAC interface.

Expected result

Turn the left knob and the serial will print the AD value accordingly. For example:

ADC value on channel 002 is: 0000000000 ADC value on channel 002 is: 0000000088 ADC value on channel 002 is: 0000000386 ADC value on channel 002 is: 0000000741 ADC value on channel 002 is: 0000000834 ADC value on channel 002 is: 0000001132

3.2. CAN Example overview

This example demonstrates the communication between 2 CAN modules.

Hardware connection

1) Connect a TTL to serial module to the ISP+UART interface.

2) Connect 2 CAN modules to the onboard CAN interfaces.

3) Connect jumper wires between CAN1H and CAN2H, CAN1L and CAN2L.

(13)

Expected result

 Can_Bypass

Bypass Mode demo. Download the program and press the RESET button, the serial terminal will print information as:

*********************************************************************

**********

Hello NXP Semiconductors CAN BYPASS example

- MCU: LPC17xx

- Core: ARM CORTEX-M3

- UART Communication: 115200 bps

Use two CAN peripherals: CAN1 and CAN2 to communicate This example used to test Bypass mode

*********************************************************************

**********

CAN test Bypass Mode function...Press '1' to initialize CAN message...

Following the prompts, send 1 to initialize CAN message, and then the serial terminal will print:

Message ID and data will be increased continuously... Press '2' to start CAN operation...

(14)

Message ID: 0x00001235 Message length: 0x00000008 BYTES Message type:

DATA FRAME Message format: EXTENDED ID FRAME FORMAT Message dataA:

0x00000001 Message dataB: 0x00000001

Message ID: 0x00001236 Message length: 0x00000008 BYTES Message type:

DATA FRAME Message format: EXTENDED ID FRAME FORMAT Message dataA:

0x00000002 Message dataB: 0x00000002

 Can_Selftest

CAN self test mode. The serial terminal will print:

*********************************************************************

**********

Hello NXP Semiconductors CAN Self-test example

- MCU: LPC17xx

- Core: ARM CORTEX-M3

- UART Communication: 115200 bps Use only CAN1 peripherals to test

This example used to test Self test mode

*********************************************************************

**********

Transmitted buffer: Message ID: 0x00001234 Message length: 0x00000008 BYTES Message type: DATA FRAME Message format: EXTENDED ID FRAME FORMAT Message dataA: 0x12121212 Message dataB: 0x34343434

3.3. CRC Example overview

Test CRC engine by three types of polynomial.

Hardware connection

Connect a TTL to serial module to the ISP+UART interface 。 Expected result

 Crc_Demo

Choose what polynomial that you want to use, type: - '1': CRC-CCITT - '2': CRC-16 - '3': CRC-32 - 'Q': Quit. The serial terminal will print:

(15)

*********************************************************************

**********

Hello NXP Semiconductors CRC Demo example:

- MCU: LPC177x_8x - Core: ARM CORTEX-M3

- UART Communication: 115200 bps

Use CRC engine on LPC177x_8x to calculate CRC for a 8-bit block data You can choose one of three polynomial type:

- CRC-CCITT - CRC-16 - CRC-32

*********************************************************************

***********

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: - '1': CRC-CCITT

- '2': CRC-16 - '3': CRC-32 - 'Q': Quit

 Crc_Dma

Use CRC engine on LPC177x_8x to calculate CRC for a block 32-bit data. Use CRC-32 polynomial and

(16)

Use CRC engine on LPC177x_8x to calculate CRC for a block 32-bit data This example use CRC-32 polynomial and use DMA for transfering data

*********************************************************************

***********

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 Initialize DMA controller...

CRC-32 Result: 0x2144DF1C Demo terminated!!

3.4. DA Example overview

The chip will control the DAC output voltage to let the Analog Test Board sound.

Hardware connection

1) Connect an Analog Test Board to the 8I/Os+ADC+DAC interface.

(17)

2) Supply 5V to the module board by wires, as shown in:

Expected result

Analog Test Board will sound.

3.5. DS18B20 Example overview

Measure the temperature, which can be checked via COM port, on the DS18B20.

Hardware connection

1) Connect a TTL to serial module to the ISP+UART0 interface.

2) Connect a DS18B20 to the ONE WIRE socket.

Warning: the arc side of DS18B20 must be connected to the ONE WIRE socket according to the label.

Don’t connect it reversely. Otherwise it may be burned.

(18)

Expected result

The serial terminal will print a series of temperature.

**************************************************

DS18B20’s ID :0x28 0x4d 0xb8 0xff 0x3 0x2 0x0 0x10

Temperature: 29.56℃

Temperature: 29.37℃

Temperature: 29.31℃

3.6. EMAC_EasyWeb Example overview

Use the development board as a web server.

Hardware connection

1) Connect an Analog Test Board to the 8I/Os+ADC+DAC interface.

2) Connect a DP83848 to the ETH interface 。 3) Connect the DP83848 to a PC via Ethernet cable.

(19)

Software settings

Set the PC and the module board into a same network segment:

Control Panel -> Network and Internet Connections -> Network Connections -> right click your Local Area Connection -> Properties -> double click the Internet Protocol Version 4 (TCP/IPv4)

Set the IP address to 192.168.0.xxx, xxx cannot be 100. Set the Subnet mask to 255.255.255.0 and Default gateway to 192.168.0.1.

Expected result

Run a browser, go to 192.168.0.100, it will be a Hello World page. Turn the knob on the Analog Test Board, and the voltage will be shown in the browser accordingly. As shown in the following figure:

(20)

3.7. EMC_NandFlash Example overview

This is an example for testing onboard NandFlash. See the number 3 in the chapter 1, WHAT'S ON BOARD.

Hardware connection

Connect a TTL to serial module to the ISP+UART interface.

Expected result

The serial will print the information of NandFlash.

NANDFLASH experiment Init NAND Flash...

RESET NAND Flash...

NAND Flash ID: 0XECF19500!

Checking valid block...

Valid block checking OK Erase entire NAND Flash…

Write a block of 2K data to NAND Flash...

Read back a block of 2K data from NAND Flash...

Verify data...

Verifying complete! Testing terminated!

3.8. EMC_SDRAM

(21)

Example overview

This is an example for testing onboard SDRAM. See the number 2 in the chapter 1, WHAT'S ON BOARD.

Hardware connection

Connect a TTL to serial module to the ISP+UART interface.

Expected result

The serial will print the information of SDRAM.

*********************************************************************

***********

Hello NXP Semiconductors

Test SDRAM MT48LC8M32LFB5 with LPC1788 EMC - MCU: LPC177x_8x

- Core: Cortex-M3

- UART Comunication: 115200 kbps Write and verify data with on-board SDRAM

*********************************************************************

***********

Init SDRAM...Clear content of SDRAM...Writing in 8 bits

format...Verifying data...Continue writing in 16 bits format...Clear content of SDRAM...Writing in 16 bits format...Verifying complete, testing terminated!

3.9. I2Cx Example overview

Read and write E2PROM data via I2C protocol.

(22)

Software settings

The product provides 3 I2C interfaces for choice. You can edit the program to choose different I2C interfaces for communication. Do as the following steps:

Edit .\Open1788-Demo\I2Cx\User\24C0X.c Located to:

#define Open_I2C0 //#define Open_I2C1 //#define Open_I2C2

Delete the “//” (Double slash) according to which I2C interface to be chosen. Meanwhile, the other 2 lines should retain their “//”.

Expected result

The serial terminal will print:

AT24C02 test procedures!!

Wirte data:

0x0 0x11 0x22 0x33 0x44 0x55 0x66 0x77 Data write OK

read data OK Read data:

0x0 0x11 0x22 0x33 0x44 0x55 0x66 0x77 E2PROM TEST OK

3.10. JOYSTICK_KEY_LED Example overview

Control LED via key button and joystick.

(23)

Hardware connection

Put jumpers on LED JMP, JOYSTICK JMP and KEY JMP.

Expected result

When a key or joystick is pressed, the LEDs status will be changed accordingly.

3.11. LCD Example overview

LCD display function demo.

Hardware connection

Connect a 4.3inch 480x272 Touch LCD (B) to the LCD interface.

Expected result

The LCD will display information accordingly.

(24)

Connect 4.3inch 480x272 Touch LCD (B)到 LCD interface 。 Expected result

First, the LCD touch panel should be calibrated, tap the [+] on the screen to finish it. Then it will enter the painter window, in which you can paint anything as you want.

3.13. Mci_FATFS Example overview

Read and write a SD card via the SDIO interface.

Hardware connection

1) Connect a TTL to serial module to the ISP+UART interface.

2) Connect a Micro SD Storage Board to the SDIO interface.

3) Plug a micro SD into the Micro SD Storage Board.

Expected result

The files in the SD card will be listed. And some new files will be written in.

*********************************************************************

***********

Hello NXP Semiconductors MCI File System Example

- MCU: LPC177x_8x - Core: ARM CORTEX-M3

- UART Communicationi: 115200 bps

This example is used to demonstrate how to implement a filesystem using MCI.

(25)

FatFs,a generic FAT file system module for small embedded systems, is used in

this example.

Press r to display commands which are supported.

*********************************************************************

***********

disk 0 Initialization OK!

Mount disk:0

document name:FILE1.TXT document name:FILE2.TXT document name:FILE3.TXT document name:FILE4.TXT

>:new 'new.txt' file ! (0) Succeeded

>:New 'Text' Document, And to write data file!

(0) Succeeded (0) Succeeded

>:new 'newaa2' Document ! (0) Succeeded

>:new 'newaa2/new' Document!

(0) Succeeded

>:Delete 'newaa/eyt' Document!

(5) Could not find the path

3.14. MDK-emWIN512 Example overview

This example is used to demonstrate Emwin.

Hardware connection

(26)

3.15. RTC Example overview

This is an example for testing RTC clock function of the chip.

Hardware connection

Connect a TTL to serial module to the ISP+UART0 interface.

Expected result

The serial terminal will print:

*********************************************************************

***********

Hello NXP Semiconductors RTC Calibration demo

- MCU: LPC177x_8x - Core: ARM CORTEX-M3

- UART Communication: 115200 bps

This example describes how to calibrate RTC

*********************************************************************

***********

Second: 000 Second: 001 Second: 002 Second: 003 Second: 004 Second: 005

3.16. SSPx

(27)

Example overview

Drive an AT45DBXX DataFlash Board via SPI interface.

Hardware connection

1) Connect a TTL to serial module to the ISP+UART interface.

2) Connect an AT45DBXX DataFlash Board to the SSP interface.

3) If SPI0 is enabled, then the module should be connected to the SSP0 interface.

4) If SPI1 is enabled, then the module should be connected to the SSP1 interface.

Software settings

The product provides 2 SPI interfaces. You can edit the program to choose different SPI for communication. Do as the following steps:

Edit .\Open1788-Demo\SSPx\AT45DBXX\User\AT45DB.h Located to:

//#define Open_SSP0

#define Open_SSP1

Delete the “//” (Double slash) according to which SPI interface to be chosen. Meanwhile, the other line should retain its “//”.

Expected result

Random data will be written to AT45DB and read from it again. The serial terminal will print:

AT45DBX ID: 0x1f 0x24 0x0 0x0 write random data to flash:

176 203 73 104 7 69 200 127...

Read data from flash:

176 203 73 104 7 69 200 127...

(28)

Connect a TTL to serial module to the ISP+UART interface.

Software settings

You can edit the program to choose different UART for communication. Do as the following steps:

Edit .\Open1788-Demo \UART\UART_Autobaud\User\main.c Located to:

#define UART_TEST_NUM 1

Modify the number to choose UART 0/1/2 interface.

Expected result

 UART_Autobaud

UART Auto-baurate demo. Sending any characters will cause the same characters received.

 UART_printf

Use the function printf to print information via COM port. The serial will print:

Welcome to use Open1788 development board

3.18. uCOS-ii Example overview

Execute 2 simple tasks in the operating system uCOS-ii to reverse the LEDs’ status.

Hardware connection

Set the jumper LED JMP to ON.

Expected result

LEDs blink.

3.19. UDA1380 Board Example overview

This example demonstrates how to drive UDA1380 Board via Philips I2S protocol for music playing.

Hardware connection

(29)

1) Connect a UDA1380 Board to the I2S interface.

2) Connect a headphone cable into the LINEOUT port of UDA1380 Board.

Expected result

The headphone will play music after RESET key pressed.

3.20. Usb_MassStorage Example overview

The development board will be recognized as a Removable Disk on the PC.

Hardware connection

1) Set the jumper USB EN to ON.

2) Connect a USB(mini) cable between the Open1788 and a PC.

Expected result

A Removable Disk is recognized.

3.21. USBHostLit Example overview

This example is used to read and write USB flash drive.

(30)

Press the RESET key, and then the content of MSREAD.TXT will be copied to a new file MSWRITE.TXT.

The serial terminal will print:

Initializing Host StackHost InitializedConnect a Mass Storage deviceMass Storage device connectedCopying from MSREAD.TXT to MSWRITE.TXT...Copy completed.

3.22. VS1003B MP3 Board Example overview

These examples implement the music play and audio record function of a VS1003 MP3 Board.

Hardware connection

1) Connect a VS1003 MP3 Board to the SSP interface.

2) Connect an audio cable into the Line In port.

3) Connect a headphone cable into the Lin Out port.

Expected result

 VS1003 (line in)

Input audio signal through the Line In port. And such corresponding sound can be heard from the headphone which is connected to Lin Out port.

 VS1003 (line out)

Sound can be heard from the headphone which is connected to Lin Out port.

 VS1003 (record)

The captured sound from the MIC can be heard from the headphone which is connected to Lin Out port.

(31)

4. Revision history

Version Changes Date Editor

1.0 Initial release. May 23rd 2014 Waveshare

2.1 English manual release. June 9th 2015 Felix

References

Related documents

Bell-LaPadula: model based on the simple security rule which a subject cannot read data at a higher security level (no-read up) and security rule which a subject cannot

implementation of our strategy and our ability to realize the benefits of this strategy, our ability to develop and market new products, changes in legislation, legal claims,

Note that in addition to the standard side navigation menu, this web page provides a top navigation menu to allow configuration of advanced modem features such as traffic

Configure BGP on the border routers in the private ASes so that the prefix and one sub prefix is announced to the direct peer on one link, and just the aggregate is

Application software on the PC could use Bit Bang Mode to download configuration data to the FPGA which would define it’s hardware function, then after the FPGA device is

The TTL-232R cables are a family of USB to TTL serial UART converter cables incorporating FTDI’s FT232RQ USB to Serial UART interface IC device which handles all the USB signalling

Synchronous/Asynchronous serial interface cable uses DB28 connector to connect to routers, which is mainly used to connect to enhanced interface module such as

The 2-port asynchronous/synchronous (A/S) WIC (WIC-2A/S), shown in Figure 3-3 , provides an EIA/TIA-232, EIA/TIA-449, V.35, X.21, DTE/DCE, EIA-530, or EIA-530A serial interface to