regards
please teach me mTouch on flowcodeV5
Moderator: Benj
-
bigflowcode
- Posts: 2
- Joined: Wed Jun 27, 2012 8:05 pm
please teach me mTouch on flowcodeV5
i'm novice for Pic and C .can you help me some sample file for the 1 ch touch sensor and 1 output led
regards

regards
- JohnCrow
- Valued Contributor

- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
Re: please teach me mTouch on flowcodeV5
Hi
Are you refering to the touch screen ?
What version of FC are you using. The touch screen can only be used in the pro versions of FC5.
Also the touch function does not simulate, though the text display does work in simulation.
Are you refering to the touch screen ?
What version of FC are you using. The touch screen can only be used in the pro versions of FC5.
Also the touch function does not simulate, though the text display does work in simulation.
1 in 10 people understand binary, the other one doesn't !
-
bigflowcode
- Posts: 2
- Joined: Wed Jun 27, 2012 8:05 pm
Re: please teach me mTouch on flowcodeV5
thank you John Crow
I use FC 5 Pro.. I never use Fc and C code before but I have try to do basic code it is very well easy save my time for PIC .
SO i need to try CVD on ADC to be Touch Switch .
i have read (http://ww1.microchip.com/downloads/en/A ... 01298A.pdf) from Microchip
but how to do follow step on FC
1. Drive secondary channel to VDD as digital output.
2. Point ADC to the secondary VDD pin (charges CHOLD to VDD).
3. Ground sensor line.
4. Turn sensor line as input (TRISx = 1).
5. Point ADC to sensor channel (voltage divider from sensor to CHOLD).
6. Begin ADC conversion.
7. Reading is in ADRESH:ADRESL
pls. advice me
best regards
big
ps. I just knew ASM on MCS-51
I use FC 5 Pro.. I never use Fc and C code before but I have try to do basic code it is very well easy save my time for PIC .
SO i need to try CVD on ADC to be Touch Switch .
i have read (http://ww1.microchip.com/downloads/en/A ... 01298A.pdf) from Microchip
but how to do follow step on FC
1. Drive secondary channel to VDD as digital output.
2. Point ADC to the secondary VDD pin (charges CHOLD to VDD).
3. Ground sensor line.
4. Turn sensor line as input (TRISx = 1).
5. Point ADC to sensor channel (voltage divider from sensor to CHOLD).
6. Begin ADC conversion.
7. Reading is in ADRESH:ADRESL
pls. advice me
best regards
big
ps. I just knew ASM on MCS-51
Re: please teach me mTouch on flowcodeV5
As you are using V5 please sign up to the V5 forums
Regard
Dazz
Regard
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: please teach me mTouch on flowcodeV5
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel