Microchip Technology DM164130-7 User Manual
F1 EVALUATION PLATFORM
USER’S GUIDE
2010 Microchip Technology Inc.
DS41401B-page 19
Chapter 4. Demo Code
4.1
INTRODUCTION
The F1 Evaluation Platform demos are located at
www.microchip.com/F1Eval
. The
following demos are available:
1.
I
2
C™ Demo
2.
LCD Demo
3.
BLDC Demo
4.
Combined Demo
This chapter provides an overview to the functions provided by these demos.
4.2
I
2
C™ DEMO
The I
2
C demo reads the current temperature from the on-board MCP9800 I
2
C
temperature sensor. The I
2
C driver is used to extract the data. The resulting value is
converted to a PWM duty cycle and used to control the brightness of the LED D4. LED
D1 toggles at approximately 10 ms.
D1 toggles at approximately 10 ms.
4.3
LCD DEMO
The LCD demo adds button, potentiometer, Real-Time Clock (RTC) and LCD support
to the I
to the I
2
C demo. The 32.768 kHz crystal is activated to maintain the Real-Time Clock
and to drive the LCD peripheral. An input driver is supplied to manage the button and
potentiometer. A state machine now controls the major features of the demo so that the
time, temperature and potentiometer value can be displayed on the LCD.
potentiometer. A state machine now controls the major features of the demo so that the
time, temperature and potentiometer value can be displayed on the LCD.
4.4
BLDC DEMO
The BLDC demo controls a sensorless, brushless DC motor connected to the PIC16F1
BLDC Expansion board (DM164130-2). Other motors can also be driven by making
appropriate modifications to the motor control parameters in the source code.
BLDC Expansion board (DM164130-2). Other motors can also be driven by making
appropriate modifications to the motor control parameters in the source code.
Refer to application note AN1305, “Sensorless 3-Phase Brushless Motor Control with
the PIC16FXXX” for detailed information regarding BLDC motor control.
the PIC16FXXX” for detailed information regarding BLDC motor control.
4.5
COMBINED DEMO
The combined demo combines all the software from all the previous demos to show the
power of the PIC16LF1937. In this demo, the BLDC motor is seamlessly controlled
while displaying the time, temperature, potentiometer position or motor RPM/10. All
drivers are reused from the previous demos. The RTCC is driven from the LCD
peripheral.
power of the PIC16LF1937. In this demo, the BLDC motor is seamlessly controlled
while displaying the time, temperature, potentiometer position or motor RPM/10. All
drivers are reused from the previous demos. The RTCC is driven from the LCD
peripheral.
The combined demo is preprogrammed in the F1 Evaluation Platform.