Keil Logo

µVISION DEBUGGER: Using the RC Oscillator for PHILIPS LPC CH


Information in this article applies to:

  • C51

QUESTION

How do I configure my project so that my application uses the Internal RC Clock of the Philips LPC devices?

ANSWER

There is a startup file named STARTLPC.A51 in the \KEIL\C51\LIB\ folder. This file contains all the configuration options for the LPC devices. Copy it to your project directory and include it in your project.

To change the options for the Oscillator Frequency, scan through this file for the following section and change the FOSC EQU to have the value 3.

;  Setup LPC Configuration Register (UCFG1, UCFG2)
;
; Oscillator Configuration (UCFG1.0 .. UCFG1.2)
; FOSC       Val  Description
; ----       ---  -----------
FOSC EQU 7  ; 0 = high frequency crystal or resonator (4MHz .. 20MHz)
;           ; 1 = medium frequency crystal or resonator (100kHz .. 4MHz)
;           ; 2 = low frequency crystal (20kHz .. 100kHz)
;           ; 3 = internal RC oscillator (6MHz +/- 25%)
;           ; 7 = (default on unprogrammed part) external clock input on X1

Last Reviewed: Tuesday, January 26, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.