Appendix b, Background – BNC 630 User Manual

Page 88

Advertising
background image

83

Appendix B

Television Remote Control Example

This chapter contains an example program written in Microsoft QuickBasic for controlling the 630 remotely. It is used here to drive
an infrared LED to issue commands to a TV or a VCR. It uses the 630 in Burst mode to emulate the same waveforms used in many
infrared remote control transmitters.

Background

Many TV remote controls operate by flashing an infrared LED at a carrier frequency rate in the ultrasonic frequency band (usually
30-40 KHz). Short bursts of these pulses are used to form various remote control commands to command the TV power on or off,
change the channel, etc. Often it is the number of bursts which determines which command is which.

Some TV's and VCR's count the number of pulses to distinguish between commands. The pulse sequence for a TV receiver was
determined by examining the signal generated by the remote control unit. An oscilloscope was used to observe the waveform across
the remote transmitter's LED. Using the oscilloscope, the carrier frequency, pulse on time, pulse off time, and number of pulses for
several commands was measured.

These parameters were then entered into the Basic program. The Basic program takes these parameters and issues commands to
the 630 to generate the same pulse train using the Burst mode of operation. A program menu asks the user which command to
generate.

Hardware Setup

You must connect a serial cable between your computer and the RS232 port connector on the rear of the 630. For more
information on how to do this, refer to chapter 6.0.

The program assumes you are using serial port 1 (COM1). If you are using another serial port, change the OPEN COM1...
statement in the beginning of this program. It also assumes that the 630 baud rate is set to 9600. To check the 630 baud rate, press
the Mode then Offset keys.

You must also wire the output of the 630 to an infrared LED. The diagram below shows how to do this. Don't forget to aim the
LED towards the device you wish to control.

3 9 0

I n f r a r e d

L E D

( A i m t o w a r d

t e l e v i s i o n )

Figure B-1: Infrared LED hookup

This program does the following:

1. Clear the screen
2. Open the serial communications port for communicating with the 630
3. Make sure there is a 630 connected to the serial port. If we can't find one, wait until it is connected up.
4. Command the 630 to enter Burst mode.
5. Set up the burst frequency, on time and off time. On time is the burst duration, off time is the burst delay.
6. Present a menu to the user asking which remote control command to issue (i.e. power on/off, change channel, etc.)
7. When a command is selected, command the 630 to generate the same number of pulses associated with the selected
command.

NOTE: This program uses the same subroutines as those listed in Appendix A.

To
SYNC Out
Connector

Advertising