| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
LPC18xx/43xx RTC example
Peripheral examples

## Detailed Description

Example description
This example shows how to use the RTC, generate periodic interrupts, and use the alarm interrupt.

The RTC is configured to generate an interrupt on each second field register change. An interrupt is also configured when certain alarm field values match the time field values. The LEDs will toggle states based on the RTC events. You can also use a terminal program with the UART to monitor RTC time and events.

Special connection requirements
There are no special connection requirements for this example.

Build procedures:
LPC18xx/43xx example quickstart for Keil uVision4
LPC18xx/43xx example quickstart for IAR EWARM
LPC18xx/43xx example quickstart for Code Red Xpresso

Supported boards and board setup:
Hitex 1850 evaluation boards
Hitex 4350 evaluation boards
Keil 1857 evaluation boards
Keil 4357 evaluation boards
NGX 1830 Xplorer boards
NGX 4330 Xplorer boards

Submitting LPCOpen issues:
Community support for LPCOpen

## Functions
static void | showTime (IP_RTC_TIME_T *pTime)
void | RTC_IRQHandler (void)
| RTC interrupt handler.
int | main (void)
| Main entry point.

## Variables
static volatile bool | fIntervalReached
static volatile bool | fAlarmTimeMatched
static volatile bool | On0
static volatile bool | On1

## Function Documentation

int main | ( | void |  | ) |

Main entry point.

Main program body.

Returns
  Nothing

Definition at line 132 of file rtc.c.

void RTC_IRQHandler | ( | void |  | ) |

RTC interrupt handler.

Returns
  Nothing

Definition at line 102 of file rtc.c.

static void showTime | ( | IP_RTC_TIME_T * | pTime | ) |
| static

Definition at line 84 of file rtc.c.

## Variable Documentation

volatile bool fAlarmTimeMatched
| static

Definition at line 72 of file rtc.c.

volatile bool fIntervalReached
| static

Definition at line 71 of file rtc.c.

volatile bool On0
| static

Definition at line 73 of file rtc.c.

volatile bool On1
| static

Definition at line 73 of file rtc.c.