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 support@ccsinfo.com

Trouble using touchpad functions with 12lf1822

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



Joined: 23 Dec 2010
Posts: 7

View user's profile Send private message

Trouble using touchpad functions with 12lf1822
PostPosted: Wed Dec 29, 2010 2:29 pm     Reply with quote

I am trying to simply get a touch sensing on two pins on my 12lf1822 to replace some qprox sensors I have used in the past.

I am basically using the code from the help file, but have had no success:

Code:

void main()
{
#USE TOUCHPAD (PIN_A1='1')
char c;
enable_interrupts(GLOBAL);
while (TRUE) {
     if ( TOUCHPAD_HIT() )         //wait until key on PIN_B0 is pressed
       {
             output_bit(PIN_A5,!input(PIN_A5)); //switch LED
          c = TOUCHPAD_GETC();
       }
     }                             
}


This code gives me an "bad pin 97" error message from the compiler 4.116

if I change the touch pin to A4 it will compile. But it never senses a touch. I see no signal on pin A4 with my scope.

I need both pins to work, but can't get either one to work, apparently for different reasons.

Any ideas?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Dec 29, 2010 4:30 pm     Reply with quote

I get the same error. Report it to CCS, and give them a compilable
sample program. In other words, add the #include for the PIC, #fuses,
and #use delay() to your posted code. Tell them the compiler version.

A work-around option would be to compile the code with settings that
allow it compile OK. Then study the .LST file to see what the CCS
library code is doing. Then write functions in C to duplicate the
functionality of the library code. I don't have time to do this right now.
It's better if you can get CCS to quickly fix it in a new release.
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