HEX to binary
dosmith
Posts: 15
I'm trying to program to the serial port of a Kramer VP-23 switcher. The manual indicates that is uses four bytes of information at 9600, no parity, 8 data bits and 1 stop bit. The code I'm trying to send (according to the manual is : 01, 82, 83, 81. What does the format of the SEROUT command on pin 7 look like? I'm told from the manufacturer that the box only understands binary. Thanks.
Comments
Which STAMP are you using (it's relevant)?
·· The Editor Help File shows the syntax and examples of using the SEROUT command.· Essentially it would be:
SEROUT DPin, Baud, [noparse][[/noparse]01, 82, 83, 81]
If the device normally plugs into a computer and is RS-232 level then you may not be able to send directly to it from an I/O pin.· If you are the baud rate may need to be inverted.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
SEROUT 7,16468[noparse][[/noparse]01,81,83,81]. I've also tried using 84 for the baud settings. Someone also suggested the need for a CR in order for this to work. Thanks for any additional input.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
In any case, if the values in the documentation are hex, they should be prefixed with a '$' in the code.
Edit: I just downloaded the VP-23 manual and they are indeed hex, so the '$' is necessary.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
Post Edited (SSteve) : 6/16/2006 8:32:32 PM GMT
·· Is the manual in a PDF format you can post, or perhaps provide a link?· If I had·it, I too could offer better assistance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
·· Thanks...Interesting...It looks pricey!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
So, is P7 connected to an RS232 converter or what?
·
And what is it that the programming connector is connected to?
Is the program connector connected to this Kramer-thing?
I would like to see a diagram of the set-up/s.
Your comments should also specify what pins 1-7 connected to. It would make it a lot easier for others (read: the people trying to help you on this forum ) to figure out the code.
That's almost guaranteed to not do what you want. You shouldn't be modifying the index variable inside a FOR/NEXT loop unless you're doing it for a very specific reason. You probably meant this:
Note that I removed the unneeded CLOOP = 1 statement before the loop.
It's hard to guess what else might be causing the problem. Maybe you should try a simpler program just to see if you're communicating at all.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
·· No, there are no conversions being done.· A microcontroller can only understand binary.· While the Stamp Editor will allow you to refer to values in DEC or HEX or BINARY the data is always in binary form in the memory, no matter what.· It's how you choose to display it that affects it.· So when it's sent out it's in its native form without conversion.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com