These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers abstract.h Source File

abstract.h

00001  ******************** (C) COPYRIGHT 2010 NXPSemiconductors *******************
00002  * @file    UART\RS485_slave\abstract.txt 
00003  * @author  NXP MCU SW Application Team
00004  * @version 2.0
00005  * @date    
00006  * @brief   Description of the RS485_Slave example.
00007  ******************************************************************************
00008  * Software that is described herein is for illustrative purposes only
00009  * which provides customers with programming information regarding the
00010  * products. This software is supplied "AS IS" without any warranties.
00011  * NXP Semiconductors assumes no responsibility or liability for the
00012  * use of the software, conveys no license or title under any patent,
00013  * copyright, or mask work right to the product. NXP Semiconductors
00014  * reserves the right to make changes in the software without
00015  * notification. NXP Semiconductors also make no representation or
00016  * warranty that such application will be suitable for the specified
00017  * use without further testing or modification.
00018  ******************************************************************************
00019   
00020 @Example description:
00021     Purpose:
00022         This example describes how to use RS485 functionality on UART1 of LPC1768
00023         in slave mode.
00024     Process:    
00025         RS485 function on UART1 acts as slave mode on RS485 bus.
00026         RS485 Slave device in this example can operate in separate mode
00027         as following:
00028             - Slave device always receives all frames on RS485 bus, regardless
00029               data frame (9 bit mode with parity stick '0') or slave address
00030               frame (9 bit mode with parity stick '1').
00031             - Slave device does not always receive all frames on RS485 bus. In this
00032               case, only slave address frame can trigger an interrupt event,
00033               then slave device can accept the following data frame by determine that
00034               slave address frame is its own address or not(implemented by software).
00035             - Slave device is in auto slave address detection mode. In this mode,
00036               only slave address frame with slave address value that matched with
00037               pre-configured slave address will be accepted automatically (by hardware)
00038               and trigger an interrupt callback event to handle following data frames.
00039                 
00040 @Directory contents:
00041     \EWARM: includes EWARM (IAR) project and configuration files
00042     \Keil:  includes RVMDK (Keil)project and configuration files 
00043 
00044     lpc17xx_libcfg.h: Library configuration file - include needed driver library for this example 
00045     makefile: Example's makefile (to build with GNU toolchain)
00046     rs485_slave.c: Main program
00047 
00048 @How to run:
00049     Hardware configuration:     
00050         This example was tested on:
00051             Keil MCB1700 with LPC1768 vers.1
00052                 These jumpers must be configured as following:
00053                 - VDDIO: ON
00054                 - VDDREGS: ON 
00055                 - VBUS: ON
00056                 - Remain jumpers: OFF
00057             IAR LPC1768 KickStart vers.A
00058                 These jumpers must be configured as following:
00059                 - PWR_SEL: depend on power source
00060                 - DBG_EN : ON
00061                 - Remain jumpers: OFF
00062                 
00063         RS485 Connection:
00064         Pls see the 'Transceiver_Master.png' in this directory for wiring information.              
00065     
00066     Running mode:
00067         This example can run on RAM/ROM mode.
00068                     
00069         Note: If want to burn hex file to board by using Flash Magic, these jumpers need
00070         to be connected:
00071             - MCB1700 with LPC1768 ver.1:
00072                 + RST: ON
00073                 + ISP: ON
00074             - IAR LPC1768 KickStart vers.A:
00075                 + RST_E: ON
00076                 + ISP_E: ON
00077         
00078         (Please reference "LPC1000 Software Development Toolchain" - chapter 4 "Creating and working with
00079         LPC1000CMSIS project" for more information)
00080     
00081     Step to run:
00082         - Step 1: Build example.
00083         - Step 2: Burn hex file into board (if run on ROM mode)
00084         - Step 3: Connect UART0 on this board to COM port on your computer
00085         - Step 4: Connect RS485 between master board and slave board (using ADM485)
00086         - Step 5: Run example and using Serial display to monitor the communication between master and slave.
00087         Note: The RS485 slave device must initialize first.
00088         
00089         (Pls see "LPC17xx Example Description" document - chapter "Examples > UART > RS485_Slave"
00090         for more details)
00091         
00092 @Tip:
00093     - Open \EWARM\*.eww project file to run example on IAR
00094     - Open \RVMDK\*.uvproj project file to run example on Keil