These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!
abstract.h
00001 ******************** (C) COPYRIGHT 2010 NXPSemiconductors ******************* 00002 * @file PWM\Dual_Edge\abstract.txt 00003 * @author NXP MCU SW Application Team 00004 * @version 2.0 00005 * @date 00006 * @brief Description of the PWM Dual_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 generate PWM signal on 3 Channels in both 00023 edge mode and single mode. 00024 Process: 00025 This program illustrates the PWM signal on 3 Channels in both edge mode 00026 and single mode. 00027 Peripheral clock for PWM: PWM_PCLK = CCLK / 4 = 72MHz/4 = 18MHz and there is no 00028 prescale for PWM. The PWM timer/counter clock is at 18MHz. The base rate is set to 100 00029 The base PWM frequency is at 18MHz/100 = 180 KHz. 00030 Each PWM channel will be configured as following: 00031 - Channel 2: Double Edge (P2.1) 00032 - Channel 4: Double Edge (P2.5) 00033 - Channel 5: Single Edge (P2.6) 00034 The Match register values are as follows: 00035 - MR0 = 100 (PWM rate) 00036 - MR1 = 41, MR2 = 78 (PWM2 output) 00037 - MR3 = 53, MR4 = 27 (PWM4 output) 00038 - MR5 = 65 (PWM5 output) 00039 PWM Duty on each PWM channel: 00040 - Channel 2: Set by match 1, Reset by match 2. 00041 - Channel 4: Set by match 3, Reset by match 4. 00042 - Channel 5: Set by match 0, Reset by match 5. 00043 Using Oscilloscope to observe the PWM signals 00044 00045 @Directory contents: 00046 \EWARM: includes EWARM (IAR) project and configuration files 00047 \Keil: includes RVMDK (Keil)project and configuration files 00048 00049 lpc17xx_libcfg.h: Library configuration file - include needed driver library for this example 00050 makefile: Example's makefile (to build with GNU toolchain) 00051 pwm_dual_edge.c: Main program 00052 00053 @How to run: 00054 Hardware configuration: 00055 This example was tested on: 00056 Keil MCB1700 with LPC1768 vers.1 00057 These jumpers must be configured as following: 00058 - VDDIO: ON 00059 - VDDREGS: ON 00060 - VBUS: ON 00061 - Remain jumpers: OFF 00062 IAR LPC1768 KickStart vers.A 00063 These jumpers must be configured as following: 00064 - PWR_SEL: depend on power source 00065 - DBG_EN : ON 00066 - Remain jumpers: OFF 00067 00068 PWM Pin selected: 00069 Observe PWM wave signal on these pin 00070 - PWM1.2 (channel 2): P2.1 00071 - PWM1.4 (channel 4): P2.3 00072 - PWM1.5 (channel 5): P2.4 00073 00074 Running mode: 00075 This example can run on RAM/ROM mode. 00076 00077 Note: If want to burn hex file to board by using Flash Magic, these jumpers need 00078 to be connected: 00079 - MCB1700 with LPC1768 ver.1: 00080 + RST: ON 00081 + ISP: ON 00082 - IAR LPC1768 KickStart vers.A: 00083 + RST_E: ON 00084 + ISP_E: ON 00085 00086 (Please reference "LPC1000 Software Development Toolchain" - chapter 4 "Creating and working with 00087 LPC1000CMSIS project" for more information) 00088 00089 Step to run: 00090 - Step 1: Build example. 00091 - Step 2: Burn hex file into board (if run on ROM mode) 00092 - Step 3: Configure hardware as above instruction 00093 - Step 4: Run example, Use oscilloscope to monitor the wave form 00094 00095 (Pls see "LPC17xx Example Description" document - chapter "Examples > PWM > Dual_Edge" 00096 for more details) 00097 00098 @Tip: 00099 - Open \EWARM\*.eww project file to run example on IAR 00100 - Open \RVMDK\*.uvproj project file to run example on Keil
Generated on Tue Jul 12 2022 17:28:08 by 1.7.2