RS-232 Control of Gateway 46" Plasma TV

Posted on 2003-10-28
Last Modified: 2013-12-25

I am attempting (with no success) to write a VB app to turn on and off a Gateway 46" plasma tv via the rs-232 serial port.

I found the manufacture specs for the RS-232 protocol if the 42" here:

It states the port settings are 9600,N,8,1
Basic Format for Command Parameters:
In order to transmit data from the computer to the plasma TV, the data must be sent in 1 byte hex format. The command code must first be sent to the plasma TV, followed by the value (in hexadecimal format).

Sample sequence to change the plasma TV's input to RGB:

Step 1:  Send 1 byte for command 91 (input select) to the plasma TV in hex format 0x91.
Step 2:  Send 1 byte for the value of the RGB input. In this example, send 0x06.
Step 3:  The plasma TV then responds to the PC with a 1 byte value to confirm the setting.
The following RS-232 remote control commands are available:
Item               Cmd  Data      Details  
Read               80    81-A7    Reads the plasma TV's current settings for command 81 through A7
Volume            81    01-64H   Set between 01-64H
Power On/Off    83    00-01    00 = Off 01 = On
Here is the code I wrote (which does not work) to turn off the TV:
    MSComm1.CommPort = 1
    MSComm1.Settings = "9600,N,8,1"
    MSComm1.PortOpen = True
    MSComm1.DTREnable = True
    MSComm1.RTSEnable = True

    MSComm1.Output = Chr$(83) & Chr$(0)
I even tried...
    MSComm1.Output = Chr$(131) & Chr$(0)
I even tried...
    MSComm1.Output = Chr$(2) & Chr$(83) &  Chr$(0) Chr$(3)
I even tried...
    MSComm1.Output = Chr$(2) & Chr$(131) &  Chr$(0) Chr$(3)

I am very frustrated with Gateway because they cant help me with this...

Please could someone give me some help? (130 points)
Thank you,
Gregory Foster
Question by:gregoryafoster

Expert Comment

ID: 9637949
Are you using a null modem cable?
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 9638121
It looks like the codes in the specs are not ascii values, but actual hex values.

Try this:

Private Sub Form_Load()
    Const power As String = "0x83"
    Const powerOff As String = "0x00"
    Const powerOn As String = "0x01"
    MSComm1.CommPort = 1
    MSComm1.Settings = "9600,N,8,1"
    MSComm1.PortOpen = True
    MSComm1.DTREnable = True
    MSComm1.RTSEnable = True

    MSComm1.Output = power & powerOn ' Turn the tv On?
    'MSComm1.Output = power & powerOff ' Turn the tv Off?
End Sub

Expert Comment

ID: 9648327
Try this also,
Private Sub Form_Load()
    with mscomm1
       MSComm1.CommPort = 1
       MSComm1.Settings = "9600,N,8,1"
       MSComm1.PortOpen = True

       MSComm1.Output = chr(131) & chr(13)
       mscomm1.output = chr(0) & chr(13) 'turn off
       mscomm1.portopen = false
    end with
End Sub

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

LVL 85

Expert Comment

by:Mike Tomlinson
ID: 9828335
Did you ever get your program to work?

Author Comment

ID: 9831554
Well, I was way off here... Gateway really came through for me... I just had to be presistant.

I got in tough with an engineer for Gateway and he had all the information I needed.
I got the program to work and it is really neat! I can control anything on the Plasma tv I want.

I wrote a program that (from a wireless laptop) using winsock to connect to the laptop connected via rs232 to the plasma tv that I can play any dvd or music from any computer (or hard drive) on the plasma. If I can help anyone with this please feel free to email me

Thanks for all of the support here!
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 9832351
Very cool.  Let us know specifically what you need help with and we can throw in our two cents.


Accepted Solution

SpazMODic earned 0 total points
ID: 10420040
PAQed, with points refunded (130)

EE Moderator

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now