B&K 4071 user manual Appendix B, Television Remote Control Example, Background, Hardware Setup

Models: 4071

1 88
Download 88 pages 40.73 Kb
Page 82
Image 82
Appendix B

Appendix B

Television Remote Control Example

This chapter contains an example program written in Microsoft QuickBasic for controlling the 4071 remotely. It is used here to drive an infrared LED to issue commands to a TV or a VCR. It uses the 4071 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, and 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 4071 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 RS-232 port connector on the rear of the 4071. 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 4071 baud rate is set to 9600. To check the 4071 baud rate, press the Mode then offset keys.

You must also wire the output of the 4071 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.

To

3 9 0

 

SYNC Out

 

Connector

 

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 4071

3.Make sure there is a 4071 connected to the serial port. If we can't find one, wait until it is connected up.

4.Command the 4071 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 4071 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.

77

BK Precision 4071 User Manual Rev.2.2

Page 82
Image 82
B&K 4071 user manual Appendix B, Television Remote Control Example, Background, Hardware Setup, I n f r a r e d L E D