#
# brand:             Philips
# model:             SBC RU 520
# supported devices: TV, VCR
# contributed by:    Maarten ter Huurne
#
# This is a remote control in the SBC RU 500 series:
#   SBC RU 510 supports 1 device (TV)
#   SBC RU 520 supports 2 devices (TV, VCR)
#   SBC RU 530 supports 3 devices (TV, VCR, SAT)
#   SBC RU 540 supports 4 devices (TV, VCR, SAT, DVD)
# Since I have a 520, only the TV and VCR keys are in this config file.
# The 5x0 models are black, there are also 5x5 models in silver.
#
# This remote is reprogrammable; the configuration below is for the default
# configuration. The remote's manual tells you how to restore the default
# configuration if necessary.
#
# The volume +/- and mute are always sent to the TV, regardless of the
# current mode. The remote does not send some keys at all in some modes,
# for example the record button does nothing in TV mode. You can see
# whether a button is sent or not by looking at the mode selection led,
# which flashes every time a button is sent.
# 
# You can find images and the manual of this remote here:
#   http://www.ce.philips.com/
# Direct link: (not sure this will continue to work)
#   http://www.ce.philips.com/global/b2c/ce/catalog/product.jhtml?divId=0&groupId=CONVENIENCE&catId=SOUNDANDVISIONACCESSORIES_CAT&subCatId=UNIVERSALREMOTECONTROLS&productId=SBCRU520_00
#
# Note: I copied the timing settings from the "sbc-rp420" config file,
#       which was contributed by Thomas Betker.
#       The irrecord tool was unable to figure the timing settings out,
#       probably because the Hauppauge analog TV card I use (lirc_i2c
#       driver) does most of the decoding internally.
#       I also kept the key naming as close to "sbc-rp420" as possible.
#

begin remote

  name         Philips/SBC-RU-520
  bits         13
  flags        RC5|CONST_LENGTH
  eps          30
  aeps         100

  one          932  847
  zero         932  847
  plead        976
  gap          113935
# irrecord found:
# gap          199995
  toggle_bit   2

      begin codes
# regular TV codes:
	'TV/STANDBY'          0x000000000000100C    # tv/standby
	'TV/TEXT'             0x000000000000103C    # tv/text
	'TV/TT.SUSPEND'       0x0000000000001029    # tv/tt.suspend
	'TV/TT.ENLARGE'       0x000000000000102B    # tv/tt.enlarge
	'TV/SELECT'           0x000000000000103F    # tv/select
	'TV/MUTE'             0x000000000000100D    # tv/mute
	'TV/EXT'              0x0000000000001038    # tv/ext
	'TV/PROGRAM+'         0x0000000000001020    # tv/program+
	'TV/PROGRAM-'         0x0000000000001021    # tv/program-
	'TV/VOLUME+'          0x0000000000001010    # tv/volume+
	'TV/VOLUME-'          0x0000000000001011    # tv/volume-
	'TV/MENU'             0x0000000000000012    # tv/menu
	'TV/OK'               0x0000000000000017    # tv/ok
	'TV/1'                0x0000000000001001    # tv/1
	'TV/2'                0x0000000000001002    # tv/2
	'TV/3'                0x0000000000001003    # tv/3
	'TV/4'                0x0000000000001004    # tv/4
	'TV/5'                0x0000000000001005    # tv/5
	'TV/6'                0x0000000000001006    # tv/6
	'TV/7'                0x0000000000001007    # tv/7
	'TV/8'                0x0000000000001008    # tv/8
	'TV/9'                0x0000000000001009    # tv/9
	'TV/0'                0x0000000000001000    # tv/0
	'TV/DIGITS'           0x000000000000100A    # tv/digits
	'TV/RED'              0x000000000000002B    # tv/red
	'TV/GREEN'            0x000000000000002C    # tv/green
	'TV/YELLOW'           0x000000000000002D    # tv/yellow
	'TV/BLUE'             0x000000000000002E    # tv/blue
	'TV/GREY'             0x000000000000002F    # tv/grey
# shift TV codes:
	'TV/SMUTE'            0x0000000000001023    # tv/smute
	'TV/SEXT'             0x000000000000100F    # tv/sext
	'TV/SPROGRAM+'        0x0000000000000010    # tv/sprogram+
	'TV/SPROGRAM-'        0x0000000000000011    # tv/sprogram-
	'TV/SVOL+'            0x0000000000000016    # tv/svol+
	'TV/SVOL-'            0x0000000000000015    # tv/svol-
	'TV/SMENU'            0x000000000000003A    # tv/smenu
	'TV/SOK'              0x000000000000100F    # tv/sok
	'TV/S1'               0x000000000000100E    # tv/s1
	'TV/S2'               0x000000000000102E    # tv/s2
	'TV/S3'               0x000000000000102A    # tv/s3
	'TV/S4'               0x000000000000102D    # tv/s4
	'TV/S5'               0x000000000000101D    # tv/s5
	'TV/S6'               0x0000000000000018    # tv/s6
	'TV/S7'               0x000000000000000E    # tv/s7
	'TV/S8'               0x000000000000003E    # tv/s8
	'TV/S9'               0x000000000000000D    # tv/s9
	'TV/S0'               0x0000000000001022    # tv/s0
	'TV/SDIGITS'          0x000000000000100B    # tv/sdigits
# regular VCR codes:
	'VCR/STANDBY'         0x000000000000114C    # vcr/standby
	'VCR/TEXT'            0x000000000000117C    # vcr/text
	'VCR/TT.SUSPEND'      0x000000000000115D    # vcr/tt.suspend
	'VCR/TT.ENLARGE'      0x0000000000000145    # vcr/tt.enlarge
	'VCR/SELECT'          0x000000000000114F    # vcr/select
	'VCR/EXT'             0x0000000000001178    # vcr/ext
	'VCR/PROGRAM+'        0x0000000000001160    # vcr/program+
	'VCR/PROGRAM-'        0x0000000000001161    # vcr/program-
	'VCR/MENU'            0x0000000000000152    # vcr/menu
	'VCR/OK'              0x0000000000000157    # vcr/ok
	'VCR/1'               0x0000000000001141    # vcr/1
	'VCR/2'               0x0000000000001142    # vcr/2
	'VCR/3'               0x0000000000001143    # vcr/3
	'VCR/4'               0x0000000000001144    # vcr/4
	'VCR/5'               0x0000000000001145    # vcr/5
	'VCR/6'               0x0000000000001146    # vcr/6
	'VCR/7'               0x0000000000001147    # vcr/7
	'VCR/8'               0x0000000000001148    # vcr/8
	'VCR/9'               0x0000000000001149    # vcr/9
	'VCR/0'               0x0000000000001140    # vcr/0
	'VCR/DIGITS'          0x000000000000114A    # vcr/digits
	'VCR/BACKWARD'        0x0000000000001172    # vcr/backward
	'VCR/STOP'            0x0000000000001176    # vcr/stop
	'VCR/PAUSE'           0x0000000000001170    # vcr/pause
	'VCR/FORWARD'         0x0000000000001174    # vcr/forward
	'VCR/PLAY'            0x0000000000001175    # vcr/play
	'VCR/RECORD'          0x0000000000001177    # vcr/record
# shift VCR codes:
	'VCR/STEXT'           0x000000000000117D    # vcr/stext
	'VCR/STT.SUSPEND'     0x000000000000114B    # vcr/stt.suspend
	'VCR/STT.ENLARGE'     0x000000000000117A    # vcr/stt.enlarge
	'VCR/SDISPLAY'        0x0000000000001171    # vcr/sdisplay
	'VCR/SPROGRAM+'       0x0000000000000150    # vcr/sprogram+
	'VCR/SPROGRAM-'       0x0000000000000151    # vcr/sprogram-
	'VCR/SVOL-'           0x0000000000000155    # vcr/svol-
	'VCR/SVOL+'           0x0000000000000156    # vcr/svol+
	'VCR/SMENU'           0x0000000000000153    # vcr/smenu
	'VCR/SOK'             0x000000000000017D    # vcr/sok
	'VCR/S1'              0x000000000000114E    # vcr/s1
	'VCR/S2'              0x0000000000000149    # vcr/s2
	'VCR/S3'              0x0000000000000148    # vcr/s3
	'VCR/SBACKWARD'       0x0000000000001165    # vcr/sbackward
	'VCR/SSTOP'           0x0000000000000171    # vcr/sstop
	'VCR/SPAUSE'          0x0000000000001169    # vcr/spause
	'VCR/SFORWARD'        0x0000000000001166    # vcr/sforward
	'VCR/SPLAY'           0x0000000000000170    # vcr/splay
      end codes

end remote
