View Full Version : Attn: Mark Fiechtner, Ron B and anyone who knows about RS232
Mark F
October 13th, 2002, 12:55 PM
Please post a link to the spec and I'll take a look when I get a chance. Thanks.
Mark F
October 13th, 2002, 12:55 PM
First off, you may need to use a cable that only has 5 wires (CTS, RTS, TX, RX and ground) attached OR you may need to attach the incoming handshaking line to the other input handshaking lines to make this work.
Looking at the document, the handshaking doesn't appear to be "hardware" in the Microsoft definition. It is more of a custom protocol. :roll:
Steps to transmit:
Wait for the in-coming handshaking line to be low.
Raise the out-going handshaking line.
Wait for the in-coming handshaking line to be high.
Send data.
Lower out-going handshaking line.
This can be done using the serial plugin and Girder. It MIGHT even be simple to do. :D However, if you start running into timing problems or find you can't send commands back to back, you may need to go to a more complex approach. I'll describe the "easy" way first and if this doesn't work, we can talk about the more complex way. Fair enough?
First, the serial device setup: In the specific device you've defined for your AV Receiver, set the handshaking to NONE. In the TRANSMIT portion of the message definitions, turn on add terminator and make sure the field next to it has 0d in it. (this will add the 0d to the end of all the data you send) Also, make sure "translate hex->bin" is OFF.
Second, the transmit protocol: This can be done many ways. This is what *I* would try first. Make a multi-command. Name it "transmit to AV-8200". Add three serial commands to this multi-command. The first command will raise the RTS line (Change handshaking; check the "RTS on" box). The second command will send the string "@1A0" (Send data; @1A0 in the field). The third command will lower the RTS line (Change handshaking; "RTS on" box is not checked).
If you test this multi-command, it should send the Power command to your receiver. It can be generalized by sending the contents of a string variable in the second command. This would allow you to use it more as a sub-routine.
There are many reasons why this could fail. If it fails, you may have to insert small waits between the commands or, as I said before, we may need to discuss a more complex approach.
I hope this helps. :)
Mark F
October 13th, 2002, 12:55 PM
In the past, I've had problem reports where people disconnected all but the wires they were using and everything worked. I believe, in those cases, the "unused" pins had been grounded. If the unused pins are not connected (floating) in the Marantz and the cable is truely connected one-to-one, it will not matter.
I was trying to cover all of the possible errors at once. :)
Mark F
October 13th, 2002, 12:55 PM
Ben -
Radio Shack used to carry a couple of devices that helped with RS-232 comunication stuff.
One was a "box of lights" AKA the RS-232 mini-tester. :) You plug a 9-pin cable in one side and another in the other and the lights told you the state of the 7 important signals.
The other, I think, was called a "break-out box"??? Same kind of set-up with a cable in each end. BUT, it had little patch wires that you could re-arrange to suit the connections you need.
You can check out this link (http://www.airborn.com.au/rs232.html) if you want to see some good PC RS-232 wiring diagrams.
I hope this isn't just wasting bandwidth. ;)
Mark F
October 13th, 2002, 12:55 PM
There are so many things that could be making the receiver mad. :( Here are a couple.
There might be timing issues between raising RTS and sending the data since we aren't actually waiting for CTS to go high. (try inserting a small wait between the first two commands)
There might be timing issues between sending the data and dropping RTS. (try inserting a small wait between the last two commands)
If you want to make this bulletproof, it can get complicated.
As a preview:
We would use a state machine to send commands. One multi-command would save the data to be sent in a variable and raise the RTS line. Another multi-command would send the data from the variable and drop the RTS line.
The first multi-command would be called as a subroutine from every place where you want to send data to the receiver. The second would be triggered by the CTS HIGH modem event of the serial plugin.
I hope this helps. :D
Mark F
October 13th, 2002, 12:55 PM
use the serial plugin as in input device and actually wait for CTS = high to transmit.
Exactly. This *should* get rid of any timing errors you may be seeing.
Sounds like a lot of programming to eliminate an error message that doesn't matter anyways!
:D Completely up to you. :D
This program saved me thousands of dollars because ...
Make your check payable to Ron. You know these college-kids, they can always use the money. ;)
Ingo
October 13th, 2002, 12:55 PM
Mark:
Marantz mailed me the RS-232 spec for the device, and I scanned it in and posted it at http://www.slotside.com/SR8200_RS232.pdf. The second and last pages are probably most relavent.
Thanks for your help.
Ben
when using Hyperterminal, what parameters did you set?
(I'm using a German XP, so the translation of the parameters might be inaccurate...)
Bits per second: 4800
databits: 8
parity: none
stopbits:1
handshake: hardware (or maybe RTS/CTS or whatever it is called ;-))
your cable needs to support hardware handshaking (3 wires are not enough)
try to use some commands that you can be shure that something is happening... (like power on/off instead of vol+/-)
try
@1A1+ENTER
or
@1A2+ENTER
where +ENTER means that you hit the enter key ;-) (so thats 5 keypresses per command)
0x0D tells you to send a byte containing the hex value D (=13 as decimal)
good luck.
benbell
October 13th, 2002, 12:55 PM
I have the Marantz SR8200 AV receiver and its RS-232 commands (a task getting unto itself!). I am finding it impossible to have my computer (either Girder with the serial plugin that Mark F wrote or just plain Hyperterminal) to control it. However, I am controlling my LT150 perfectly with Girder and the serial plugin (thanks!).
Any suggestions? I can post the RS-232 spec here if it'll help.
Thanks,
Ben
benbell
October 13th, 2002, 12:55 PM
Mark:
Marantz mailed me the RS-232 spec for the device, and I scanned it in and posted it at http://www.slotside.com/SR8200_RS232.pdf. The second and last pages are probably most relavent.
Thanks for your help.
Ben
benbell
October 13th, 2002, 12:55 PM
Ingo:
I've tried exactly that. Nothing happens, so I downloaded a piece of software that tells me exactly what is being sent to the serial port. When I type in HyperTerm, it says that each character is "TIMING OUT". In contrast, when I send data to my LT150 or Grafik Eye (lighting control), it says "SUCCESS". The only difference is these two devices use software handshaking.
I am using a straight through connector with two DB-9 terminals. As far as I am aware, all 9 connectors are present.
What's wrong?
Ben
benbell
October 13th, 2002, 12:55 PM
Mark:
Thanks for your help. I will try your suggestion when I get home tonight. Just one question - do I have to use a 5-conductor cable? Right now I'm using a 9-conductor (all of them), and I couldn't see how the extra connections can do bad (especially if the Marantz doesn't have them connected).
Ben
benbell
October 13th, 2002, 12:55 PM
Mark:
I've just tried your suggestions to no avail. I am going to pickup a new cable tomorrow (right now I am using something I got at RadioShack labelled an "MS-DOS serial Interlink cable").
If the new cable doesn't work, I'll let you know :oops:
Ben
benbell
October 13th, 2002, 12:55 PM
Mark:
Thanks for your help! The device is now accepting RS232 commands. Just one problem: although the device executes commands I send it according to the protocol you gave above, the message "CHECK 232C" appears on the LCD display of the device. In the spec, it says that means there is a problem with the RS232 communication. Any suggestions?
Thanks again.
Ben
benbell
October 13th, 2002, 12:55 PM
Gottchya - use the serial plugin as in input device and actually wait for CTS = high to transmit. Sounds like a lot of programming to eliminate an error message that doesn't matter anyways! :D
Thanks for that suggestion, though - I may look into it if it starts bugging me.
Mark and Ron: thanks for your support - you guys are great!! This program saved me thousands of dollars because it is essentially simulating a Crestron or AMX control system in a computer I already owned.
Good luck.
Ben
benbell
October 13th, 2002, 12:55 PM
Make your check payable to Ron. You know these college-kids, they can always use the money.
...I'm one myself!
Ben
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.