CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Capacitive Button with PIC16F1934 TOUCHDATA Problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
eflatun



Joined: 24 Aug 2011
Posts: 1

View user's profile Send private message

Capacitive Button with PIC16F1934 TOUCHDATA Problem
PostPosted: Wed Mar 27, 2013 6:36 am     Reply with quote

Hello,
I'm new on PIC and CCS C but on the other hand eager about this. I would like to use the mtouch system but i couldn't. I have got some problem with CCS C because when i did compile this code i have got 2 warnings like this.

"Variable never used: TOUCHPADSTATUS
Variable never used: TOUCHDATA"

The compiler version is V4.114
The PIC I am using is 16F1934

Code:
#include <CapSensButt.h>
#USE TOUCHPAD (PIN_B0='A')
#FUSES NOWDT                    //No Watch Dog Timer
#FUSES ECH                   
#FUSES WDT_SW               
#FUSES NOPUT                    //No Power Up Timer
#FUSES MCLR                     //Master Clear pin enabled
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOCPD                    //No EE protection
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOCLKOUT             
#FUSES IESO                     //Internal External Switch Over mode enabled
#FUSES FCMEN                    //Fail-safe clock monitor enabled
#FUSES NOWRT                    //Program memory not write protected
#FUSES NOVCAP               
#FUSES PLL                   
#FUSES STVREN                   //Stack full/underflow will cause reset
#FUSES BORV19               
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O

#use delay(clock=8000000)

void main(void){
   setup_lcd(LCD_DISABLED);
   setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard
   char c;
while(TRUE)

   TOUCHPAD_STATE(1);
   enable_interrupts(GLOBAL);
   c = TOUCHPAD_GETC();       //will wait until one of declared pins is detected
                                //if PIN_B0 is pressed, c will get value 'A'
   if(c=='A')
   {
   output_high(PIN_A0);
   delay_ms(1000);
   while(touchpad_hit());
   output_high(PIN_A0);
   }
}
}


What should i do ?
Whats my fault ? Could u help me pls ?
Thanks alot. Have a nice day.
Ttelmah



Joined: 11 Mar 2010
Posts: 19553

View user's profile Send private message

PostPosted: Wed Mar 27, 2013 7:21 am     Reply with quote

Nothing.
They are just warnings. The same applies when you add 'ERRORS' to #use rs232. The functions return extra data 'in case' you want it. The compiler warns you if you don't use this, but there is nothing wrong with not doing so.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group