thank you so much for the insight. that got rid of the erratic readings. I was able to set a threshold, and not update the average during a button press, and also count the amount of time that the button is pressed. I'm pleased.
but I'm having trouble with the HSEROUT command - I feel so silly, I've never used it before. I saw that the tx pin is the same one as I was using before, so I was encouraged, but all I got in the PICKIT2 UART tool was '????????????????????' and jiberish
I put these two defines up top, I tried 20h and 24h, 9600 baud and 19200
DEFINE HSER_TXSTA 24h ' high speed (BRGH = 1)
DEFINE HSER_BAUD 19200 ' 19200 BAUD rate
and then I had these in my code
Hserout ["Hello World", 13, 10]
HSEROUT [DEC VALUE, ", ", DEC AVE, 13,10]
Bookmarks