Page 1 of 1

PIC12F675-mTouch application

Posted: Fri Oct 10, 2008 2:51 pm
by mfun
Hello,
I'm wish to program a '675 to operate as a single button capacitive touch switch (GP4 output while pressed) using Flowcode V3. I have researched Microchips' site and I have a pretty good concept of what must occur in order to do this (software and hardware). I just need some direction in getting me going in Flowcode. Microchips' website states that any part with a comparator can do this, so with the '675 I think I need to setup the PIC as a relaxation oscillator (output the comparator to GP2(C OUT) through a diode to the touch pad, parallel a +/- 220K resistor to GND and connect all this back to GP0(C IN) to monitor for frequency drop due to added capacitance of a finger touch to GND). I have attached the Application Note that most closely fits my application, unfortunately the code examples they include are in ASM and for a 10F206 part, so literal transfer of hardware and software specifics are not possible. The hardware doesn't concern me too much, but the software using Flowcode does. Will I have to modify the ASM code and use it in 'blocks' or macros within Flowcode? The sleep modes shown in the App Note don't matter at this point.
Thanks in advance-

Re: PIC12F675-mTouch application

Posted: Tue Oct 14, 2008 10:15 am
by Benj
Hello

You can insert chunks of assembler code using the Flowcode C code icon. This come with a ready example of how to embed the assembler code. Most assembler code will remain the same across devices so you may be able to port the code directly. However things such as register addresses may change when moving to the replacement device so be aware of this.