Hi,
This has always worked fine for me in the past.
If (Value And (2 ^ Bit)) > 0 Then 'that bit must be set
'Do something
End If
Value = the word value send to the VB application from the PIC
Bit = the bit you want to test (to see if it's set or not)
Try it out and let me know how everything works out.
Cheers.
![]()
Bookmarks