Thanks. But isn't there a simple bit shift operator in VB? That would make it beyond simple.... > > Change the mscomm control to binary instead of ascii, and use byte > arrays instead of strings. There are functions for dealing with byte > arrays that work just like the similar strings, ie midb, rightb, etc. > > How you send the two bytes depends on how the PIC receives the two > bytes. If the PIC expects the high byte first, MSB first, > then you can > simply do: > > MyByteArray = value / 256; > MyByteArray = MyByteArray & (value mod 256) ' mod or modb might be a > function, check it out. > mscomm.send MyByteArray > > This ought to work for you. Good luck! > > -Adam > I'm having > fun trying to > >get 16 bits out of VB into a PIC in two MSCOMM strings. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics