Ok then...Let's have a look-see at the whole program...
And it would really help if you'd explain strange result.
Just saying the words 'strange result' could mean that your PIC just spit a banana out of pin 1. Who knows... Qualifies as a strange result though, dontcha think?
I think I know what your root problem is...but I want to see the program first before I help you figure out what the deal is.
Bookmarks