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    PWM\Single_Edge\abstract.txt 
00003  * @author  NXP MCU SW Application Team
00004  * @version 2.0
00005  * @date    
00006  * @brief   Description of the MCPWM Single Edge 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 PWM signal on 6 Channels in single edge mode
00023     Process:
00024         This program illustrates the PWM signal on 6 Channels in single edge mode
00025          Peripheral clock for PWM: PWM_PCLK = CCLK / 4 = 72MHz/4 = 18MHz and there is no
00026          prescale for PWM. The PWM timer/counter clock is at 18MHz. The base rate is set to 256
00027          The base PWM frequency is at 18MHz/256 = 70.312 KHz (Period = ~14.22 microsecond)
00028          Each PWM channel (1 to 6) will be configured as following:
00029              + PWM1.1 = (10/256) (period = 0.56 microsecond)(P2.0)
00030              + PWM1.2 = (20/256) (period = 1.11 microsecond)(P2.1)
00031              + PWM1.3 = (30/256) (period = 1.67 microsecond)(P2.2)
00032              + PWM1.4 = (40/256) (period = 2.22 microsecond)(P2.3)
00033              + PWM1.5 = (50/256) (period = 2.78 microsecond)(P2.4)
00034              + PWM1.6 = (60/256) (period = 3.33 microsecond)(P2.5)
00035          Using Oscilloscope to observe the PWM signals
00036 
00037 @Directory contents:
00038     \EWARM: includes EWARM (IAR) project and configuration files
00039     \Keil:  includes RVMDK (Keil)project and configuration files 
00040     
00041     lpc17xx_libcfg.h: Library configuration file - include needed driver library for this example 
00042     makefile: Example's makefile (to build with GNU toolchain)
00043     pwm_single_edge.c: Main program
00044 
00045 @How to run:
00046     Hardware configuration:     
00047         This example was tested on:
00048             Keil MCB1700 with LPC1768 vers.1
00049                 These jumpers must be configured as following:
00050                 - VDDIO: ON
00051                 - VDDREGS: ON 
00052                 - VBUS: ON
00053                 - Remain jumpers: OFF
00054                 - The output signal can be observed by oscilloscope on these pins below:
00055             IAR LPC1768 KickStart vers.A
00056                 These jumpers must be configured as following:
00057                 - PWR_SEL: depend on power source
00058                 - DBG_EN : ON
00059                 - Remain jumpers: OFF
00060 
00061             PWM pin selected:
00062                 Observe PWM wave signal on these pin
00063                 - PWM1.1 (channel 1): P2.0
00064                 - PWM1.2 (channel 2): P2.1
00065                 - PWM1.3 (channel 3): P2.2
00066                 - PWM1.4 (channel 4): P2.3
00067                 - PWM1.5 (channel 5): P2.4
00068                 - PWM1.6 (channel 6): P2.5
00069                                         
00070     
00071     Running mode:
00072         This example can run on RAM/ROM mode.
00073                     
00074         Note: If want to burn hex file to board by using Flash Magic, these jumpers need
00075         to be connected:
00076             - MCB1700 with LPC1768 ver.1:
00077                 + RST: ON
00078                 + ISP: ON
00079             - IAR LPC1768 KickStart vers.A:
00080                 + RST_E: ON
00081                 + ISP_E: ON
00082         
00083         (Please reference "LPC1000 Software Development Toolchain" - chapter 4 "Creating and working with
00084         LPC1000CMSIS project" for more information)
00085     
00086     Step to run:
00087         - Step 1: Build example.
00088         - Step 2: Burn hex file into board (if run on ROM mode)
00089         - Step 3: Configure hardware as above instruction 
00090         - Step 4: Run example    
00091                   Use oscilloscope to monitor the wave form on pin P2.0, P2.1, P2.2, P2.3, P2.4, P2.5
00092                 
00093         (Pls see "LPC17xx Example Description" document - chapter "Examples > PWM > Single_Edge"
00094         for more details)
00095         
00096 @Tip:
00097     - Open \EWARM\*.eww project file to run example on IAR
00098     - Open \RVMDK\*.uvproj project file to run example on Keil