Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "System Software Design Colin Gatlin May 12, 2009 Western Washington University."— Presentation transcript:

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

2 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)

3 General Protocol Features  Encoding Manchester Pulse Distance Pulse Width  Carrier frequency  Number of information bits  Packet length/width  Maximum and minimum high and low pulse duration  Start and end signals

4 Determining The Protocol 1) Number of pulses 2) Packet length 3) Maximum zero duration within bit stream

5 Determining The Protocol – cont. Pulse CountPossible ProtocolsFinal Method 7-9RC5- 10-12RC5, NRC17Packet Length 13RC5, NRC17, RC6Mode0, RECS-80norm, SIRCS12Max. Low Time 14RC5, NRC17, RC6Mode0, RECS-80extMax. Low Time 15NRC17, RC6Mode0Packet Length 16NRC17, RC6Mode0, SIRCS15Max. Low Time 17NRC17, RC6Mode0, JVCMax. Low Time 18NRC17, RC6Mode0Packet Length 19,20RC6Mode0- 21RC6Mode0, SIRCS20Max. Low Time 22RC6Mode0, RC6Mode6Packet Length 23,24, 26-32, 34-38RC6Mode6- 25RC6Mode6, RCAPacket Length 33RC6Mode6, NECPacket Length 50REC-80-

6 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 Blocks 1 Analog Continuous Time Block

7 Kernel  Cooperative Timeslice Kernel  Shortest IR pulse: 158μs  Timeslice Period: 100μs  3 main operations: Store IR bit stream Decode bit stream USB communication

8 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%

9 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.

10 StoreIR() - continued  Execution time (max): 15μs  Execution period: 100μs (Periodic)  CPU Load: 15%

11 DecodeIR()  Determines the IR protocol from specific features of the stored bit stream. Number of pulses Packet length Maximum consecutive zero reads  Decodes the bit stream accordingly.  Execution time (max): 40μs  Execution period (min): 30ms (Sporadic)  CPU Load: 0.133%

12 USB  4 Transfer Types Control Bulk Interrupt Isochronous  Only host can initiate a transfer

13 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%

14 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%

15 Modules Module NameAPI Functions Timer8Timer8_Start() Timer8_EnableInt() CMPPRG (Comparator) CMPPRG_Start() Counter8Counter8_Start() Counter8_bReadCounter() USBFSUSBFS_Start() USBFS_SetPowerStatus() USBFS_bGetConfiguration() USBFS_bGetEPState() USBFS_LoadInEP()

16 Requesting A USB Transfer 1) 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

17 Requesting A USB Transfer – cont.


Download ppt "System Software Design Colin Gatlin May 12, 2009 Western Washington University."

Similar presentations


Ads by Google