Download Print this page

Parallax 28016 Manual

Ir buddy demo kit infrared control and communications

Advertisement

Quick Links

IR Buddy Demo Kit (#28016)
Infrared Control and Communications
Introduction
The IR Buddy is an intelligent peripheral that allows the BASIC Stamp to transmit and receive infrared
control codes, and communicate (send/receive data packets) with other BASIC Stamps – all through a
single I/O pin and without wires between devices. The IR Buddy has onboard IR transmit and receive
hardware, as well as a communications controller that buffers incoming signals and manages data
exchange with the BASIC Stamp.
What kind of things can be done with the IR Buddy? While the possibilities are many, here's a small list
of ideas that can be realized with an IR Buddy and the Parallax BASIC Stamp:
Device controller using a standard television/VCR remote control
Fool-proof beam interrupt detection for alarm systems
Wireless data exchange between BASIC Stamps and IR master-slave control
Packing List
Verify that your IR Buddy Demo Kit is complete in accordance with the list below:
(2) IR Buddy Control/Communications modules (#550-28016)
(5) Red LEDs (#350-00006)
(5) 470 ohm resistors (#150-04710)
Jumper wires (#800-00016)
Documentation
Note: IR Buddy demonstration software files may be downloaded from www.parallax.com.
Features
Simple, single-wire connection [bi-directional] with BASIC Stamp
3-pin male header for connection to breadboards and standard 0.1" sockets
Auto-baud detection (2400, 4800, 9600) for Stamp-to-IR Buddy communications
Transmit RC-5 remote control codes; with programmable repeat and modulation frequency
Receive RC-5 control codes; buffer up to four separate key press events
Send and receive buffered 8-byte data packets between BASIC Stamps through wireless IR link
Loopback test checks Stamp-to-IR Buddy communications connection
Low current operation: 2 mA quiescent, 20 mA when transmitting
Sleep mode reduces current to 14 uA
Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002
599 Menlo Drive, Suite 100
Rocklin, California 95765, USA
Office: (916) 624-8333
Fax: (916) 624-8003
General: info@parallaxinc.com
Technical: stamptech@parallaxinc.com
Web Site: www.parallaxinc.com
Educational: www.stampsinclass.com
Page 1

Advertisement

loading
Need help?

Need help?

Do you have a question about the 28016 and is the answer not in the manual?

Questions and answers

Summary of Contents for Parallax 28016

  • Page 1 BASIC Stamp. What kind of things can be done with the IR Buddy? While the possibilities are many, here's a small list of ideas that can be realized with an IR Buddy and the Parallax BASIC Stamp: •...
  • Page 2 BASIC Stamp should prepare to accept the codes into a variable array. The period specified in the holdoff parameter gives the BASIC Stamp time to get ready for the incoming data. Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 2...
  • Page 3 Once the IR Buddy begins transmitting the key code, it will pull the serial line low to indicate its busy state. This line can be monitored by the BASIC Stamp to prevent resetting the IR Buddy or otherwise disrupting a transmission in progress. Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 3...
  • Page 4 This command directs the IR Buddy to receive and buffer an 8-byte data packet. It is also used to signal the transfer of any data that has been buffered. This command is followed by a SERIN function. Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 4...
  • Page 5 50 milliseconds to allow the reset operation of complete. Example: LOW pin PAUSE 5 INPUT pin PAUSE 50 Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 5...
  • Page 6 GOSUB IR_Buddy_Reset PAUSE 250 ' let DEBUG window open DEBUG CLS DEBUG "IR Buddy RC-5 RX Monitor", CR DEBUG "------------------------", CR DEBUG CR FOR idx = 0 TO 3 Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 6...
  • Page 7 Timing specific; do not change. IR_Buddy_Reset: LOW IRbSIO ' signal reset PAUSE 5 INPUT IRbSIO ' release reset signal PAUSE 50 ' allow time for reset actions RETURN Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 7...
  • Page 8 396 + $8000 ' 2400 baud, open IRbBaud IRb96 BufEnd ' end of buffer System ' system code for this Stamp AllOff ' "Mute" key on Philips remote Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 8...
  • Page 9 Timing specific; do not change. IR_Buddy_Reset: LOW IRbSIO ' signal reset PAUSE 5 INPUT IRbSIO ' release reset signal PAUSE 50 ' allow time for reset actions RETURN Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 9...
  • Page 10 ' modulation freq: 30, 38 or 56 IRb96 84 + $8000 ' 9600 baud, open IRb48 188 + $8000 ' 4800 baud, open IRb24 396 + $8000 ' 2400 baud, open IRbBaud IRb96 Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 10...
  • Page 11 LOW AlarmLED ' alarm off GOTO Main Codes_Bad: errors = errors + 1 ' update error count IF (errors < ErrorLevel) THEN Main ' continue if error count okay Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 11...
  • Page 12 IR Buddies in cylindrical enclosures that are aligned with open ends facing each other from either side of the path to be monitored. Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 12...
  • Page 13 GOSUB IR_Buddy_Reset PAUSE 250 ' let DEBUG window open DEBUG CLS DEBUG "IR Buddy Loopback Test", CR DEBUG "----------------------", CR DEBUG CR DEBUG "Baud: ", CR DEBUG CR Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 13...
  • Page 14 Timing specific; do not change. IR_Buddy_Reset: LOW IRbSIO ' signal reset PAUSE 5 INPUT IRbSIO ' release reset signal PAUSE 50 ' allow time for reset actions RETURN Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 14...
  • Page 15 ' IR Buddy serial I/O TxLED ' transmitter on indicator ' -----[ Constants ]------------------------------------------------------------ IRbDataTx ' 8-byte data transmit IRbDataRx ' 8-byte data receive IRbMod ' modulation freq: 30, 38 or 56 Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 15...
  • Page 16 DEBUG CR DEBUG "Status: " ' -----[ Program Code ]--------------------------------------------------------- Build_Packet: GOSUB Clear_Buffer header = STX ' build TX packet cmd = LightLeds data1 = counter GOSUB Make_CheckSum Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 16...
  • Page 17 ' buffer and prepping to switch modes. Timing specific; do not change. IR_Buddy_Reset: LOW IRbSIO ' signal reset PAUSE 5 INPUT IRbSIO ' release reset signal PAUSE 50 ' allow time for reset actions Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 17...
  • Page 18 This will clear the reset the IR Buddy in the event of a blocked transmission path and clear any partial data from its buffer, allowing the master and slave to resynchronize with each other. Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 18...
  • Page 19 ' modulation freq: 30, 38 or 56 IRb96 84 + $8000 ' 9600 baud, open IRb48 188 + $8000 ' 4800 baud, open IRb24 396 + $8000 ' 2400 baud, open Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 19...
  • Page 20 IF (rxChkSum <> chkSum) THEN Packet_Error ' compare checksum values Process_Command: IF (cmd <> LightLEDs) THEN Packet_Error ' is command valid? LEDs = data1 ' yes, move data to LEDs Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 20...
  • Page 21 Also note that the slave does not respond unless addressed by the master. This prevents synchronization problems and allows the code to be used for multi-slave applications. In multi-slave applications, part of the data structure would be the slave address. Parallax, Inc. • IR Buddy Demo Kit (#28016) • 11/2002 Page 21...