Ohh, so you have a number you save in a WORD, and then split you the WORD up in two BYTES and then you send the BYTES, but can i then get them to one number again in visual basic? And can you also do it the other way, so i have a number higher than 255 would like to have send to the PIC?
I Hope you can help me, and it would be great if you could make som code examples![]()
I have found out... Your code was perfect, i could also just have looked in the book
Then i used your code in the PIC and this code in Visual Basic
Just so others can see it, if they maybe need it!Code:Function LOBYTE(ByVal w As Integer) As Byte LOBYTE = w And &HFF End Function Function HIBYTE(ByVal w As Integer) As Byte HIBYTE = (w And &HFF00&) \ 256 End Function
Bookmarks