In SX Microcontrollers, SX/B Compiler and SX-Key Tool, PJMonty wrote: Kevin, Hex is binary is decimal. Huh? In other words, all three of those are simply different ways of expressing a number using a different base. Hex is base 16, binary is base 2, and decimal is base 10. All of that is simply stuff we humans use to make things easier to read/write/understand. When I say "sending binary data", I'm simply referring to sending 8 bits where the value of the eight bits equals the numerical value you want to send. For example, if you want to send the number 123 to your pwm board, you don't send the string "123", you send the 8 bits of data that represent the number 123. In binary, 123 = 01111011 In hex, 123 = $7B You mention sending hex in a VB program. The question is are you sending a hex string or a hex value? If it's a hex string, then when you want to send 255 you send the actual character "$" followed by "F" and followed by another "F". This would be sending the hex string "$FF". that's three bytes of data to send a single value. In addition, whatever receives that string has to decode the string an figure out what number it represents. Conversely, if you sent a hex value, you would send just one byte of data, and all eight data bits coming out of the UART have a value of 1. The device receiving it doesn't have to decode that value because it [b]is[/b] the number 255, not a string representation of it. I hoe this makes sense. It sounds like you might still be hazy on the difference between sending a string and sending a number, regardless of what base it is in. I just want to make sure it's clear before you drive yourself crazy. See the recent thread on this forum about the serial inkjet printer to see what kind of frustration you can have if you're not clear about this issue. Thanks, PeterM ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=254111#m255659 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)