• PicŪ Basic


  • Sky Digibox Remote and Open Keyboard Decoder

    By: Stephen Muchow

    This program performs a decode of the BSkyB 'Open' keyboard and BSkyB Remote Control Handsets. I use a PICŪ 16F877 chip running at 4MHz in the Proton Mk2 development board.( SkyKeyboard.bas ). Here is a second version developed for the Proton_IR development board ( SkyIRDEV.BAS )
    I worked out the delay times using a 20 MHz Oscilloscope and also by using Timer1 to measure the pulse widths. The delay times for a Sky Remote Control Handset appear to be a bit longer.
    I measured the average 1/2 bit times as:
    • 410 microseconds for the Keyboard.
    • 420 microseconds for the Remote Control Handset
    The pulses do not appear to have a 50:50 duty cycle and I have found that the initial delay I used could vary from 1880 microseconds to as much as 2100 microseconds with reliable results. However, the half bit delay time only worked when set to 410 microseconds for the keyboard and 420 microseconds for the remote control handset.
    NB: When using the keyboard or remote - beware of pressing the "TV/Sat" button as this changes the keyboard protocol from sky digibox to tv and I have not programmed this yet so I ignore the TV codes.
    The program outputs to the Serial Terminal at 9600 baud. It gives the source (K=Keyboard or R=Remote) and decimal value of the command received. e.g. means Keyboard Command 101 and means Remote Control Handset Command 0.It also flashes the LEDs with the Command Value.
    The structure of the command codes is as follows:
    Quiescent ..1111110 Signal High - Wait until pin goes low.
    Preamble 00000 Wait 5 x 410us = 2050us, effectively skipping over the preamble.
    Header or Device ID 0011 0101 0110 1100 $35 6C.
    Unused by BSkyB 1010 1010 1010 1010 1010 1010 $AA AA AA Manchester Encoding, %10 = 0 and %01 = 1, i.e. all Zeroes.
    Command Value 1010 1010 1010 1010 $AA AA Manchester Encoding $AAAA = %00000000 e.g. Key 0 on Remote.
    Quiescent 11111111.......... Signal High - approximately 120 milliseconds between each command.
    So the Coded Command consumes 7 bytes (56 bits following preamble) which we will read and store in the 7 byte
    buffer area before Parsing.
    Try it. Not the most efficient but it works. Now I'm going to write the tramsmitter. My objective is then to combine this with an RF transmitter/receiver pair and build a remote control for the Sky Digibox accessible from anywhere in the house.
    Any other suggestions for its use would be most welcome.
    November 2003
  • Recent Activity

    John Drew-26

    Microsoft security essentials blues

    Thread Starter: shantanu@india

    Hi, A strange thing happened just now.My Windows 7 Micrsoft Sercurity Essentials suddenly gave a warning that prplus.exe(Compiler) is a potential...

    John Drew Yesterday, 08:55 Go to last post
    John Lawton-121

    SPI mssp

    Thread Starter: picprotonguy

    Just ordered Digital to Analog IC MCP4822 with SPI interface and immediately opened proton manual. I'm very disappointed, it looks like Proton...

    John Lawton Yesterday, 11:32 Go to last post
    John Drew-26

    IR Sensor Codes in Proton IDE

    Thread Starter: Mesgu

    Hello guys can someone help me plsssss... How to write a codes for IR sensor in proton ide? given: Transmitter = portb.1 Receiver = portb.0 Led...

    John Drew Today, 03:12 Go to last post
    picprotonguy-1827

    working weird

    Thread Starter: rverm

    Device = 18F2220 Xtal 4 TRISA = 111 TRISB = 0 TRISC = 0 Declare CCP1_Pin PORTC.2 ' Select Hpwm port and bit for CCP1 module. 'Declare CCP2_Pin...

    picprotonguy Yesterday, 08:03 Go to last post
    mhanley-1294

    18F47J13 or 18F47J53 Definition Files

    Thread Starter: mhanley

    Hi, I want to use either the 18F47J13 or 18F47J53 but Proton does not have a definition file for either micro. I need the extra program...

    mhanley Yesterday, 09:57 Go to last post