30.12.2014 Views

QDK PIC24/dsPIC-C30 - Quantum Leaps

QDK PIC24/dsPIC-C30 - Quantum Leaps

QDK PIC24/dsPIC-C30 - Quantum Leaps

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>QDK</strong><br />

<strong>PIC24</strong>/<strong>dsPIC</strong>-<strong>C30</strong><br />

www.state-machine.com/pic<br />

The actual hardware/software used to test this <strong>QDK</strong> is described below (see Figure 1):<br />

1. Microchip Explorer 16 Development Board with <strong>PIC24</strong>FJ128GA010 or <strong>dsPIC</strong>33FJ256 daughter board<br />

2. Microchip MPLAB® ICD2 in-circuit debugger<br />

3. Microchip MPLAB® IDE v8.83<br />

4. Microchip MPLAB <strong>C30</strong> compiler v3.31<br />

5. QP/C 4.5.02 or higher<br />

As shown in Figure 1, the Explorer 16 Development Board accepts <strong>PIC24</strong> and <strong>dsPIC</strong> daughter boards.<br />

The port has been tested with <strong>PIC24</strong>FJ128GA010 daughter board as well as with <strong>dsPIC</strong>33FJ256<br />

daughter board. However, the described QP port should be applicable to almost all Microchip 16-bit<br />

<strong>PIC24</strong> and <strong>dsPIC</strong> devices.<br />

1.1 About QP<br />

QP is a family of very lightweight, open source, state machine frameworks for<br />

developing event-driven applications. QP enables building well-structured<br />

embedded applications as a set of concurrently executing hierarchical state<br />

machines (UML statecharts) directly in C or C++ without big tools. QP is<br />

described in great detail in the book “Practical UML Statecharts in C/C++,<br />

Second Edition: Event-Driven Programming for Embedded Systems” [PSiCC2]<br />

(Newnes, 2008).<br />

As shown in Figure 2, QP consists of a universal UML-compliant event<br />

processor (QEP), a portable real-time framework (QF), a tiny preemptive kernel<br />

(QK), and software tracing instrumentation (QS). Current versions of QP<br />

include: QP/C and QP/C++, which require about 4KB of code and a few<br />

hundred bytes of RAM, and the ultra-lightweight QP-nano, which requires only<br />

1-2KB of code and just several bytes of RAM. QP can work with or without a traditional RTOS or OS. In<br />

the simplest configuration, QP can completely replace a traditional RTOS. QP can manage up to 63<br />

concurrently executing tasks structured as state machines (called active objects in UML).<br />

Figure 2: QP components and their relationship with the target hardware, board support package<br />

(BSP), and the application comprised of state machines<br />

Copyright © <strong>Quantum</strong> <strong>Leaps</strong>, LLC. All Rights Reserved.<br />

2 of 35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!