17
System Software Design Colin Gatlin May 12, 2009 Western Washington University

PC Universal Remote Receiver

  • Upload
    xena

  • View
    74

  • Download
    3

Embed Size (px)

DESCRIPTION

System Software Design Colin Gatlin May 12, 2009 Western Washington University. PC Universal Remote Receiver. Supported Protocols. RC5 (Phillips) RC6 Mode 0/6 (Phillips) NEC (Japan) SIRCS 12/15/20 (Sony/PS2) NRC17 (Nokia) REC-80 (Panasonic) RECS-80 normal/extended (Phillips) JVC - PowerPoint PPT Presentation

Citation preview

Page 1: PC  Universal   Remote  Receiver

System Software Design

Colin GatlinMay 12, 2009

Western Washington University

Page 2: PC  Universal   Remote  Receiver

Supported Protocols RC5 (Phillips) RC6 Mode 0/6 (Phillips) NEC (Japan) SIRCS 12/15/20 (Sony/PS2) NRC17 (Nokia) REC-80 (Panasonic) RECS-80 normal/extended (Phillips) JVC Sharp RCA (XBOX)

Page 3: PC  Universal   Remote  Receiver

General Protocol Features Encoding

ManchesterPulse DistancePulse Width

Carrier frequency Number of information bits Packet length/width Maximum and minimum high and low pulse

duration Start and end signals

Page 4: PC  Universal   Remote  Receiver

Determining The Protocol1) Number of pulses

2) Packet length

3) Maximum zero duration within bit stream

Page 5: PC  Universal   Remote  Receiver

Determining The Protocol – cont.Pulse Count Possible Protocols Final Method

7-9 RC5 -

10-12 RC5, NRC17 Packet Length

13 RC5, NRC17, RC6Mode0, RECS-80norm, SIRCS12 Max. Low Time

14 RC5, NRC17, RC6Mode0, RECS-80ext Max. Low Time

15 NRC17, RC6Mode0 Packet Length

16 NRC17, RC6Mode0, SIRCS15 Max. Low Time

17 NRC17, RC6Mode0, JVC Max. Low Time

18 NRC17, RC6Mode0 Packet Length

19,20 RC6Mode0 -

21 RC6Mode0, SIRCS20 Max. Low Time

22 RC6Mode0, RC6Mode6 Packet Length

23,24, 26-32, 34-38 RC6Mode6 -

25 RC6Mode6, RCA Packet Length

33 RC6Mode6, NEC Packet Length

50 REC-80 -

Page 6: PC  Universal   Remote  Receiver

General Device Requirements Processor:

Cypress PSoC CY8C24894

Clock Frequency:24MHz

Memory Requirements:ROM: 6kB (2.5kB API + 3.5kB Project Code)RAM: 300B (45B API + 120B Buffer + 135B Code)

PSoC Block Requirements:2 Digital Blocks1 Analog Continuous Time Block

Page 7: PC  Universal   Remote  Receiver

Kernel

Cooperative Timeslice Kernel Shortest IR pulse:

158μs

Timeslice Period: 100μs

3 main operations:Store IR bit streamDecode bit streamUSB communication

Page 8: PC  Universal   Remote  Receiver

TimeSlicer() Requires an 8-bit Timer (1 digital block)

to generate an interrupt every 100μs. TimeSlicer() polls a variable, blocking

until the variable is non-zero. Execution Time:

<1μs Execution Period:

100μs (Periodic) CPU Load:

1%

Page 9: PC  Universal   Remote  Receiver

StoreIR() Requires a comparator (1 analog

continuous time block). Comparator output connected through an inverter to the Enable of an 8-bit Counter (1 digital block).

Stores the appropriate bit in the next position of the buffer.

Counts pulses and maximum consecutive zero reads.

Determines the end of an IR signal and initiates the decode process.

Page 10: PC  Universal   Remote  Receiver

StoreIR() - continued

Execution time (max): 15μs Execution period: 100μs (Periodic) CPU Load: 15%

Page 11: PC  Universal   Remote  Receiver

DecodeIR() Determines the IR protocol from specific

features of the stored bit stream.Number of pulsesPacket lengthMaximum consecutive zero reads

Decodes the bit stream accordingly. Execution time (max): 40μs Execution period (min): 30ms (Sporadic) CPU Load:

0.133%

Page 12: PC  Universal   Remote  Receiver

USB

4 Transfer TypesControlBulkInterruptIsochronous

Only host can initiate a transfer

Page 13: PC  Universal   Remote  Receiver

USBComm()

Uses Cypress API to communicate to a host USB device.

Uses IN interrupt transfers to send the decoded data to the host.

Execution time (max): 60μs Execution period (min): 30ms (Sporadic) CPU Load:

0.2%

Page 14: PC  Universal   Remote  Receiver

CPU Load

DecodeIR() and USBComm() always run on adjacent slices.

Max execution time per slice:1μs + 15μs + 60μs = 76μs

Max CPU Load:1% + 15% + 0.133% + 0.2% = 16.33%

Page 15: PC  Universal   Remote  Receiver

ModulesModule Name API Functions

Timer8 Timer8_Start()Timer8_EnableInt()

CMPPRG(Comparator)

CMPPRG_Start()

Counter8 Counter8_Start()Counter8_bReadCounter()

USBFS USBFS_Start()USBFS_SetPowerStatus()USBFS_bGetConfiguration()USBFS_bGetEPState()USBFS_LoadInEP()

Page 16: PC  Universal   Remote  Receiver

Requesting A USB Transfer1) PC application uses Windows API

2) User-mode custom driver sends IRP to kernel-mode USB host driver

3) Host initializes the transfer on the bus

4) Response returned, either new data or no data

Page 17: PC  Universal   Remote  Receiver

Requesting A USB Transfer – cont.