Escolar Documentos
Profissional Documentos
Cultura Documentos
Kit: PIC32CTMUEvalBoard_2ChanSliderDemo
==============================================================================
2. Load the demo code into MPLAB by double clicking the appropriate
dot mcp project file:
PIC32CTMUEvalBoard_2ChanSliderDemo.mcp
2. Connect the REAL ICE debugger to J1 on the evaluation board's left edge.
.
3. Power up the board by connecting a USB port on your computer to the mini-B
port on the evaluation board's left edge.
The REAL ICE tab of the output window should display something like this:
MPLAB REAL ICE detected
Connecting to MPLAB REAL ICE...
Firmware Suite Version...... 01.26.81
Firmware type......................PIC32MX
MPLAB REAL ICE Connected.
Target Detected
Device ID Revision = 00000000
1. After the PICKit Serial Analyzer (PKSA) drivers have been installed,
connect it to the evaluation board:
Connect the PKSA to your computer using a USB cable. Depress the PKSA push
button until all three LEDs light. Then release the button. If the UART
interface on the evaluation board is operating the red "Busy" LED should
light, showing that there is UART traffic between the demo application and
the PKSA.
The UART interface runs at 115.200 kbaud, no parity, 8 bits, no stop bit.
Typically the PKSA driver provides com port 9, but you may need to check
which com port is available using Windows Device Manager.
mTouchCapDemos\Utilities\mTouch GUI\Executable
After the executable is launched, you will notice 7 icons on the upper right
side of the GUI window. The are, from left to right:
Hit F6 and verify the serial interface is using the correct com port on
your PC. If it is you should be seeing activity on the GUI. Try to
assert buttons or a slider value and verify the correct activity shows up
on the GUI. The plots will show the measured voltage (in adjusted ADC
counts) for each of the capacitors on the daughter card. The GUI will
also show you the decoded button or slider status. You can use these
signals to tune the settings in mTouchConfig.h to improve sensitivity and
noise immunity.
3.1 Verify that the red "Busy" LED on the PICKit Serial Analyzer is lit.
If it isn't reset the PICKit Serial Analyzer by pressint its button
until all LEDs are lit. You should now see activity on the GUI.
3.2 Verify that the GUI is using the correct com port by checking the
Windows Device Manager under "Ports (COM & LPT)"
3.3 If the GUI still doesn't work, check that there is activity on the
com port using a hyperterminal. If there is no activity you need
to reboot your PC and start over. (Sorry, that's the best we can do.)
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
We have found Profilab to be a useful tool, costing less than 100 Euros.
But Microchip cannot provide additional support for it, other than giving
out the Profilab project and a compiled executable. If it doesn't work
you're on your own. (Sorry.)
If the GUI still doesn't work you can still capture com port traffic
with a hyperterminal application and plot the results using Excel or
Open Office's Calc.
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
A Note on Charge/Discharge Cycles
---------------------------------
The ADC on PIC32 devices has a much higher bandwidth than those on 16 bit and 8
bit devices from Microchip. Consequently the sample and hold (SAH) capacitor
in the ADC is much smaller. Thus is is necessary to use multiple ADC charge or
discharge cycles to achieve the same performance. The number of cycles is
defined in mTouchConfig.h by:
#endif
For some button capacitor designs only three cycles are needed to drive the
voltage of an unasserted button to Vdd/2. For other buttons you may need to
add additional cycles by modifying the timer call back routine found in the
file TimerCallbackFunc1.c, TimerCallbackFunc2.c, or TimerCallbackFunc3.c.
You never really know if the application is working to peak performance without
examining the signals at each button capacitor. For that you will need a good
active single-ended 'scope probe, such as a Tektronix 6245, with a probe
capacitance less than 1 pF. Put channel one on the button capacitor signal and
channel two on the reference channel. (Use a regular probe on channel two.)
has examples of button signals, both unasserted and asserted, for all cap
touch measurement techniques.
References:
-----------
PICKit Serial Analyzer User's Guide - DS51647
AN1250 "Microchip CTMU for Capacitive Touch Applications" - DS01250
mTouch Advanced Capacitve Evaluation Kits User's Guide - DS41385
Profilab-Expert Software:
http://www.abacom-online.de/uk/html/profilab-expert.html