Hello,
This custom component should work in v5 for PIC to give you CAP touch.
Simply copy the file into your Flowcode/v5/Components directory.
Then add the custom component to your Flowcode program and go into the EXT properties.
The properties control the following parameters of the CAP touch component.
//ADC Defines
#define %a_MX_ADC_CHANNEL %b
#define %a_MX_ADC_ACTIME %c
#define %a_MX_ADC_CONVSP %d
#define %a_MX_ADC_VREFOP %e
//Cap Touch Defines
#define %a_MX_ADC_FILTER %f
#define %a_MX_ADC_CHARGE %g
#define %a_MX_ADC_DISCHARGE %h
a = Unique Reference - Same as ADC Component - eg CTCH1_
b = Which ADC Channel - Same as ADC Component - eg 0 for AN0
c = Acquisition time - Same as ADC Component - eg 200
d = Conversion Speed - Same as ADC Component - eg 5
e = VRef+ Option - Same as ADC Component - eg 0
f = Number of filter iterations - default 5 times - range 1 to 15
g = Cap Touch Charge Time - default 125us - range 1 to 255
h = Cap Touch Discharge Time - default 125us - range 1 to 255
The code will currently only work with some devices. I believe it was developed for use with the 18F26J50 device for use with the board below.
http://uk.farnell.com/jsp/search/produc ... ningCenter
I have moved the topic to the appropriate section of the forums details of how to sign up are available from here.
http://www.matrixmultimedia.com/mmforum ... =46&t=9958
Let me know how you get on.