
Originally Posted by
jellis00
Found my problem after an email from melLabs tech support.
I needed to set all inputs as digital by configuring all pins digital on the 16F690 by setting ANSEL = 0 and ANSELH = 0 in my Register Settings. Once I did this, everything works!
This also answers my question about whether the input from the meter sensor needs to be set as an analog or digital input. Evidently, even though the input is an analog pulse, since it is within the max limits for digital input, having the input pin as digital is OK and precludes having to use code to sample the signal input with the A/D to determine the pulse presence that way. Don't quite understand why a digital input works with an analog signal, but if it works I won't argue with it.

Hi jellis00, I gotta disagree about the signal being analog inasmuch as you are counting the tops of the waveforms of the hall effect switch. Your post stands as a wonderful example of why you want to read everyone else's posts even if their problem seems unrelated to your own problem, here is why: I just addressed this problem (ANSEL & ANSELH) here: http://www.picbasic.co.uk/forum/showthread.php?t=10788 Using the same development board and PIC.
It might have saved you some hair
Speaking only for myself, I do not have any extra to lose ! I am happy you found the problem.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks