I am working with the 16F690 in the new micro QFN 20 package. It works fine but displays a wierd bug with the PBP shiftout function. I use pin RB6 as the shift clock, RC7 as the shift data output and RB4 as data in(not used at this point). RB5 is an LED output to show that there is shiftout communication. I set it high, shiftout a few bytes, look for a button press, and when the button is released, turn the LED back off by clearing the bit.
Now, here's the problem... When the shiftout command is called, RB5 is immedietly cleared, effectively turning the LED off. I have bypassed the shiftout statements and the LED stays high. I tried another LED on RC4 and it worked fine. The code is just a couple of lines, and the RB5 pin is definitely cleared when entering shiftout. I will post it if need be, but it is extremely simple. I have even tried substituting while-when for the if-then button sheck statement.
Eventually I will go to hardware SPI, but for versatility, would like to get this working. Any ideas?
Bookmarks