An RC5 decoder and preamp controller. Written on the LPC11U24, Ported to LPC1114 and now 100% stable (January 2016)

Dependents:   AppleRemoteController_copy_Production_Version AppleRemoteController_Reference_Only

Committer:
andrewcrussell
Date:
Mon Nov 14 14:30:51 2022 +0000
Revision:
10:7a93d34a419a
Parent:
rc5codes.h@4:d900d90588d0
corrected .h file;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewcrussell 0:83d4a20e7bc7 1 /********************************* RC5 control codes ******************************/
andrewcrussell 0:83d4a20e7bc7 2 // The Philips RC5 coce consists of 14 bits delivered in bi-phase Manchester encoding from
andrewcrussell 0:83d4a20e7bc7 3 // an IR LED on the remote. This is picked up by a detector (e.g. a Vishay TSOP3741) which
andrewcrussell 0:83d4a20e7bc7 4 // outputs the demodulated bit stream as follows:-
andrewcrussell 0:83d4a20e7bc7 5 // First 2 bits are start bits - allow the detector AGC to stabilize and trigger decoding process
andrewcrussell 0:83d4a20e7bc7 6 // Third bit is the toggle bit - it remains at the same logic level as long as a key is depressed
andrewcrussell 0:83d4a20e7bc7 7 // and will change to the alternate state when the key is un/re-depressed or when a different
andrewcrussell 0:83d4a20e7bc7 8 // key is depressed
andrewcrussell 0:83d4a20e7bc7 9 // Bits 4~8 are the address bits and determine which piece of equipment is being controlled
andrewcrussell 0:83d4a20e7bc7 10 // Bits 9~14 are the command bits
andrewcrussell 0:83d4a20e7bc7 11 // As long as a key is depressed, the 14 bits will be sent by the remote controller in sequential
andrewcrussell 0:83d4a20e7bc7 12 // blocks with a 120ms delay between subsequent block transmissions
andrewcrussell 0:83d4a20e7bc7 13 // See http://en.wikipedia.org/wiki/RC-5 for the codes
andrewcrussell 0:83d4a20e7bc7 14
andrewcrussell 0:83d4a20e7bc7 15 // 0-9 NUMERIC KEYS 0 - 9 - not used in this implementation
andrewcrussell 0:83d4a20e7bc7 16
andrewcrussell 0:83d4a20e7bc7 17 // unused commands and addresses have been commented out - simply un-comment them to use them
andrewcrussell 0:83d4a20e7bc7 18 // but note that if you do this, you will have to decode them, otherwise they will just fall through
andrewcrussell 0:83d4a20e7bc7 19 // and be ignored by the decoder. Only the ones un-commented out below are active in V1.0
andrewcrussell 1:bb881a434906 20 // Note you will also need to write the associated command processor functions
andrewcrussell 0:83d4a20e7bc7 21
andrewcrussell 3:f0cd7c22ca94 22 #define STANDBY 378 // toggle power ON and OFF
andrewcrussell 3:f0cd7c22ca94 23 #define MUTE 442 // toggle output signal on and off
andrewcrussell 3:f0cd7c22ca94 24 #define VUP 464
andrewcrussell 3:f0cd7c22ca94 25 #define VDOWN 432
andrewcrussell 3:f0cd7c22ca94 26 #define SELECT_R 480 // rotates input through inputs - must depress and then release each time
andrewcrussell 3:f0cd7c22ca94 27 #define SELECT_L 272 // rotates input through inputs - must depress and then release each time
andrewcrussell 3:f0cd7c22ca94 28 #define PREAMP 479 // this is the system code identifying an Apple Remote
andrewcrussell 0:83d4a20e7bc7 29
andrewcrussell 0:83d4a20e7bc7 30
andrewcrussell 0:83d4a20e7bc7 31
andrewcrussell 0:83d4a20e7bc7 32
andrewcrussell 0:83d4a20e7bc7 33
andrewcrussell 0:83d4a20e7bc7 34
andrewcrussell 0:83d4a20e7bc7 35
andrewcrussell 0:83d4a20e7bc7 36
andrewcrussell 3:f0cd7c22ca94 37
andrewcrussell 3:f0cd7c22ca94 38
andrewcrussell 3:f0cd7c22ca94 39
andrewcrussell 3:f0cd7c22ca94 40