Claro, el codigo con el que estoy probando es este:
#include <16f1933.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC_IO //Internal RC Osc, no CLKOUT
#FUSES PUT //Power Up Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOMCLR //Master Clear pin used for I/O
#FUSES NOCPD //No EE protection
#FUSES NOBROWNOUT //No brownout reset
#FUSES NOIESO //Internal External Switch Over mode enabled
#FUSES NOFCMEN //Fail-safe clock monitor enabled
#FUSES WDT_SW
#FUSES NOCLKOUT
#FUSES NOWRT //Program memory not write protected
#FUSES NOVCAP
#FUSES PLL
#FUSES NOSTVREN //Stack full/underflow will cause reset
#FUSES BORV19
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NODEBUG //No Debug mode for ICD
#use delay(int=8000000)
#use touchpad(scantime=32ms,threshold=6,PIN_A5='5')
#use fast_io(a)
#use fast_io(b)
#byte port_a = 0x00C
#byte port_b = 0x00D
CHAR c;
void main(void)
{
set_tris_a(0b00110000);
set_tris_b(0b00000000);
port_a=0;
port_b=0;
//port_b_pullups(true);
setup_oscillator(OSC_8MHZ|OSC_INTRC|OSC_PLL_OFF,0);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_2);
enable_interrupts(INT_TIMER0);
enable_interrupts(GLOBAL);
TOUCHPAD_STATE(1);
for(;;)
{
if(touchpad_hit())
{
c=touchpad_getc();
if(c=='5') output_high(PIN_A0);
}
}
}
#int_TIMER0
void TIMER0_isr(void)
{
}