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

Problem with #USE TOUCHPAD in the PIC18F46J50

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



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

Problem with #USE TOUCHPAD in the PIC18F46J50
PostPosted: Mon Apr 26, 2010 5:15 pm     Reply with quote

Hi,

I'm trying to write a simple routine testing the capacitive touch sensing capabilities of the PIC18F46J50 in order to use it in a new project. However I can not use it. I'm always receiving an error:
Quote:
Error 99 Option invalid Bad Pin 31744

Code generating this error is follows:
Code:

#use touchpad(scantime=32ms,threshold=6,PIN_A0='C',PIN_A1='5',PIN_A3='3')

Any idea? Has anybody used PIC18F46J50 for capacitive touch sensing ???
Thank you for your help.
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Mon Apr 26, 2010 5:16 pm     Reply with quote

I forgot
Compiler version 4.099
Best Regards
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Apr 26, 2010 5:40 pm     Reply with quote

What is the error that you are getting?
_________________
Google and Forum Search are some of your best tools!!!!


Last edited by dyeatman on Mon Apr 26, 2010 5:50 pm; edited 2 times in total
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 26, 2010 5:47 pm     Reply with quote

That library may only work with PICs that have "CPS" pins, such as the
16F727. For example, the follow program compiles with no errors (with
vs. 4.106):
Code:

#include <16F727.h>
#fuses INTRC_IO,NOWDT
#use delay(clock=8000000)
#use touchpad(THRESHOLD=5, PIN_D5='5', PIN_B0='C')

//=========================
void main(void)
{

while(1);
}


This Microchip page says to use appnote AN1250 to help you write
mTouch code for the 18F46J50:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2695#P23_569
AN1250 has some C pseudo-code. It's very messy, compared to CCS.
It uses nop's for delays, etc.
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Apr 26, 2010 6:05 pm     Reply with quote

When I try to use his #use touchpad statement with the 18F45J50 it gives
me a pin definition error leading me to believe he hasn't defined the pins
properly somehow. He hasn't given us much to go on...
_________________
Google and Forum Search are some of your best tools!!!!
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

This is the answer I received from CCS about CTMU in J parts
PostPosted: Sat May 01, 2010 8:05 am     Reply with quote

This message is a reply to CCS e-mail id: 0DA817
......
We do not support the CTMU type unit in the J50 parts. We do plan to add that however
it may be 4-6 weeks yet.
........

Best Regards
walteca



Joined: 22 Oct 2011
Posts: 1

View user's profile Send private message

PostPosted: Sat Oct 22, 2011 4:55 am     Reply with quote

Someone has managed to create the library for ctmu ?

Best Regards
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Oct 22, 2011 11:17 pm     Reply with quote

I made a small test program for the CTMU functions for the 18F46J50
for vs. 4.125 and it does compile. I looked at the .LST file and there is
code in there that talks to the CTMU registers. So apparently they added
the library code for this PIC. I didn't test it to see if it works, but it is there.
Code:

#include <18F46J50.h>
#fuses INTRC_IO, NOWDT
#use delay(clock=4M)
#use touchpad(scantime=32,threshold=6,PIN_A0='C',PIN_A1='5',PIN_A3='3')
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

//=========================
void main(void)
{
int8 c;

touchpad_state(1);

enable_interrupts(GLOBAL);

while(1)
  {
   if(touchpad_hit())
      c = touchpad_getc();
   
   printf("%c ", c);
  }

}
NebsteR



Joined: 06 Mar 2012
Posts: 1

View user's profile Send private message

PostPosted: Tue Mar 06, 2012 2:01 pm     Reply with quote

Hi,

You can write a complete list of microcontrollers that are compatible with the CCS mTouch library (#USE TOUCHPAD)?

PPS: CCS C 4.120.

Best regards.
longos



Joined: 27 Mar 2012
Posts: 4

View user's profile Send private message

PostPosted: Mon Apr 02, 2012 5:46 am     Reply with quote

Unfortunately, this code does not run on processors 18F series even though the correct compilation.
When will it be released update to the compiler that supports these processors?
dyeatman



Joined: 06 Sep 2003
Posts: 1923
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Apr 02, 2012 6:17 am     Reply with quote

Longos and Nebster, you do understand that this is NOT CCS support right?

This is just a user forum. For questions like which processors are supported
and when is CCS going to do something, you have to send an email to, or
call, CCS. Don't ask us!
_________________
Google and Forum Search are some of your best tools!!!!
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Sat Apr 07, 2012 6:18 pm     Reply with quote

Hi,

This is the answer I have received from CCS regarding which PIC are supported. However I have no time to test it until now. Probably I will test it next months.

Best Regards

------------------------------------------------------------
This message is a reply to CCS e-mail id: 1LA192

The following parts:

PIC12F1822
PIC12LF1822
PIC12F1840
PIC16F707
PIC16F722
PIC16F722A
PIC16LF722A
PIC16LF723
PIC16F723
PIC16LF723A
PIC16F723A
PIC16F724
PIC16LF724
PIC16LF726
PIC16F726
PIC16F727
PIC16LF727
PIC16F1823
PIC16LF1823
PIC16LF1824
PIC16F1824
PIC16LF1825
PIC16F1825
PIC16LF1826
PIC16F1826
PIC16LF1827
PIC16F1827
PIC16F1828
PIC16LF1828
PIC16F1829
PIC16LF1829
PIC16F1847
PIC16F1933
PIC16LF1933
PIC16F1934
PIC16LF1934
PIC16LF1936
PIC16F1936
PIC16LF1937
PIC16F1937
PIC16LF1938
PIC16F1938
PIC16LF1939
PIC16F1939
PIC16LF1946
PIC16F1946
PIC16F1947
PIC16LF1947
PIC18F13K22
PIC18LF13K22
PIC18F14K22
PIC18LF14K22
PIC18F23K22
PIC18F24J11
PIC18LF24J11
PIC18F24K22
PIC18LF24J50
PIC18F24J50
PIC18LF25J11
PIC18F25J11
PIC18F25K22
PIC18F25J50
PIC18LF25J50
PIC18F25K80
PIC18F26J11
PIC18LF26J11
PIC18F26J13
PIC18LF26J13
PIC18F26K22
PIC18LF26J50
PIC18F26J50
PIC18F26J53
PIC18LF26J53
PIC18F26K80
PIC18LF27J13
PIC18F27J13
PIC18F27J53
PIC18LF27J53
PIC18F43K22
PIC18LF44J11
PIC18F44J11
PIC18F44K22
PIC18LF44J50
PIC18F44J50
PIC18LF45J11
PIC18F45J11
PIC18F45K22
PIC18LF45J50
PIC18F45J50
PIC18F45K80
PIC18F46J11
PIC18LF46J11
PIC18F46J13
PIC18LF46J13
PIC18F46K22
PIC18LF46J50
PIC18F46J50
PIC18F46J53
PIC18LF46J53
PIC18F46K80
PIC18LF47J13
PIC18F47J13
PIC18F47J53
PIC18LF47J53
PIC18F65K22
PIC18F65K80
PIC18F65K90
PIC18F66K22
PIC18F66K80
PIC18F66J90
PIC18F66K90
PIC18F66J93
PIC18F67K22
PIC18F67K90
PIC18F67J90
PIC18F67J93
PIC18F85K22
PIC18F85K90
PIC18F86K22
PIC18F86J72
PIC18F86K90
PIC18F86J90
PIC18F86J93
PIC18F87K22
PIC18F87J72
PIC18F87J90
PIC18F87K90
PIC18F87J93
PIC24F04KA200
PIC24F04KA201
PIC24F08KA101
PIC24F08KA102
PIC24F16KA101
PIC24F16KA102
PIC24F16KA301
PIC24FV16KA301
PIC24FV16KA302
PIC24F16KA302
PIC24FV16KA304
PIC24F16KA304
PIC24FJ16MC101
PIC24FJ16MC102
PIC24F32KA301
PIC24FV32KA301
PIC24F32KA302
PIC24FV32KA302
PIC24FV32KA304
PIC24F32KA304
PIC24FJ32GA102
PIC24FJ32GA104
PIC24FJ32GB002
PIC24FJ32GB004
PIC24FJ64GA102
PIC24FJ64GA104
PIC24FJ64GA106
PIC24FJ64GA108
PIC24FJ64GA110
PIC24FJ64GB002
PIC24FJ64GB004
PIC24FJ64GB106
PIC24FJ64GB108
PIC24FJ64GB110
PIC24FJ128DA106
PIC24FJ128DA110
PIC24FJ128DA206
PIC24FJ128DA210
PIC24FJ128GA106
PIC24FJ128GA108
PIC24FJ128GA110
PIC24FJ128GB106
PIC24FJ128GB108
PIC24FJ128GB110
PIC24FJ128GB206
PIC24FJ128GB210
PIC24FJ192GA106
PIC24FJ192GA108
PIC24FJ192GA110
PIC24FJ192GB106
PIC24FJ192GB108
PIC24FJ192GB110
PIC24FJ256DA106
PIC24FJ256DA110
PIC24FJ256DA206
PIC24FJ256DA210
PIC24FJ256GA106
PIC24FJ256GA108
PIC24FJ256GA110
PIC24FJ256GB106
PIC24FJ256GB108
PIC24FJ256GB206
PIC24FJ256GB210
PIC24FJ128GA306
PIC24FJ64GA306
PIC24FJ128GA308
PIC24FJ64GA308
PIC24FJ128GA310
PIC24FJ64GA310



===============================================
> Dear Sirs,
> What micro controllers are you supported with your touch library.
> Compiler version 1.124.
> Thank you and Kind regards
longos



Joined: 27 Mar 2012
Posts: 4

View user's profile Send private message

PostPosted: Thu Apr 12, 2012 9:49 am     Reply with quote

micro_debugger wrote:

PIC18F26K80
Doesn't work !
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