Download A Case Study On Designing and Implementing IR and

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

UniPro protocol stack wikipedia , lookup

Power dividers and directional couplers wikipedia , lookup

Windows Media Center wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Rectiverter wikipedia , lookup

Transcript
A Case Study On Designing
And Implementing IR And Remote
Solutions For Windows Vista Media
Center Systems
Todd Rutherford
Program Manager
Windows eHome Division
Microsoft Corporation
Session Overview
Building an IR receiver/transceiver? Need to write a port
driver for your hardware? Then this session is for you!
Feature overview
Hardware requirements
Interface requirements
Integrating chips into motherboards
Writing a port driver – what your developer needs to know
Certifying your hardware via Windows Hardware Quality
Labs (WHQL) – overview of the tests and how to ensure
you pass
Components Of The IR Transceiver
Remote control input – 10 feet
Receives commands from remote control
Enables “Parse and Match” – ability to identify remote control
based on IR data sample
Learning – 2-3 inches
Captures IR from set-top box remote controls to retransmit
IR output (emitting) – 1 inch
Sends IR commands from PC to set top box
for changing channels
Allows media center to control TV and satellite set top boxes
System
Resume from standby
IR Receiver Hardware Requirements
Option to build either an input only IR receiver
or full function IR transceiver
Input only IR receivers can ship with tuner-less
media center systems
Full function IR transceivers required when
TV tuner card is present
IR receiver/transceiver hardware requirements
documentation available on Microsoft Connect
WLP includes requirements
Testing will be in the WDK for RC1
Port Driver Interface Requirements
Port driver provide seven services
(implemented as IOCTLs)
What are the hardware’s capabilities?
What emitters are connected?
Flash an LED that the user can see
Emit this IR
Listen for IR
Wake from lower power state
Did you wake the system?
Case Study
Integrating IR functionality
on motherboard
Glen Rockford
Director of Applications Engineering
SMSC
SIO1049 Functional Overview
Consumer IR Port
ICH / SB
LPC Bus
SIO1049
CIR Receive
CIR Emitter
IrDA
Serial Port
Parallel Port
Support for Microsoft® Windows® MCE
Consumer IR codes
Learn Mode Support including Carrier
Freq. Measurement.
4-Channel IR Emitter capability
Programmable Wakeup Event Interface
(IO_PME# Pin)
IrDA, HPSIR, ASKIR, Consumer IR
Support
Serial Ports, Multi-Mode Parallel Port,
GPIO Pins – 14
Intelligent Auto Power Management
64-pin VTQFP Package
System Block Diagram
ICH / SB
LPC Bus
Rear Panel
Emitter Jacks
SIO1049
Front Panel
CIR, Learn CIR
IN &Input
LED
1
2
3
4
5
1
2
3
4
5
6
8
2x4
Header
1
2
3
4
5
2x3
Header
LPC Bus
The SIO1049 is a 3.3V device
The LPC interface pins are 3.3V only
All other SIO1049 pins are 5V tolerant,
(+5.5V max input voltage may be applied)
Compliant to LPC Spec V1.1
SIO1049 Clocks And Power
Clocks
CLOCKI (14.318 MHz)
CLKI32 (32 KHz) required for CIR wake-up
Power
VCC (+3.3V nominal, V-run)
VTR (+3.3V nominal, V-standby or Vtrkl)
VSS (common digital ground)
SIO1049 Configuration
SYSOPT function is a multiplexed function
on two General Purpose IO (GPIO) pins
SYSOPT[1:0] – Four Base Address Options
Strapping option on each individual pin
latched on the trailing edge of PCI_RESET#
IR Detectors/Receivers
CIR Receiver
(Long Range,
De-Modulator)
Learn Mode
Receiver
(Wide Band)
IR Emitters
Signals
ETX[0:3] – 4 emitter transmit outputs
ED[0:3] – 4 emitter Detect inputs
ETX and ED signals are multiplexed with GPIO
pins and are configured by bios
Driver can dynamically detect
and enable/disable individual
ED
emitter channels
Emitter jacks
SJ-3524-SMT (3.5mm stereo jack)
Series current limiting
resistor recommended
on ETX (pin2)
Pull-up resistor on ED (pin3)
IR emitters
ETX
Front Panel Header
CIR Module & IR Wideband Learn Receiver
built into the front panel of the case.
2x4 (keyed) Header, 0.1” on center
Front-Panel
Header
LEARN IN
1
2
Target LED
GND
3
4
Reserved
+3.3V or +5V
Standby
5
6
+5V (extra power in S0)
optional
8
CIR Input
KEY
Rear Panel Header
In-Case or back slot I/O, 2 or 4 (opt.) Emitters
2x3 (keyed) Header, 0.1” on center
Rear-Panel
Header
Emitter Out #1, #3
1
2
Emitter Out #2, #4
Jack Detect #1, #3
3
4
Jack Detect #2, #4
GND
5
KEY
Wake Up Support
Full hardware support
Specific Key (unique key)
Key Class (supports more than one key)
PME Wake-Up from sleep states S3, S4,
and S5
Connect IO_PME# pin to the south bridge
Standby voltage always on
32Khz free running clock to CLKI32
BIOS configuration required
BIOS Porting Considerations
GPIO pin configuration
CIR block (block of 8 I/O registers), 1 IRQ
Emitter block (block of 8 I/O registers), shares
IRQ with CIR block
Configure run-time registers for wake-up
(block of 16 I/O registers)
BIOS and/or driver can configure wake key
Configure legacy blocks (Serial, Parallel, SIR/FIR)
– not required for CIR
SIO1049 BIOS porting guide available
now under NDA
Writing A Port Driver
Peter Viscarola
Consulting Partner
OSR Open Systems
Resources, Inc.
Media Center CIR Environment
User-Mode
Media Center Components
User Mode
Kernel Mode
KBDHID
HIDIR
CIRClass
USBCIR
3rd Party
CIR Port
USB stack
Supporting
Driver Stack
(as required)
Existing
Microsoft
USB-Based Remotes
3rd Party
CIR Hardware
Device Object Relationships
CIR Class is root enumerated
Port drivers are independent
function drivers
CIRCLASS
ROOT
SMSC
Port
Enumeration is H/W specific
Power policy owner
Binding with CIRCLASS at runtime
All information exchanges initiated
by IOCTLs from port driver
FDO
ACPI
PDO
Port/Class Binding Process
Port driver
Invokes CirCoInst co-installer during installation to
ensure CIRCLASS is running
Registers GUID_DEVINTERFACE_IRPORT
device interface
Enables device interface when ready to start
processing requests
CIRClass
Receives device interface notification
Sends IOCTL_IR_HANDSHAKE to port driver
Port driver
Receives IOCTL_IR_HANDSHAKE from CIRClass
Synchronously completes IOCTL with success
Example Data Exchange
IR Data Receive Process
3 Port driver
completes request when:
(a) Buffer Full
(b) End of key press
sequence (timeout)
CIRCLASS
1 Class driver sends
IOCTL_IR_RECEIVE
IR_RECEIVE_PARAMS
DataEnd
ByteCount
2 Port driver fills in
IR_RECEIVE_PARAMS
structure (in input buffer)
with RLC-coded
received data
Data
[ByteCount]
SMSC
Port
Data Format
RLC Coding
Standard format for Class/Port data exchange
Sequence of LONG (signed) values returned
in buffer indicating pulse state
Negative value: Time signal low
Positive value: Signal high
500 usec
200 usec
150 usec
IR_RECEIVE_PARAMS
DataEnd
0x0001
ByteCount
0x0010
Data
0x01F4
0xFF38
0x0096
0xFF38
200 usec
Other Class/Port Functions
IOCTL_IR_RECEIVE
IOCTL_IR_TRANSMIT
IOCTL_IR_PRIORITY_RECEIVE
IOCTL_IR_HANDSHAKE
IOCTL_IR_FLASH_RECEIVER
IOCTL_IR_GET_DEV_CAPS
IOCTL_IR_GET_EMITTERS
IOCTL_IR_GET_WAKE_SOURCE
IOCTL_IR_RESET_DEVICE
IOCTL_IR_ENTER_PRIORITY_RECEIVE
IOCTL_IR_EXIT_PRIORITY_RECEIVE
IOCTL_IR_USER_CLOSE
IOCTL_IR_USER_OPEN
Finally
What Did We Learn?
The new CIR Class/Port structure works
and is easy to implement
KMDF works amazingly
well – no power management code required
The driver’s at the bottom of the hill,
and everything flows down on it:
Hardware design issues, BIOS
integration, software integration
Certifying IR Receivers
Validate Hardware passes the documented
hardware requirements
Sample IR database sent to and from
hardware to validate input, learning and IR
emitting paths
All IOCTL’s are verified for valid responses
Call To Action
Begin designing and building IR receiver
hardware for Windows Vista featuring
Media Center
Determine the best place to integrate the
functionality into your hardware platform
Review the documentation for writing a port
driver for Windows Vista featuring Media Center
available on Microsoft Connect
Review the hardware requirements for IR
transceivers and receivers
Test your hardware and port driver during
the development process
Additional Resources
Web Resources
Windows Vista Logo Program Suite
www.microsoft.com/whdc/winlogo/hwrequirements.mspx
Windows Hardware and Driver Central (WHDC)
www.microsoft.com/whdc/default.mspx
Technical Communities
www.microsoft.com/communities/products/default.mspx
Non-Microsoft Community Sites
www.microsoft.com/communities/related/default.mspx
Front Panel I/O Connectivity Design Guide
www.formfactors.org
Technical Chats and Webcasts
www.microsoft.com/communities/chats/default.mspx
www.microsoft.com/events/default.mspx
Related Microsoft Web sites
www.microsoft.com/whdc/system/platform/mediacenter/default.mspx
www.microsoft.com/whdc/driver/wdf/default.mspx
E-mail Resources
smsc.mce06 @ smsc.com – SIO1049 Data Sheet, BIOS Porting Guide &
Development/Evaluation Platform Information
irrecvr @ microsoft.com – General IR transceiver/receiver questions
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.