Author |
Message |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Wed Jun 25, 2014 9:19 pm Subject: CVD touch button with pic12F615 |
But In CCS help.
output_high( )
--------------------------------------------------------------------------------
Syntax:
output_high (pin)
Parameters:
Pin to write to. Pi ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Wed Jun 25, 2014 8:22 pm Subject: CVD touch button with pic12F615 |
Microchip code sample(but not for CCS):
/*********************************************************************
* file: cmtouch.c *
* auth: ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Wed Jun 25, 2014 7:38 pm Subject: CVD touch button with pic12F615 |
Problem:
if you want to use : output_high(PIN_A); output_low() ; output_float();
you must include : #use fast_io(A);
This is incorrect. #use fast_io() is not a requirement to use those functi ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Wed Jun 25, 2014 4:00 am Subject: CVD touch button with pic12F615 |
#include <12F615.h>
#device ADC=10
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOMCLR
#FUSES IOSC8
#FUSES NOMCLR ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Tue Jun 24, 2014 10:39 pm Subject: CVD touch button with pic12F615 |
You are making things too complex.
You say your real issue is with the touch pad.
Concentrate on that.
Ignore everything else.
Mike
Dear Mike walne.
As you say.
i must code for simple test.
... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Wed Jun 18, 2014 12:48 am Subject: CVD touch button with pic12F615 |
What's the circuit with the transistor to Vref for?.
Vref for the touch, is the supply. When you send 'output_high', on the pin connected to the ADC, you charge the internal ADC capacitor to this v ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Tue Jun 17, 2014 10:11 pm Subject: CVD touch button with pic12F615 |
Hi Ttelmah
This is the first time i working with Mtouch CVD.
So I do not have experience.
Thank you for the help.
This is the hardware touch button.
Please check help me :
http://i1099.photobu ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Tue Jun 17, 2014 4:01 am Subject: CVD touch button with pic12F615 |
There is also a big misunderstanding going on.
A _single_ touch pin requires two ADC inputs. The code as written implements one touch pad only.
You can re-use the same two inputs to give a second ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Tue Jun 17, 2014 12:07 am Subject: CVD touch button with pic12F615 |
You need to use:
int16 get_touch()
{
output_high(PIN_A0); //set AN0 driven high
set_adc_channel(0); //connect it to the ADC
output_low(PIN_A4); / ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Sun Jun 08, 2014 9:25 pm Subject: CVD touch button with pic12F615 |
int16 get_touch()
{
output_high(PIN_A0); //set AN0 driven high
set_adc_channel(sAN0); //connect it to the ADC
output_low(PIN_A3); //set AN3 to drive low
output_float(PIN_A3); / ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Sun Jun 08, 2014 9:24 pm Subject: CVD touch button with pic12F615 |
There is also a big misunderstanding going on.
A _single_ touch pin requires two ADC inputs. The code as written implements one touch pad only.
You can re-use the same two inputs to give a second ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Sat Jun 07, 2014 12:38 pm Subject: CVD touch button with pic12F615 |
Hi Ttelmah and Mike Walne
I created a circuit test.You can see the schematic:
http://i1099.photobucket.com/albums/g394/viethung_tdh/1-1.pnghttp://i1099.photobucket.com/albums/g394/viethung_tdh/IMG_2 ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Wed Jun 04, 2014 12:47 am Subject: CVD touch button with pic12F615 |
Reduce your code to testing the touch switch only. (Probably no more than 10 lines of code.)
Get to the stage where you know it is working correctly.
I don't have your touch switch, so there is ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Tue Jun 03, 2014 4:58 am Subject: CVD touch button with pic12F615 |
Hi Mike Walne and Ttelmah
I change code for mtouch use two channel ADC:
/*========================================================================
Mo ta:
Phan cung: Pic ... |
Topic: CVD touch button with pic12F615 |
viethung_tdh
Replies: 31
Views: 48871
|
Forum: General CCS C Discussion Posted: Sun Jun 01, 2014 3:57 am Subject: CVD touch button with pic12F615 |
OK. Your PIC is running.
You do not have any de-bounce.
This bit and your code don't agree, but I will let you sort that out.My application:
I want use touch buttton to controll PWM signal from ... |
|