User manual

LPCXpresso Experiment Kit - User’s Guide
Page 4
Copyright 2013 © Embedded Artists AB
7.6 Read an Analog Input 53
7.6.1 Lab 5a: Read Trimming Potentiometer 53
7.6.2 Lab 5b: Event Threshold 56
7.6.3 Lab 5c: Read Light Sensor 56
7.6.4 Lab 5d: ADC Noise Test 57
7.7 Pulse Width Modulation 58
7.7.1 Lab 6a: PWM Control of a LED 58
7.7.2 Lab 6b: PWM Control of a LED, cont. 1 59
7.7.3 Lab 6c: PWM Control of a LED, cont. 2 59
7.7.4 Lab 6d: PWM Control of two LEDs 60
7.8 Control an RGB-LED 61
7.8.1 Lab 7a: Test RGB-LED 61
7.8.2 Lab 7b: Control RGB-LED 62
7.9 Control a 7-segment Display 63
7.9.1 Lab 8a: Test 7-segment Display 64
7.9.2 Lab 8b: Control 7-segment Display 64
7.9.3 Lab 8c: Control 7-segment Display, cont. 66
7.9.4 Lab 8d: Control Dual Digit 7-segment Display 66
7.9.5 Lab 8e: Control 7-segment Display via Shift Register 68
7.10 Work with a Timer 71
7.10.1 Lab 9a: Create Exact Delay Function 71
7.11 PWM via a Timer 72
7.11.1 Lab 10a: Control RGB-LED 74
7.11.2 Lab 10b: Buzzer and Melodies 74
7.11.3 Lab 10c: Control a Servo Motor 75
7.12 Work with a Serial Bus SPI 78
7.12.1 Lab 11a: Access Shift Register 81
7.12.2 Lab 11b: Control 7-segment Display 82
7.12.3 Lab 11c: Access SPI E2PROM 82
7.13 Work with Interrupts 87
7.13.1 Lab 12a: Generate IRQ via GPIO 89
7.13.2 Lab 12b: Timer IRQ 90
7.13.3 Lab 12c: Timer IRQ with Callback 91
7.13.4 Lab 12d: Nested Interrupts 92
7.13.5 Lab 12e: Control Dual Digit 7-segment Display 93
7.14 Work with a Serial Bus I2C 94
7.14.1 Lab 13a: Solder Surface Mounted Components 95
7.14.2 Lab 13b: Read LM75 Temperature Sensor 96
7.14.3 Lab 13c: Control LEDs via PCA9532 97
7.15 Work with a Serial Bus UART 100
7.15.1 Lab 14a: Transmitting and Receiving via the UART 106
7.15.2 Lab 14b: Direct printf() to UART 106
7.15.3 Lab 14c: Interrupt driven UART handling and ring buffers 107
7.16 Extra: Work with RF-module 112
7.16.1 Lab 15a: XBee™ RF-Module 113
7.16.2 Lab 15b: GPS Receiver 117