News:

;) This forum is the property of Proton software developers

Main Menu

Capacitive Voltage Divider on an 8 bit MCU (16F18425)

Started by Peter Truman, Today at 04:35 AM

Previous topic - Next topic

Peter Truman

Looking for some assistance with a new project - I want to try using the CVD feature of this PIC. So I knocked up a small test PCB to give it a whirl. (BTW - JLPCB had a 'special' on. I ordered 5 boards (their min order) and it cost me a total of US$20.00 including postage to Australia. Bargain!)

I selected this PIC based on a brief review of the datasheet - thinking I would dig in a bit deeper when it came to writing the code! (rookie error)

Basic function of the board is easy - its a tiny 14 pin TSOP that runs a treat at 32MHz, no trouble to configure and program.

Where I have run into trouble is trying to figure out this CVD module - the principle seems very simple but small print in the datasheet strongly recommends NOT trying to configure the module manually
Pg 1 https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ApplicationNotes/ApplicationNotes/01478B.pdf

"However, Microchip does not recommend
implementing CVD by hand! The mTouch sensing
Framework and mTouch sensing Library provided in
the Microchip Library of Applications implements the
scan automatically, and has been tested to provide a
high level of noise immunity. It is highly recommended
to use these resources rather than implementing the
scan from scratch."


So I fired up MPLAB with the intention of trying to figure out how it all works - sadly my C coding skills are even worse than my Proton coding skills. So here I am.

I wondered of anyone has any experience with this? I have a project in mind that I think this would suit so I would be happy to come to some form of cash arrangement if anyone is willing to help me with this? Otherwise I might have to commision a C developer on Freelancer (always a nightmare!)

It occured to me, if I could get this module configured in XC8, I could maybe just insert the assembly code into my Positron program - after all, all I need is 1 (reliable) 12 bit variable!

Anyway - if anyone is able to help, please give me a shout (note: I'm away on holiday in Thailand for 4 weeks from this time next week - so I'll be a bit out of the picture - wife has told me I can't take my laptop :-\ )

As always - thanks in advance