Configure PIC24E to run at 70 MIPS

Since Microchip introduced their PIC24EP family of products, it took a while before they became available from major vendors in Thailand. This family (and its close relatives dsPIC33EP) is attractive for its 70 MIPS performance. It could not run at that speed right out of the package, considering a user’s choice of setup (such as oscillator type and frequency). So in this brief article, we show an example on how to configure PIC24EP to 70 MIPS. A PIC24EP256MC202 is used on our prototype, with 2 clock choices: the 7.37 MHz on-chip Internal Fast RC (FRC) oscillator, and an external 8 MHz crystal.

One might wonder how 70 MIPS performance could be obtained from such low oscillator circuits. The trick is to use a Phase Locked Loop (PLL) module inside the chip, which can multiply the clock frequency to a desired higher value. This is a preferred approach compared to using an external HF clock that could interfere with other components on the board. Along the oscillator path there are a couple of frequency adjustment units, whose parameters must be set properly in software. We will show you how in a minute.


We use a very simple circuit with only a push-button switch and an LED connected to the PIC24EP as shown in Figure 1.

Figure 1: simple PIC24EP circuit to test clock switching

After reset, the oscillator is initialized to its default value (equal the clock source, either FRC or external crystal). The resulting performance is by no mean close to the maximum performance. The execution speed is shown simply by blinking an LED in the main loop. Whenever the push-button switch is pressed,clock switching to 70 MIPS is performed in software. We then see the blinking speed significantly increases. That ends the demonstration.



Comments are closed.