Keyboard Controller using MSP430 - TI.com
Transcript of Keyboard Controller using MSP430 - TI.com
Boo
ster
pack
-typ
e C
onne
ctor
Keyboard Matrix
MSP430G2744
I2C
USBLDO
TPS73533
DVCC
5V
3.3V
GPIOs
GP
IOs and P
eripherals
UART
SPI
ADC
Timers
GPIOs
3xLED
s
GP
IOs
Boo
ster
pack
-typ
e C
onne
ctor
Keyboard Matrix
MSP430F5529
I2C
USB LDOTPS73533
DVCCLDO
5 V
5 V
3.3 V
3.3 V
GPIOs
US
B
GP
IOs and P
eripherals
UART
SPI
ADC
Timers
GPIOs
3xLED
s
GP
IOs
1TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Luis Reynoso
TI Designs: Reference DesignsKeyboard Controller using MSP430
TI DesignsTI Designs provide the foundation that you needincluding methodology, testing and design files toquickly evaluate and customize and system. TIDesigns help you accelerate your time to market.
Design Resources
TIDM-KEYBOARD Design FolderMSP430F5529 Product FolderMSP430G2744 Product FolderTPS73533 Product FolderTPD2E001 Product Folder
ASK Our Analog ExpertsWEBENCH® Design Center
Design Features• Low-power implementation• Cost-effective• Customizable for different keyboard layouts• Supports different communication interfaces
(USB and I2C examples included)• Supports multimedia keys• "Ghost" key detection• Composite USB allows users to send
custom data through HID-datapipe
Featured Applications• PC Keyboards• Gaming• Sensor Hub Aggregation• Smart TV
Block Diagram
System Description www.ti.com
2 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and otherimportant disclaimers and information.
1 System DescriptionThis reference design describes the implementation of a keyboard controller with the followingcharacteristics:• Supports standard matrix keyboards: this design shows an implementation using a 15x8 matrix but
different keyboard layouts can be used• Independent of the communication interface: examples for USB and I2C are included• HID compliant: can interface directly with PC using USB or HID Over I2C.• “Ghost” key handling in software: prevents incorrect key detection from multiple simultaneous key
presses• HID boot protocol support: allows keyboard to be used to interface with a PC’s BIOS• Supports multimedia keys: common multimedia and power keys are implemented• Low power consumption: device goes to low power mode when idle• Composite USB device: an HID-datapipe back-channel is implemented to send custom data to the PC• Can be implemented in practically any MSP430 platform: examples for MSP430F5529 and
MSP430G2744 are included
1.1 MSP430 Family of MicrocontrollersThe Texas Instruments MSP430 family of ultra-low-power microcontrollers consists of several devicesfeaturing different sets of peripherals targeted for various applications. The architecture, combined withextensive low-power modes, is optimized to achieve extended battery life in portable measurementapplications. The device features a powerful 16-bit RISC CPU, 16-bit registers, and constant generatorsthat contribute to maximum code efficiency.
The software included in the design can be migrated to practically any MSP430 with enough GPIOs, butthe available examples are implemented for MSP430F5529 and MSP430G2744.
MPY32
TA0
Timer_A5 CC
Registers
TA1
Timer_A3 CC
Registers
TA2
Timer_A3 CC
Registers
TB0
Timer_A3 CC
Registers
RTC_A CRC16
USCI0,1
USCI_Ax:UART,
IrDA, SPI
USCI_Bx:SPI, I2C
ADC12_A
12 Bit200 KSPS
16 Channels(14 ext/2 int)
Autoscan
REF COMP_B
12 Channels
128 kB96 kB64 kB32 kB
FLASH
8 kB+2 kB6 kB+2 kB4 kB+2 kB
RAM
PowerManagement
LDOSVM/SVSBrownout
SYS
Watchdog
Port MapControl
(P4)
I/O PortsP1/P2
2x8 I/OsInterrupt
& Wakeup
PA1x16 I/Os
I/O PortsP3/P4
2x8 I/Os
PB1x16 I/Os
I/O PortsP4/P6
2x8 I/Os
PB1x16 I/Os
I/O PortsP7/P8
1x8 I/Os1x3 I/Os
PB1x11 I/Os
Full-speedUSB
USB-PHYUSB-LDOUSB-PLL
DMA
3 Channel
UnifiedClock
System
CPUXV2And
WorkingRegisters
EEM(L: 8+2)
JTAG/SBW
Interface
XIN XOUT RST/NMI DVCC DVSS VCORE AVCC AVSS
P1.x
PA PB PC PDDP,DM,PURP8.xP7.xP5.xP3.x P6.xP4.xP2.x
Note: Memory size and available peripherals and ports may vary, depending on the device.
XT2IN
XT2OUT
ACLK
SMCLK
MCLK
MAB
MDB
www.ti.com System Description
3TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
1.1.1 MSP430F5529The MSP430F552x series of microcontrollers include an integrated USB and PHY supporting USB 2.0 full-speed communication, four 16-bit timers, a high-performance 12-bit analog-to-digital converter (ADC), twouniversal serial communication interfaces (USCI), hardware multiplier, DMA, real-time clock module withalarm capabilities, and up to 63 I/O pins.
This reference design uses the MSP430F5529 derivative to show an implementation using USB or I2C,but with plenty of resources left to allow for further customization. This device is the superset of the family,with 128KB of Flash, 10KB of RAM and 63 I/Os in an 80-pin LQFP package.
Figure 1. Functional Block Diagram – MSP430F552x
Spy-Bi Wire
BrownoutProtection
WatchdogWDT+
15/16-Bit
Timer_A3
3 CCRegisters
Timer_B3
3CCRegistersShadow
Reg
USCI_A0:UART/LINIrDA, SPI
USCI_B0:SPI, 12C
32 kB16 kB8 kB
FLASH
1 kB512 kB512 kB
RAM
ADC1010-Bit
12ChannelsAutoscan
DTC
Ports P1/P2
2x8 I/OInterrupt
Capability,pull-up/down
resistors
Ports P3/P4
2x8 I/Opull-up/down
resistors
BasicClock
System
16 MHzCPU
incL 16Registers
Emulation(2BP)
JTAGInterface
XIN XOUT
VCC VSS P1.x/P2.x P3.x/P4.x
ACLK
SMCLK
MCLK
MAB
MDB
2x8 2x8
RST/NMI
System Description www.ti.com
4 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
1.1.2 MSP430G2744The MSP430G2x44 series is an ultra-low-power mixed signal microcontroller with two built-in 16-bit timers,a universal serial communication interface (USCI), 10-bit analog-to-digital converter (ADC) with integratedreference and data transfer controller (DTC), and up to 32 I/O pins. Typical application include sensorsystems that capture analog signals, convert them to digital values, and then process the data for displayor for transmission to a host system. Stand-alone radio-frequency (RF) sensor front ends are another areaof application.
This reference design also uses the MSP430G2744 to show an I2C implementation using a smallerdevice from the value-line family of MSP430 microcontrollers. This device is the superset of theMSP430G2x44 family with 32KB of Flash, 1KB of RAM and is available in 40-QFN, 38-TSSOP and theultra-small 49-DSBGA package for space constrained application.
Although this implementation is more limited in resources, some pins and enough memory is available forfurther customization.
Figure 2. Functional Block Diagram – MSP430G2x44
Boo
ster
pack
-typ
e C
onne
ctor
Keyboard Matrix
MSP430G2744
I2C
USBLDO
TPS73533
DVCC
5V
3.3V
GPIOs
GP
IOs and P
eripherals
UART
SPI
ADC
Timers
GPIOs
3xLED
s
GP
IOs
Boo
ster
pack
-typ
e C
onne
ctor
Keyboard Matrix
MSP430F5529
I2C
USB LDOTPS73533
DVCCLDO
5 V
5 V
3.3 V
3.3 V
GPIOs
US
B
GP
IOs and P
eripherals
UART
SPI
ADC
Timers
GPIOs
3xLED
s
GP
IOs
www.ti.com System Description
5TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
1.2 TPS73533The TPS735xx family of low-dropout (LDO), low-power linear regulators offers excellent AC performancewith very low ground current. High power-supply rejection ratio (PSRR), low noise, fast start-up, andexcellent line and load transient response are provided while consuming a very low 46µA (typical) groundcurrent. The TPS735xx is stable with ceramic capacitors and uses an advanced BiCMOS fabricationprocess to yield a typical dropout voltage of 250mV at 500mA output. The TPS735xx uses a precisionvoltage reference and feedback loop to achieve overall accuracy of 2% (VOUT > 2.2V) over all load, line,process, and temperature variations. It is fully specified from TJ = –40°C to +125°C and is offered in low-profile, 2mm × 2mm SON and 3mm × 3mm SON packages that are ideal for wireless handsets, printers,and WLAN cards.
This reference design uses the TPS73533 regulator to convert 5V from USB to 3.3V used by the MSP430microcontrollers.
2 Block Diagram
Figure 3. Block Diagram using MSP430F5529
Figure 4. Block Diagram using MSP430G2744
Esc~
`F5 Tab F1 F2
CAPS
LOCKF6
F11NumLock
F12ScrLock
F8Mute
Q F4F3
Wireless!
1F7
Insert DeletePageUpHome
PageDnEnd
Î Bright-
ÐVol-
ÍBright+
F10 F9Back
space
#
3
@
2
ÏVol+
ScreenPause
{
[P
^
Z
:
;
?
/
>
.
Right
Ctrl
Left
Ctrl
Right
Shift
Left
Shift
+
=
}
]Enter Menu
_
-
)0
O I L K<
,M
(
9
*
8U Y J N B
|
\
&
7
^
6T H G V C Space
%
5
$
4R E F D X
Right
Alt
Left
Alt
Win
W S A Z Fn
KSO0
KSO1
KSO2
KSO3
KSO4
KSO5
KSO6
KSO7
KSO8
KSO9
KSO10
KSO11
KSO12
KSO13
KSO14
KSI0 KSI1 KSI2 KSI3 KSI4 KSI5 KSI6 KSI7
System Design Theory www.ti.com
6 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
3 System Design Theory
3.1 Key MatrixThe keyboard controller presented in this document implements a key matrix of rows and columns similarto smaller keypads like the one shown in the application report Implementing An Ultralow-Power KeypadInterface with MSP430 (SLAA139).
The implementation shown uses a 15 rows x 8 column matrix, which allows up to 120 keys, but it onlyuses 84 keys in total.
The key matrix used implemented in this example is shown in Figure 5.
Figure 5. Key Matrix
Esc Tab F1
F11 Q F4
Enter
_-
I L
S A
KSO0
KSO1
KSO7
KSO8
KSO14
KSI0 KSI3 KSI4...
.
.
.
.
.
.
...
KSO0
KSO1
KSOn
...
KS
I 0
KS
I 1
KS
I n
...
VCC
www.ti.com System Design Theory
7TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Each key works like a switch and pull-ups are required for each of the columns (KSI pins), keeping the idlestate high (see Figure 6).
Figure 6. Keyboard Schematic Model
There are multiple ways to scan a key matrix, but this implementation uses two methods, referred in thisapplication report as: column-interrupt and polling.
In the column-interrupt approach, all KSO pins are actively driven at the same time and KSI pins areconfigured to interrupt the processor when any key is pressed.
This method is useful in low-power modes, because any key can wake up the microcontroller; however, itis important to remark that the key press is only used for that purpose, because this method does notprovide the exact key being pressed.
Figure 7 shows the key matrix behavior when the “Enter” Key is pressed in column-interrupt mode.Pressing this key will close a path between KSO7 and KSI3, thus causing a state change in KSI3. This isshown by red lines which indicate the lines which are not in an idle state. Notice that KSI3 would detectthe event when the “Enter” key is pressed, but the effect would be the same for any other pin pressed inthe same column.
Figure 7. Detection of a Key Using Column-Interrupt Method
After the system is awake due to a key press using the column-interrupt approach, the Polling method canbe used to determine which key(s) is (are) being pressed.
In the Polling method, each row is scanned separately by driving one KSO at a time in sequential order.KSI pins are then read giving the exact keys being pressed.
The following image shows the result of pressing the same “Enter” key in Polling method. When KSO7 isdriven, the pressed key will close a path between KSO7 and KSI3. Since all the other KSO pins are idle,we know that the key has coordinates (KSI3, KSO7).
Esc Tab F1
F11 Q F4
Enter
_-
I L
S A
KSO0
KSO1
KSO7
KSO8
KSO14
KSI0 KSI3 KSI4...
.
.
.
.
.
.
...
1. I, L and S keys are pressed
Esc Tab F1
F11 Q F4
Enter
_-
I L
S A
KSO0
KSO1
KSO7
KSO8
KSO14
KSI0 KSI3 KSI4...
.
.
.
.
.
.
...
2. Driving KSO8 detects I and L
Esc Tab F1
F11 Q F4
Enter
_-
I L
S A
KSO0
KSO1
KSO7
KSO8
KSO14
KSI0 KSI3 KSI4...
.
.
.
.
.
.
...
3. Driving Row14 detects S but it incorrectly detects A
Esc Tab F1
F11 Q F4
Enter
_-
I L
S A
KSO0
KSO1
KSO7
KSO8
KSO14
KSI0 KSI3 KSI4...
.
.
.
.
.
.
...
System Design Theory www.ti.com
8 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Note that KSI pins are in idle state when the rest of KSO pins are driven since all the switches are openand there is no path between KSO and KSI pins.
Figure 8. Detection of a Key Using Polling Method
3.1.1 "Ghost" Key DetectionOne of the caveats when using the polling method is that particular patterns can cause unwantedconnections, known as “ghost” keys. This behavior is caused when three or more keys sharing rows andcolumns are pressed at the same time.
The following image shows a “ghost” key condition caused by pressing 3 keys at a time.
Figure 9. Ghost Key Detection
The software included in this application report detects potential “ghost” keys and does not report them tothe host.
In addition, the software also detects unimplemented keys which can’t cause “ghost” keys, even when 3keys are pressed at the same time. This condition is shown in the following image.
Esc Tab F1
F11 Q F4
Enter
_-
I L
S A
KSO0
KSO1
KSO7
KSO8
KSO14
KSI0 KSI3 KSI4...
.
.
.
.
.
.
...
1. Q, F4 and Enter keys are pressed
Esc Tab F1
F11 Q F4
Enter
_-
I L
S A
KSO0
KSO1
KSO7
KSO8
KSO14
KSI0 KSI3 KSI4...
.
.
.
.
.
.
...
2. Driving KSO1 detects Q and F4
Esc Tab F1
F11 Q F4
Enter
_-
I L
S A
KSO0
KSO1
KSO7
KSO8
KSO14
KSI0 KSI3 KSI4...
.
.
.
.
.
.
...
3. Driving KSO7 detects Enter and a key in KSI4, but since KSI4 is not implemented, it only reports Enter.
www.ti.com System Design Theory
9TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Figure 10. Ignored "Ghost" Key Condition Due to Unimplemented Key
3.2 USB HIDThis application report uses the MSP430 application programming interface (API) stack found in theMSP430 USB Developers Package (msp430usbdevpack).
The stack is configured to work as a composite HID interface with the following interfaces:• HID0: Standard Keyboard• HID1: DataPipe• HID2: Consumer Control (Multimedia keys)• HID3: Wireless Radio Control
Since all interfaces are HID-compliant, no drivers are required.
Basic keyboard implementations only need the Standard keyboard interface to report keys to the host andcontrol the keyboard LEDs.
The DataPipe interface is optional but it allows the MSP430 to not only perform the job of a digitalkeyboard, but also to do other jobs taking advantage of the same USB interface and the rest of theperipherals. Some examples include: reporting the status of sensors which are read using the ADC,controlling actuators using timer PWMs, etc.
It should be noted that while the host OS interprets and uses the data from the standard keyboardinterface without additional applications or drivers, in the case of the DataPipe interface, a host applicationis required. Texas Instruments provides a Java-based HID Demo which enables communication betweena PC and a MSP430 microcontroller running the HID API stack. The Java HID Demo is available inexecutable format and source code in the MSP430 USB Developers Package (msp430usbdevpack).
The Consumer Control and Wireless Radio Control interface were added to show the implementation offunction (Fn) keys. It’s important to remark that there’s some standardization for these keys, but in somecases, the implementation depends on the vendor. The function keys implemented in this software are:
System Design Theory www.ti.com
10 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Table 1. Supported Function (Fn) Keys
Key Function InterfaceFn + F8 Mute Consumer ControlFn + F11 NumLock Consumer ControlFn + F2 Scroll Lock Consumer ControlFn + UP Increase Volume Consumer Control
Fn + Down Decrease Volume Consumer ControlFn + Left Increase Brightness Consumer Control
Fn + Right Decrease Brightness Consumer ControlFn + F3 Turn ON/OFF Wireless Wireless Radio Control
The keyboard interface supports Boot protocol, which allows it to work with HID-limited hosts (such assome BIOS).
The VID and PID can be modified according to the particular application but the default code used for thisexample uses the following values:
Table 2. VID/PID Used by the Device
VID 0x2047PID 0x0401
3.3 HID over I2CThis application report uses the HIDI2C Development API for MSP430 (ti_hidi2c_msp430).
The stack is configured to work as a single HID interface with the following report IDs:• 0x01: Standard Keyboard• 0x03: Consumer Control (Multimedia keys)• 0x04: Wireless Radio Control
Since the interface is HID-compliant, no drivers are required.
Basic keyboard implementations only need the Standard keyboard report ID in order to report keys to thehost and control the keyboard LEDs.
The Consumer Control and Wireless Radio Control reports are used to show the implementation offunction (Fn) keys. It’s important to remark that there’s some standardization for these keys, but in somecases, the implementation depends on the vendor. The function keys implemented in this software areshown in Table 1.
USBGPIOsTimerOther peripherals
US
B A
PI
USB_CommonDelayTimer
MSP430 Driverlib
Report_App
Application
Hardware
Application
usbContructs
I2C
Event handlers
USB Config
HID API
hidi
2c
I2C engine
HID engine
HID reportparser
KB
D43
0
DKS (Digital keyscan)
keyboard
reporthidi2c
eventhandling
CustomHID
www.ti.com System Design Theory
11TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
3.4 SoftwareThe following figure shows the software layers for the keyboard controller:
Figure 11. Software Architecture
Software is designed in a modular way, re-using existing TI libraries and adding new modules from low-level drivers to application level.
These modules include:• Application
DescriptionMain application initializing the microcontroller and peripherals, and executing a loop checking andservicing the rest of the modules.Files: .\Projects\*\Src\main.cFlow diagram:
Process RX data
Keyboard
Application
Initialization
Comm Active?
Initialize DKS and
KBD_Report
modules
Data
received?
Attend
KBD_Keyboard task
Attend KBD_Report
module
Pending
tasks?
Sleep
Comm, Timer or
Keyboard activity?
Y
N
Y
N
Y
N
N
Y
Initialize:
Clocks,
GPIOs,
Timers,
USB/I2C
etc
System Design Theory www.ti.com
12 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Figure 12. Application Flow Diagram
www.ti.com System Design Theory
13TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
• Report_AppDescriptionThis file provides an abstraction layer between application, DKS and the communication interface.When the DKS detects a new key, it will call the callback function KBD430_ReportSend. This functioncan then send the data to the corresponding communication interface (for example, USB or I2C).Files:.\Projects\*\Src\KBD430_report_App.c
• KBD430_ReportDescriptionHandles the HID Keyboard report, adding and removing keys from the report on press/release events,then sends the data to the Report_App layer.Files:.\KBD430\Src\KBD430_report.c .\KBD430\Include\KBD430_report.hHID Keyboard Report format:
Table 3. Standard Keyboard Input Report
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0Byte0 Right GUI Right Alt Right Shift Right Ctrl Left GUI Left Alt Left Shift Left CtrlByte1 ReservedByte2 Key_array[0]Byte3 Key_array[1]Byte4 Key_array[2]Byte5 Key_array[3]Byte6 Key_array[4]Byte7 Key_array[5]
Table 4. Standard Keyboard Output Report
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0Byte0 Ignored ScrollLock CAPSLock NumLock
Table 5. Consumer Control Input Report
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0Byte0 Bright- Bright+ Play/Pause PrevTrack NextTrack Mute Vol- Vol+
Table 6. Wireless Radio Control Input Report
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Byte0 Unused WirelessToggle
Keyboard Task
KeyScanComplete?
Key pressed?
Flush Report
FnKey pressed?
Ghost keys?
Update report
Y
N
Exit
N
Y
NCheck for Function key combinations
Invalidate report
Y
Y
N
System Design Theory www.ti.com
14 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
• KBD430_KeyboardDescriptionThis layer gets the keys from the DKS module and reports them to the KBD430_Report module. It canhandle special key combinations such as Function (Fn) keys.Files:.\KBD430\Src\KBD430_Keyboard.c.\KBD430\Include\KBD430_Keyboard_public.hFlow diagram:
Figure 13. Flow Diagram for Keyboard Task
Interrupt Column mode
Polling Mode
Key press
First Scan
Wait Debounce
Second Scan
Process Keys
Wait delay
Key
det
ecte
d
No
key
No key
www.ti.com System Design Theory
15TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
• KBD430_DKS (Digital Keyscan)DescriptionThis layer handles the digital keyboard scanning, detecting key press/release events, and reportingthem to higher layers.Files:.\KBD430\Src\KBD430_DKS.c.\KBD430\Include\KBD430_DKS.hState Diagram:
Figure 14. State Diagram for Keyboard Scan
• KBD430_DelayTimerDescriptionThis module handles a general purpose interrupt timer used to implement a delay.This timer is implemented using TA0.0.Files:.\KBD430\Src\KBD430_delaytimer.c.\KBD430\Include\KBD430_delaytimer.h
System Design Theory www.ti.com
16 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
• CustomHIDDescriptionThis layer handles the HID Custom interface, which is used to transfer data to/from an USB host. Thecurrent implementation shows a template that can be used for custom development. This module usesthe HID-Datapipe as defined in the USB API included in MSP430 USB Developers Package(msp430usbdevpack).Files:.\Projects\USBKBD\Src\CustomHID.c.\Projects\USBKBD\Src\CustomHID.hCustom HID Report format:
Table 7. CustomHID Report Descriptor
Field Size DescriptionIN Report
Report ID 1 Byte Report ID (automatically assigned to 0x3F by the HID-datapipe calls)Size 1 Byte Number of valid bytes in the data fieldData 62 Bytes Data payload
OUT ReportReport ID 1 Byte Report ID (automatically assigned to 0x3F by the HID-datapipe calls)
Size 1 Byte Number of valid bytes in the data fieldData 62 Bytes Data payload
In addition, the following TI libraries used by this design are:• MSP430 DriverLib: Driver Library's abstracted API keeps you above the bits and bytes of the MSP430
hardware by providing easy-to-use function calls. Thorough documentation is delivered through ahelpful API Guide, which includes details on each function call and the recognized parameters.Developers can use Driver Library functions to write complete projects with minimal overhead.DriverLib is used in this project to initialize MSP430F5529 peripherals and perform basic functions.Files:.\driverlib\MSP430F5xx_6xx\*.*.\driverlib\MSP430F5xx_6xx\inc\*.h
• MSP430 USB Developers Package: The USB Developers Package for MSP430 is a software packagecontaining all necessary source code and sample applications required for developing a USB-basedMSP430 project. The package only supports MSP430 USB devices.The USB API is used in the USBKBD configuration to enable USB and utilize the HID class.Files:.\USB_API\*.*.\Projects\USBKBD\Src\USB_config\*.*.\Projects\USBKBD\Src\USB_App\*.*
• HIDI2C API for MSP430: Development API driver for Microsoft HIDI2C Protocol for the TexasInstruments MSP430.The HIDI2C API is used in the I2CKBD and I2CKBD_G2xx4 configurations to enable HID over I2C.Files:.\hidi2c\*.*.\Projects\I2CKBD\Src\HIDI2C\*.*.\Projects\I2CKBD_G2xx4\Src\HIDI2C\*.*
www.ti.com System Design Theory
17TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
3.5 HardwareThe hardware included in this reference design provides users with the flexibility to test and develop theirkeyboard controller application using two different microcontrollers: MSP430F5529 and MSP430G2744.
NOTE: The hardware included in this Reference Design has support for the MSP430F5529 orMSP430G2744, but it doesn’t support both devices at the same time. Populating bothdevices could cause electrical problems. Check the corresponding BOMs in Section 8.1.
The evaluation board contains the following connectors common to both board configurations:
Table 8. Connectors in Evaluation Board
Connector F5529 G2744J1 Standard 2x7 JTAG/SBW (only SBW is supported)J2 Provide external VCC and GND
J3 24-pin Keyboard connector. Check Section 4.1 for information about the keyboardused by this reference design
J4-J5Boosterpack-compatible connector.
Check Figure 15 Check Figure 16
J6 Used to power board and/orcommunication with host Used to power board
The board also includes jumpers to provide more flexibility to the developer (options in bold shows thedefault configuration):
Table 9. Jumpers in Evaluation Board
Jumper F5529 G2744
JP11-2 VUSB: Use VUSB (MSP30F5529 internal LDO) for VCC.2-3 LDO: Uses TPS73533 for VCCOFF: EXT power using J2
1-2 VUSB: Unused2-3 LDO: Uses TPS73533 for VCCOFF: EXT power using J2
JP2 ON: Provides power to MSP430OFF: Allows for power consumption measurement
JP3 ON: Enables LED3OFF: LED3 pin can be used in boosterpack connector
JP4 ON: Enables LED2OFF: LED2 pin can be used in boosterpack connector
JP5 ON: Enables LED1OFF: LED1 pin can be used in boosterpack connector
JP6 ON: Connects VUSB to JP1OFF: Disconnects VUSB from JP1 Unused
System Design Theory www.ti.com
18 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
3.5.1 Using MPS430F5529Using KBD430_BOM_F5529 from Table 19, which utilizes the MSP430F5529 microcontroller, provides alot of flexibility to developers thanks to the microcontroller’s rich set of peripherals, large memory size, andamount of available I/Os. The software included in this reference design supports the following interfaces:
Table 10. Communication Interfaces Supported forMSP430F5529
Target Configuration Communication InterfaceUSBKBD USBI2CKBD I2C
In addition, the evaluation board provides access to:• Additional communication peripherals (for example, UART and SPI): allowing developers to send the
keyboard information to the host using other methods, or simply to implement other communicationinterfaces
• Analog peripherals (ADC and analog comparator): providing flexibility to implement functions such as,reading sensors and transducers, using the same keyboard controller
• Timer input/output pins: allowing implementation of PWMs, pulse detection, custom communicationinterfaces, etc
• Ample memory resources: allowing for more complex applications, or the implementation of protocolssuch as Bluetooth
• Up to 35 GPIOs available
www.ti.com System Design Theory
19TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
The application reserves the following peripherals and pins for keyboard functionality:
Table 11. Peripherals and Pinout Used for MSP430FF529
Function Description USBKBD I2CKBDDelayTimer Low power timer delay TA0.0 TA0.0
USB Communication with hostPU.0/DPPU.1/DM
PURN/A
I2C Communication with host N/A SDA:P4.1/UCB1SDASCL:P4.2/UCB1SCL
I2C_INT Interrupt output to host N/A P1.0KSO0
Keyboard output (row)
P4.7KSO1 P5.4KSO2 P5.5KSO3 P5.6KSO4 P5.7KSO5 P6.6KSO6 P6.7KSO7 P7.0KSO8 P7.1KSO9 P7.2KSO10 P7.3KSO11 P7.7KSO12 P8.0KSO13 P8.1KSO14 P8.2KSI0
Keyboard input (column)
P2.0KSI1 P2.1KSI2 P2.2KSI3 P2.3KSI4 P2.4KSI5 P2.5KSI6 P2.6KSI7 P2.7LED1 NumLock LED P1.1LED2 CapsLock LED P1.6LED3 ScrollLock LED P1.7
BoosterPack standard KBD430-F5529 Pin map BoosterPack standardKBD430-F5529 Pin map
Timer Capture
Timer Capture GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
SPI CS Wireless
SPI CS Display
SPI CS Other
GND
GPIO (!)
GPIO (!)
GPIO
RST
SPIMOSI
MISO
GPIO (!)
GPIO (!)
GPIO (!)
PWM out
PWM out
PWM out
PWM out
PWM out
+3.3V
Analog In
UARTRX ( MCU)
TX ( MCU)
GPIO (!)
Analog In
SPI CLK
GPIO (!)
I2CSCL
SDA
+5V
Analog In
Analog In
Analog In
Analog In
Analog In
Analog In
GND
Reserved
Reserved
(!)
(!)
(!)
(!)
(!)
(!)
(!)
(!)
(!)
(!)
Used by keyboardcontrollerUsed by keyboardcontroller
+3.3V
P6.0
P1.0
P3.4
P1.1
P4.2
P6.4
P3.3
A0
UCA0SIMO UCA0TXD
UCA0SOMI UCA0RXD
UCB0CLK
UCB1SCLUCB1SOMI
UCB1SDAUCB1SIMO
(!)
(!)
TA0CLK
PM
PM
TA0.0
CB0
+5V
GND
P4.0
P4.3
UCA1CLK
A0
GND
P3.6
P1.4
P3.7
RST
P3.0
P3.5
P1.7
P1.6
P3.1
P7.6
P1.5
P7.5
P7.4
P1.3
P1.2
P4.6
P4.5
P4.4
PJ.0
TA0.3
TB0OUTH
UCB0SIMO UCB0SDA
UCB0SOMI UCB0SCL
TB0.4
TB0.3
TB0.2
TA0.4
TA0.2
TA0.1
TDO
(!)
(!)
(!)
(!)
(!)
SVMOUT
TB0.6
TB0.6
TA1.0
PMUCA1RXD
UCA1TXD UCA1SIMO PM
TA1CLK CBOUT(!)
P6.1A1CB1
P6.2A2CB2
P6.3A3CB3
P6.4A4CB4
P6.5A5CB5
P5.0A8
P5.1A9
VREF+
VREF+
VEREF+
VEREF-
ACLK
P3.2UCA0STE
UCB1STEPM
UCA1STEUCB1CLKPM
PM
UCA1SOMI
SDA*
SCL*
I2C_INT*
LED1
LED2
LED3
KBD430-F5529
(!) Denotes I/O pins that are interrupt-capable.
*Not used in USB mode
System Design Theory www.ti.com
20 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Additional pins are available in J4-J5 connectors which are Boosterpack-compatible:
Figure 15. Pinout for Boosterpack Connector using MSP430F5529
3.5.2 Using MSP430G2744KBD430_BOM_G2744 from Table 20, which utilizes the MSP430G2744 microcontroller, shows a smaller,lower-cost implementation using a value-line device, but it still provides enough flexibility to implementcustom functionality in the application.
The software included in this reference design supports the following interfaces:
Table 12. Communication Interfaces Supported for MSP430G2744
Target Configuration Communication InterfaceI2CKBD_G2xx4 I2C
In addition, the evaluation board allows developers to:• Implement a different communication interface (for example, UART or SPI) to send the keyboard
information to the host using other methods, or simply to implement other communication interfaces• The functionality of LEDs can be disabled allowing developers access to ADC pins to implement
functions such as, reading sensors and transducers, using the same keyboard controller; or to Timerinput/output pins allowing implementation of PWMs, pulse detection, custom communication interfaces,etc
• 3 GPIOs available by default, and up to 9 available if not using I2C and LEDs.
The application reserves the following peripherals and pins for keyboard functionality:
Table 13. Peripherals and Pinout Used for MSP430G2744
Pin/Peripheral Description USBKBDDelayTimer Low power timer delay TA0.0
I2C Communication with host SDA:P3.1/UCB0SDASCL:P3.2/UCB0SCL
I2C_INT Interrupt output to host P2.0
BoosterPack standard BoosterPack standard
Timer Capture
Timer Capture GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
GPIO
SPI CS Wireless
SPI CS Display
SPI CS Other
GND
GPIO (!)
GPIO (!)
GPIO
RST
SPIMOSI
MISO
GPIO (!)
GPIO (!)
GPIO (!)
PWM out
PWM out
PWM out
PWM out
PWM out
+3.3V
Analog In
UARTRX ( MCU)
TX ( MCU)
GPIO (!)
Analog In
SPI CLK
GPIO (!)
I2CSCL
SDA
+5V
Analog In
Analog In
Analog In
Analog In
Analog In
Analog In
GND
Reserved
Reserved
(!)
(!)
(!)
(!)
(!)
(!)
(!)
(!)
(!)
(!)
Used by keyboardcontroller
KBD430-G2744 Pin map
+3.3V
P2.0
P3.5
P2.1
P3.2
P3.1
P3.4UCA0SIMO UCA0TXD
UCA0SOMI UCA0RXD
UCB0CLK
UCB0SCLUCB0SOMI
UCB0SDAUCB0SIMO
(!)
(!)
A0
TAINCLK
ACLK
P3.3UCA0STE
SDA
SCL
I2C_INT
LED1
KBD430-G2744 Pin map
Used by keyboardcontroller
GND
RST
P2.3
P2.2
(!) TA1
TA0 A2(!) LED2
LED3
N/A
N/A
N/AN/A
N/A
N/A
N/A
N/A
+5V
GND
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
SMCLK A1
A3 VREF- VEREF-
N/A
N/A
N/A
N/A
N/A
N/A
KBD430-G2744
(!) Denotes I/O pins that are interrupt-capable.
www.ti.com System Design Theory
21TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Table 13. Peripherals and Pinout Used for MSP430G2744 (continued)Pin/Peripheral Description USBKBD
KSO0
Keyboard output (row)
P2.4KSO1 P2.5KSO2 P2.6KSO3 P2.7KSO4 P3.0KSO5 P3.6KSO6 P3.7KSO7 P4.0KSO8 P4.1KSO9 P4.2KSO10 P4.3KSO11 P4.4KSO12 P4.5KSO13 P4.6KSO14 P4.7KSI0
Keyboard input (column)
P1.0KSI1 P1.1KSI2 P1.2KSI3 P1.3KSI4 P1.4KSI5 P1.5KSI6 P1.6KSI7 P1.7LED1 NumLock LED P2.1LED2 CapsLock LED P2.2LED3 ScrollLock LED P2.3
Additional pins are available in J4-J5 connectors which are Boosterpack-compatible. Note that many pinsare not available because they are reserved for keyboard functions and due to the smaller package of thisdevice.
Figure 16. Pinout for Boosterpack Connector using MSP430G2744
Getting Started Hardware www.ti.com
22 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
4 Getting Started Hardware
4.1 KeyboardThis reference design uses the keyboard Acer V11102AS1, which is a replacement for some laptops,including the Acer Aspire One AO532H.
Figure 17. Keyboard used by Reference Design
The software and hardware can be customized for other keyboards as explained in Section 6.3.
www.ti.com Getting Started Hardware
23TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
4.2 Basic Connections1. Connect Keyboard to J3
Figure 18. Keyboard Connection
2. Set default jumpers according to Table 9.3. Optionally, connect I2C host when using I2CKBD or I2CKBD_G2xx4 configurations. Note that there’s
no standard connector for HID over I2C but the pins are available in boosterpack connector J4-J5 asshown in the following table:
Table 14. I2C Connections
Functions Connector.pinI2C SDA J4.20I2C SCL J4.18I2C INT J4.10
VCC J4.2GND J4.3
4. Connect USB from PC to J6. This will provide power to the board and it also allows for communicationwith the host when using USBKBD configuration.
5. The device will start running when pre-programmed. Follow steps in Section 4.3 and Section 4.4 to testthe USB or I2C applications.
6. Program board if necessary. If the MSP430 hasn’t been programmed or when debugging/customizingcode:• Connect JTAG tool (for example, MSP-FET) to J1• Follow steps described in Section 5 to build the software and download code.• Run code, or repeat steps 4-5
Getting Started Hardware www.ti.com
24 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
4.3 Testing USBKBD Configuration1. Follow steps described in Section 4.2 to execute the application2. The 3 LEDs on the board will light up in sequence to indicate that the keyboard is running
• Some LEDs can stay ON depending on the current status of CapsLock, NumLock, and ScrollLock.3. When connected to a PC, the USB keyboard should be detected by the operating system and
enumerated without drivers. Windows shows 5 new devices in the Device Manager (see Figure 19):• Human Interface Devices
– USB Input Device: Standard keyboard in HID0 (MI_00)– USB Input Device: Datapipe in HID1 (MI_01)– USB Input Device: Consumer Control in HID2 (MI_02)– USB Input Device: Wireless Radio Control in HID3 (MI_03)
• Keyboards– HID Keyboard Device: Standard keyboard in HID0 (MI_00)
Figure 19. USB Keyboard in Windows Device Manager
4. The keyboard can now be tested and used as a standard keyboard
NOTE: The example implements Function keys shown in Table 1 but it’s important to remark thatthe implementation of some of these keys varies depending on the Host.
5. In addition to the keyboard functionality, the custom interface can be tested using the MSP430 HID
g
b cd e
f
www.ti.com Getting Started Hardware
25TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Demo, available in MSP430 USB Developers Package (msp430usbdevpack).(a) Open the Java HID Demo.(b) Select the VID and PD (default: VID = 0x2047, PID = 0x0401).(c) Click “Set VID PID” button(d) Click the USB button to connect(e) The LED should turn green(f) Write one of the supported commands in the Send and Receive field
1 – Toggles LED12 – Toggles LED23 – Toggles LED3
(g) Observe the response from USB controller
Figure 20. Testing the HID Custom Interface using MSP430 HID Demo
Getting Started Hardware www.ti.com
26 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
4.4 Testing I2CKBD and I2CKBD_G2xx4 Configurations1. Follow steps described in Section 4.2 to execute the application2. The 3 LEDs on the board will light up in sequence to indicate that the keyboard is running
• Some LEDs can stay ON depending on the current status of CapsLock, NumLock, and ScrollLock.3. Turn on the I2C Host device, the device will perform enumeration of I2C slave devices during start-up.4. The keyboard should be detected by the operating system and enumerated without drivers. Windows
shows the new HID devices including the keyboard in the device manager:
Figure 21. I2C Keyboard in Windows Device Manager
www.ti.com Getting Started Firmware
27TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
5. The keyboard can now be tested and used as a standard keyboard
NOTE: The example implements Function keys shown in Table 1 but it’s important to remark thatthe implementation of some of these keys varies depending on the Host.
5 Getting Started FirmwareThe firmware included in this reference design has the following structure:
KBD430_SW|----driverlib ←MSP430 DriverLib| |----MSP430F5xx_6xx| |----deprecated| |----inc|----hidi2c ←HIDI2C API for MSP430| |----hid| |----i2c||----USB_API ←MSP430 USB Developers Package| |----USB_CDC_API| |----USB_Common| |----USB_HID_API| |----USB_MSC_API| |----USB_PHDC_API||----KBD430 ← Keyboard controller driver| |----Include ← Header files| |----Src ← Source code||----Projects| |----USBKBD ← Project supporting USB with MSP430F5529| |----CCS ← CCS project folder| |----IAR ← IAR project folder| |----Src ← Source code for this project| |----I2CKBD ← Project supporting I2C with MSP430F5529| |----CCS ← CCS project folder| |----IAR ← IAR project folder| |----Src ← Source code for this project| |----I2CKBD_G2xx4 ← Project supporting I2C with MSP430G2744| |----CCS ← CCS project folder| |----IAR ← IAR project folder| |----Src ← Source code for this project
The projects included in the software package have been built and tested in the following IDEs:• Code Composer Studio 6.0.1• IAR for MSP430 6.10.2
The procedure to build code for these IDEs is explained in the following sections.
Getting Started Firmware www.ti.com
28 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
5.1 Building Projects in IAR1. Select a project to build:
• USBKBD: USB using MSP430F5529• I2CKBD: I2C using MSP430F5529• I2CKBD_G2xx4: I2C using MSP430G2744
2. Open the IAR workspace for the corresponding project:KBD430_SW\Projects\<project>\IAR\<project>.eww
3. Build project (F7, Menu → Project → Rebuild All, or )
Figure 22. USBKBD Project in IAR
4. Connect board as described in Section 4.2
5. Download project to device (Ctrl+D, Menu → Project → Download and Debug, or )
6. Execute the program ( ) or close debugger and reset device.
www.ti.com Getting Started Firmware
29TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
5.2 Building Projects in CCS1. Select a project to build:
• USBKBD: USB using MSP430F5529• I2CKBD: I2C using MSP430F5529• I2CKBD_G2xx4: I2C using MSP430G2744
2. Import the corresponding project in CCS (Menu → Project → Import CCS Project).KBD430_SW\Projects\<project>\CSS
Figure 23. Importing USBKBD project in CCS
3. Build project (Ctrl+B, Menu → Project → Build All, or )
Getting Started Firmware www.ti.com
30 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Figure 24. USBKBD Project in CCS
4. Connect board as described in Section 4.2
5. Download project to device (F11, Menu → Run → Debug, or )
6. Execute the program ( ) or close debugger and reset device.
www.ti.com Customizing the Keyboard Controller
31TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
6 Customizing the Keyboard ControllerThe software and hardware provided in this reference design provide an easy-to-use out-of-boxexperience for demos and testing, but it also provides a starting point for developers trying to implementtheir own keyboard controller in different applications.
The following sections describe some common customizations, but many more can be implemented bydevelopers.
6.1 USB Interface Customizations
6.1.1 USB VID/PIDDevelopers can modify the VID/PID of the application in order to use their own
Instructions:1. Modify Macros USB_VID and USB_PID in:
.\Projects\Projects\USBKBD\Src\USB_config\descriptors.h
6.1.2 Crystal XT2Use a different crystal for the design.
Instructions:1. Modify USB_XT_FREQ_VALUE in:
.\Projects\Projects\USBKBD\Src\USB_config\descriptors.h
6.1.3 USB DescriptorsUSB interfaces can be modified to meet particular needs. This includes removing unwanted interfaces, oradding other interfaces such as CDC or MSC.
Instructions:1. Modify the USB descriptors in the following files:
.\Projects\Projects\USBKBD\Src\USB_config\descriptors.c/h
2. The MSP430 USB Developers Package (msp430usbdevpack) includes a USB Descriptor tool whichcan help creating descriptors for the USB API
3. Add/remove application code as necessary to support descriptors. DefinitionsUSE_CONSUMER_REPORT, USE_WRC_REPORT, and USE_CUSTOM_HID can be used to disableapplication calls to these interfaces. These definitions are in:.\Projects\Projects\USBKBD\Src\KBD430\KBD430_config.h
6.1.4 Polling IntervalThe USB interface defines the interface polling rate in the interface descriptors. This polling rate can bemodified with a direct impact on the response time of the keyboard.
Instructions:1. Modify the bInterval parameter (in ms) in the corresponding interface descriptor found in:
.\Projects\Projects\USBKBD\Src\USB_config\descriptors.c/h
Customizing the Keyboard Controller www.ti.com
32 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
6.2 HID-I2C Interface Customizations
6.2.1 I2C Slave AddressDevelopers can modify the I2C slave address of the device.
Instructions:1. Modify Macro USCIBx_ADDR in:
.\Projects\Projects\<I2CKBDproject>\Src\HIDI2C\hidi2c_settings.h
6.2.2 I2C Peripheral/PinsThe hidi2c driver can be modified to use other USCI interfaces and pins.
Instructions:1. Uncomment/comment USCIBx_XXXX macros in:
.\Projects\Projects\<I2CKBDproject>\Src\HIDI2C\hidi2c_settings.h
2. Modify appropriately:
USCIBx ← Constant definitionUSCIBx_ADDR ← Slave address used for this interfaceUSCIBx_GPIO_POUT ← Slave address used for this interfaceUSCIBx_GPIO_PDIR ← PxDIR register used for I2C_INTUSCIBx_GPIO_PIN ← PxIN register used for I2C_INTUSCIBx_PORT ← PxSEL register used to initialize I2C pins functionalityUSCIBx_PINS ← Pins used for I2C (SDA/SCL)
6.2.3 HIDI2C Report DescriptorsThe HID interface can be modified to meet particular needs of the developer. Reports can be modified,removed or added as needed.
Instructions:1. Modify the HID descriptors in the following file:
.\Projects\Projects\<I2CKBDproject>\Src\HIDI2C\keyboard_descriptors.h
2. Add/remove application code as necessary to support descriptors. DefinitionsUSE_CONSUMER_REPORT and USE_WRC_REPORT can be used to disable application use ofthese reports. These definitions are in:.\Projects\Projects\<I2CKBDproject>\Src\KBD430\KBD430_config.h
www.ti.com Customizing the Keyboard Controller
33TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
6.3 Keyboard
6.3.1 Matrix LayoutThe software can be easily adjusted to support different keyboard layouts.
Instructions:1. Obtain the key matrix for your keyboard, similar to Figure 5.2. Modify the USBKBD_scancodes_s table in the following file:
.\KBD430\Src\KBD430_ScanCodesMap.c
Each entry of this table corresponds to a key in each (column, row) in the following order:
(0,0), (0,1), (0,2), (0,3), (0,4), (0,5), (0,6), (0,7)(1,0), (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (1,7)
...(13,0), (13,1), (13,2), (13,3), (13,4), (13,5), (13,6), (13,7)(14,0), (14,1), (14,2), (14,3), (14,4), (14,5), (14,6), (14,7)
Codes are defined by USB.org HID Usage tables and they are defined in the following file:.\KBD430\Include\KBD430_HUT.h
3. hidUsageReserved must be used for unavailable keys. During keyboard initialization, the driver willcheck for unimplemented keys in order to detect “ghost” keys properly.
4. Additional entries can be added to this table for matrix arrays different from 15x8. Note that this willalso require changes to the key scan driver which are described in Section 6.3.3.
6.3.2 Function KeysThe software included in this reference design has support for function keys defined in Table 1. Theimplementation of function keys can vary, but developers can customize these keys as needed and/or addnew function keys to their implementations.
Instructions:1. Make sure the Fn key is defined as hidUsageReservedFn in the USBKBD_scancodes_s table (check
Section 6.3.1). The function CheckforFnKey() will detect when the Fn key is pressed and it will set aflag in order to handle this special case.
2. If required, modify the report descriptors to add new functions or customize existing ones (checkSection 6.1.3 and Section 6.2.3for USB and I2C respectively). The report descriptors included in thesoftware example include support for some keys defined in the Consumer Control Usage table andone key defined in the Wireless Radio Control usage table. More details of HID report descriptors canbe found in HID Usage tables.
3. Customize the keyboard response for each Function key combination. GetFnKey() includes a switch-case statement with the implementation of all key combinations. This function is located in thefollowing file:.\KBD430\Src\KBD430_Keyboard.c
Note that in some cases, the keyboard combination can simply return a new standard key:case hidUsageF11:
return hidUsageKeypadNumlock; // Fn + F11 = Num Lock
But in order cases, it will have special functionality as follows:case hidUsageF8:
return CONSUMER_KEY(0x04); // Fn + F8 = Audio Mute
The macros CONSUMER_KEY and WRC_KEY are simply used to differentiate between normal keysand special ones.
4. If implementing a report different from Consumer Control and Wireless Radio Control, add thecorresponding handlers to add and remove keys in UpdateHIDReport() and to send the report inKBD430_Report_Update(). Use the existing implementation, conditionally built usingUSE_CONSUMER_REPORT and USE_WRC_REPORT macros, as a base.
Customizing the Keyboard Controller www.ti.com
34 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
6.3.3 Keyboard Hardware ChangeThe software can be modified to support different keyboard connectors, or when porting to a differentMSP430.
Instructions:1. Define number of KSI pins (columns) and KSO pins (rows) in:
.\Projects\Projects\<I2CKBDproject>\Src\KBD430\KBD430_config.h
The number of keys resulting from multiplying KSIxKSO must be the same as the number of entries inUSBKBD_scancodes_s table (check Section 6.3.1).
2. Define the KSI port (columns) in the following file:.\Projects\<project>\Src\KBD430\KBD430_hardware.h
Note that this implementation uses a single 8-bit port to implement al columns. This allows for aneasier and faster read of the whole column at the same time and easier handling of the ISR. Thefollowing definitions must be modified:
KSI_IN ← PxIN register for KSIKSI_OUT ← PxOUT register for KSIKSI_DIR ← PxDIR register for KSIKSI_IES ← PxIES register for KSIKSI_IFG ← PxIFG register for KSIKSI_IE ← PxIE register for KSIKSI_ALL ← Bits used for KSIKSI_READ() ← Macro to read KSI portKSI_VECTOR ← KSI interrupt vector
3. Define the KSO pins (rows) in the same file. KSO pins can be located anywhere in the microcontroller.The pins are defined as follows:
KSOx_POUT ← Address of PxOUT register for this KSO pinKSOx_BIT ← Bit used by this KSO pin
Note that the KSO pins are stored in the KSO_Pinmap array.4. Define KSO_Px_ALL for each port used by KSO pins. This definition is optional but it can be used by
macros which write to the whole ports in a faster way.5. Modify KSO_PDIR_OFFSET if needed. The driver uses KSOx_POUT as the base address for each
port. But it uses the KSO_PDIR_OFFSET to access the corresponding PxDIR register. For example, ifthe address of P1OUT is 0x0202 in MSP430F5529, and P1DIR is 0x0204, the value ofKSO_PDIR_OFFSET will be 0x02.
6. Modify keyboard macros SET_KSO_INTERRUPT, SET_KSO_POLL and SET_KSO_IDLE. Thesemacros set the state of the KSO pins in column-interrupt, polling or idle mode. The macros writedirectly to complete KSO ports in order to run faster. When possible, write to the 16-bit register (forexample, PAOUT/PADIR/PAREN) instead of 8-bit registers (for example, P1OUT/P1DIR/P1REN).
7. If the number of KSO pins is different, add/remove entries in KSO_Pinmap, found in:.\KBD430\Src\KBD430_DKS.c
6.3.4 Scan RateThe scan rate of the keyboard can be modified to reduce power consumption, or increase the responsetime.
Instructions:1. Adjust DELAY_SCAN_CYCLES as required in the following file:
.\Projects\Projects\<project>\Src\KBD430\KBD430_config.h
By default, the keyboard controller waits 10ms between scans.
www.ti.com Customizing the Keyboard Controller
35TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
6.4 Application
6.4.1 MCU System InitializationThe software included in this reference design initializes basic MCU system peripherals as follows:• Watchdog disabled• MCLK=SMCLK = DCO = 8MHz• Unused GPIOs = Output Low• SVSL/SVML/SVMH = disabled, SVSH=full performance → MSP430F5529 only• VCore=2 (USBKBD) or VCore=0 (I2CKBD) → MSP430F5529 only
Developers can modify these settings as required or when using a different hardware or MSP430derivative.
Instructions:1. Modify Init_Clock() to initialize MSP430 clocks. This function is located in:
.\Projects\<project>\Src\main.c
2. In the same file, modify Init_Ports() to initialize MSP430 GPIOs.• KSI pins should be initialized as inputs.• KSO pins as output low.• LED pins as output low.• Unused pins should have an internal/external pull-up/down resistor or be configured as output.
3. Other basic initialization can be performed in main().
6.4.2 Keyboard LEDsThe application uses 3 LEDs for NumLock, CapsLock and ScrollLock. Developers can use different pinsfor these functions or simply remove the functionality.
Instructions:1. The LED pins are defined in:
.\Projects\<project>\Src\KBD430\KBD430_hardware.h
The following definitions are available:
LED_PORT_W ← PxOUT register for LEDsLEDNUM_1_1 ← Pin used for Num LockLEDCAPS_1_6 ← Pin used for Caps LockLEDSCROLL_1_7 ← Pin used for Scroll Lock
2. The LEDs are handled in the application layer after getting a report from the HID interface. Modify theimplementation in main() if needed.
6.4.3 USB Custom InterfaceThe USBKBD configuration includes an HID custom interface which can be used to exchange customdata with the USB host. The implementation shown in this reference design is very simplistic but it can beused as a base for further development.
Instructions:1. Modify CustomHID_Parse() to parse and interpret data from USB Host. This function is declared in:.\Projects\USBKBD\Src\CustomHID.c
The current implementation implements a simple switch-case statement handling the different commandsfrom USB Host.
Customizing the Keyboard Controller www.ti.com
36 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
6.5 Firmware UpdatesSection 5 explains the procedure required to program the device using the JTAG connector. While thisoption is useful during development, it can be inconvenient for field upgrades in many applications.
In addition to the JTAG interface, this reference design allows developers to implement BSLcommunication.
The MSP430 bootstrap loader (BSL) enables users to communicate with embedded memory in theMSP430 microcontroller during the prototyping phase, final production and in service. By using commoninterfaces such as USB, UART or I2C, BSL can be more convenient and easier to implement on the field.
Two BSL methods are implemented depending on the device, and they are explained in more detail in thefollowing sections.
6.5.1 USB BSL in MSP430F5529MSP430F5529 is shipped with a USB BSL which resides in Flash. This BSL can be forced in hardwareusing the PUR pin, however the development board included in this design doesn’t have easy access tothis pin, so a software method is used instead.
The procedure is explained in the following steps:1. The USB BSL method can be used in the following projects:
• USBKBD: USB using MSP430F5529• I2CKBD: I2C using MSP430F5529
2. The default configuration for these projects includes a definition ENABLE_SW_BSL which enablessoftware BSL calls.If this definition is not enabled, the device can’t force BSL mode.
3. Disconnect the device from the USB port4. Press 'm', 's', and 'p' keys at the same time5. With the keys pressed, connect to USB port.
This will force a BOR, the MSP430 will reset and check for the ‘m’,’s’,and ’p’ keys. If the keys arepressed, the device jumps to BSL; if not, the device will execute the application.
6. The 3 LEDs will blink at the same time to indicate entry to BSL mode7. The 3 keys can be released at this point8. A host application such as “MSP430 USB Firmware Upgrade Example”, available here, can be used to
update the firmware:
NOTE: The new firmware should enable ENABLE_SW_BSL in order to be able to update again.
www.ti.com Customizing the Keyboard Controller
37TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Figure 25. USB Firmware Upgrade Tool
The USB BSL is explained in more detail in SLAU319 and SLAA452.Thanks to the flexibility of BSL, developers can implement customizations such as:• Use a different software invocation sequence (check a pin on reset, use different keys, etc). The
implementation of the software call to BSL is included in main.c and can be used as a guide.• Enable hardware entry sequence using PUR pin (i.e. using push button during reset) The
procedure and schematics are explained in more detail in SLAA452.• Implement BSL using other interfaces such as I2C or UART.
BSL resides in Flash in the MSP430F5xx family, allowing for these and more customizations. Formore details, please refer to SLAA450.
6.5.2 UART BSL in MSP430F2744MSP430G2744 includes a ROM BSL supporting UART and using the following pins:
Table 15. BSL pins in MSP430G2744
BSL Fuction Pin UsageData Transmit P1.1 KSI1Data Receive P2.2 GPIO3_LED2
It’s important to remark that the development board doesn’t have special provisions to access the UARTBSL pins easily:• P2.2 can be accessed in Jumper JP4 or connector J5,• P1.1 is used as a keyboard input and as such, it’s only available in surface mount connector J3 or
resistor R11.
Customizing the Keyboard Controller www.ti.com
38 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
This BSL is usually invoked in hardware using the TEST and RESET using the entry sequence describedin SLAU319; however this reference design includes a software invocation sequence described in thefollowing steps:1. The UART BSL method can be used in the followuing projects
• I2CKBD_G2xx4: I2C using MSP430G27442. The default configuration for these projects includes a definition ENABLE_SW_BSL which enables
software BSL calls. If this definition is not enabled, the device can’t force BSL mode.3. Disconnect the device from the USB port or power off device.4. Press ‘m’, ‘s’, and ‘p’ keys at the same time5. With the keys pressed, connect to USB port or power up the device.
This will force a BOR, the MSP430 will reset and check for the ‘m’,’s’,and ’p’ keys. If the keys arepressed, the device jumps to BSL; if not, the device will execute the application.
6. The 3 LEDs will blink at the same time to indicate entry to BSL mode7. The 3 keys can be released at this point8. A host application such as BSLDEMO -included in SLAU319- and hardware such as MSP430-BSL
Rocket can be used to update the firmware.
NOTE: The new firmware should enable ENABLE_SW_BSL in order to be able to update again.
Figure 26. BSLDEMO Tool
The UART BSL is explained in more detail in SLAU319.
Developers can implement customizations such as:• Use a different software invocation sequence (check a pin on reset, use different keys, etc).
The implementation of the software call to BSL is included in main.c and can be used as a guide.• Make the BSL pins easily available.
As mentioned previously, the development board doesn’t have special provisions to access BSL pins.Developers can make a special connector for BSL pins and reserve these pins for this purpose.Additionally, this connector can include the TEST and RESET pins used to force the hardware entrysequence.
...
LPM3
Asynchronous key press
...LPM3
Active
Active
Active
Active
Active
Active
Active
Active
Active
Active
www.ti.com Test Data
39TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
• The ROM BSL is fixed to UART, but developers can implement a bootloader using other interfaces.MSPBoot included in SLAA600 shows the implementation of a bootloader which resides in main flashand supports UART, I2C and SPI.
7 Test Data
7.1 Test SetupThe board should be connected following the guidelines described in Section 4.
To measure power consumption:• Disconnect JP2 and connect an ammeter in series
7.2 Response TimeThe response time for keyboards is approximately 5ms to 50ms. While this depends on different factorssuch as the mechanical implementation of the keyboard, communication bus load, etc., by using thisreference design, developers have more flexibility to customize the application according to their needs.Whether response time, price or power consumption is the most important requirement, parameters suchas debounce time, USB polling interval, and microcontroller internal frequency can be adjusted to meetparticular requirements.
One important factor affecting the response time is the scan time, which defines the time required to scanall keys. While a key press is detected in a few cycles in column-interrupt mode, the algorithm torecognize the particular pressed key, debounce it, discard “ghost” keys, etc. can take more cycles.
The following measurements were observed on bench tests:
Time CyclesDKS Scan ~182us@8MHz ~1450 cyclesDKS Process (1st key) ~339us@8MHz ~2715 cyclesDKS Process (additional keys) ~108us@8MHz ~860 cycles
7.3 Power ConsumptionThe expected power profile for the I2CKBD configuration is shown in Figure 27:
Figure 27. Expected Power Profile for I2CKBD and I2CKBD_G2xx4 Configurations
12
3
4 5
6
Test Data www.ti.com
40 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
The following profile was observed on bench tests:
Figure 28. Power Profile Observed on I2CKBD and I2CKBD_G2xx4
The labels from Figure 28 show the different steps of the process:1. Device wakes-up from key detection and performs first scan2. Second scan is performed and key is processed3. Key press is reported to host4. Scans performed in polling mode checking for new keys and waiting for key release5. Scan detects key release6. Key release is reported to host
The power consumption measured for I2C configurations was:
Table 16. Power Consumption for I2C Examples
Device Mode Current Power
MSP430G2744
ActiveMCLK=SMCLK=DCO= 8MHzACLK = VLO
3.2mA 10.56mW
LPM3ACLK=VLO 0.8uA 2.64uW
MSP430F5529
ActiveFLLref=REFO=32.768KhzMCLK=SMCLK=DCO=8MHzPMMCOREV=0ACLK = REFOSVSL/SVML/SVMH=OffSVSH=Full Performance
2.154mA 7.1082mW
LPM3ACLK=REFOSVSL/SVML/SVMH=OffSVSH=Full Performance
5.91uA 19.503uW
41
32
5 6
... LPM0
Asynchronous key press
...LPM0
Active
Active
Active
Active
Active
Active
Active
Active
Active
Active
... LPM3
Suspend Request
www.ti.com Test Data
41TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
The expected power profile for the USBKBD configuration is shown in Figure 27:
Figure 29. Expected Power Profile for USBKBD Configuration
The following profile was observed on bench tests:
Figure 30. Power Profile Observed on USBKBD
Test Data www.ti.com
42 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
The labels from Figure 30 show the different steps of the process:1. Device wakes-up from key detection and performs first scan2. Second scan is performed, key is processed and sent to host3. Scans performed in polling mode checking for new keys and waiting for key release4. Scan detects key release and key is reported to host5. Device detects a request to go to Suspend mode and goes to LPM36. Keyboard controller detects a key event and requests a USB remote wake-up
The power consumption measured for USB configuration was:
Table 17. Power Consumption for USB Example
Device Mode Current Power
MSP430F5529
ActiveFLLref=REFO=32.768KhzMCLK=SMCLK=DCO=8MHzPMMCOREV=2ACLK = REFOSVSL/SVML/SVMH=OffSVSH=Full PerformanceXT2 = 4MHzUSB, PLL = On
3.3mA 10.89mW
LPM0FLLref=REFO=32.768KhzSMCLK=DCO=8MHzPMMCOREV=2ACLK = REFOSVSL/SVML/SVMH=OffSVSH=Full PerformanceXT2 = 4MHzUSB, PLL = On
977uA 3.224mW
LPM3ACLK=REFOSVSL/SVML/SVMH=OffSVSH=Full PerformanceXT2= OffUSB, PLL = Off
6.22uA 20.52uA
7.4 Memory FootprintThe following memory footprint was obtained using IAR for MSP430 6.10.2 using optimization level “High-Balanced”:
Table 18. Memory Footprint
USBKBD I2CKBD I2CKBD_G2xx4Code 10,926B 9,348B 7,528B
KBD430 2,252B 2,228B 2,098BHIDUSB 5,566B - -HIDI2C - 4,460B 4,532B
Constants 1,486B 323B 323BScanCodeMap 124B 124B 124BDescriptors 1,142B 139B 139B
Data 492B 638B 638BStack 160B 320B 320BHeap - 200B 200B
P6.4/CB4/A41
P6.5/CB5/A52
P6.6/CB6/A63
P6.7/CB7/A74
P7.0/CB8/A125
P7.1/CB9/A136
P7.2/CB10/A147
P7.3/CB11/A158
P5.0/A8/VREF+/VEREF+9
P5.1/A9/VREF-/VEREF-10
AVCC111
P5.4/XIN12
P5.5/XOUT13
AVSS114
P8.015
P8.116
P8.217
DVCC118
DVSS119
VCORE20
P1.0/TA0CLK/ACLK21
P1.1/TA0.022
P1.2/TA0.123
P1.3/TA0.224
P1.4/TA0.325
P1.5/TA0.426
P1.6/TA1CLK/CBOUT27
P1.7/TA1.028
P2.0/TA1.129
P2.1/TA1.230
P2.2/TA2CLK/SMCLK31
P2.3/TA2.032
P2.4/TA2.133
P2.5/TA2.234
P2.6/RTCCLK/DMAE035
P2.7/UCB0STE/UCA0CLK36
P3.0/UCB0SIMO/UCB0SDA37
P3.1/UCB0SOMI/UCB0SCL38
P3.2/UCB0CLK/UCA0STE39
P3.3/UCA0TXD/UCA0SIMO40
P3.4/UCA0RXD/UCA0SOMI41
P3.5/TB0.542
P3.6/TB0.643
P3.7/TB0OUTH/SVMOUT44
P4.0/PM_UCB1STE/PM_UCA1CLK45
P4.1/PM_UCB1SIMO/PM_UCB1SDA46
P4.2/PM_UCB1SOMI/PM_UCB1SCL47
P4.3/PM_UCB1CLK/PM_UCA1STE48
DVSS249
DVCC250
P4.4/PM_UCA1TXD/PM_UCA1SIMO51
P4.5/PM_UCA1RXD/PM_UCA1SOMI52
P4.6/PM_NONE53
P4.7/PM_NONE54
P5.6/TB0.055
P5.7/TB0.156
P7.4/TB0.257
P7.5/TB0.358
P7.6/TB0.459
P7.7/TB0CLK/MCLK60
VSSU61
PU.0/DP62
PUR63
PU.1/DM64
VBUS65
VUSB66
V1867
AVSS268
P5.2/XT2IN69
P5.3/XT2OUT70
TEST/SBWTCK71
PJ.0/TDO72
PJ.1/TDI/TCLK73
PJ.2/TMS74
PJ.3/TCK75
RST/NMI/SBWTDIO76
P6.0/CB0/A077
P6.1/CB1/A178
P6.2/CB2/A279
P6.3/CB3/A380
U1
MSP430F5529IPN
GPIO1_ACLKGPIO2_LED1TCAP1TCAP2PWM1PWM2GPIO3_LED2GPIO4_LED3
SPI_MOSISPI_MISOSPI_CLKUART_TXUART_RXGPIO5GPIO6GPIO7
AIN7AIN8XT2INXT2OUTKSO1KSO2KSO3KSO4
KSO7KSO8KSO9KSO10PWM3PWM4PWM5KSO11
V18VCORE
VUSB
VCC430VCC430
PUR
PU.1/DMPU.0/DP
SBWTCKRST/SBWTDIO
PJ.3PJ.2PJ.1GPIO13
KSO14KSO13KSO12
KSO6KSO5AIN6AIN5AIN4AIN3AIN2AIN1
KSO0GPIO12GPIO11GPIO10GPIO9I2C_SCLI2C_SDAGPIO8
KSI7KSI6KSI5KSI4KSI3KSI2KSI1KSI0
GND
GND
GNDVCC430
GND
VCC
0.47 µFC17
0.1 µFC15
0.1 µFC14
0
R19
0
R18
0.1 µFC12
GND
GND
12
4 MHz
Y1HC49US-4.000MABJB
XT2OUT
XT2IN
33 pF
C10
33 pF
C11
1
2
3
4
5
789
6J6
SD103AW-13-F
C A
D4
TPD2E001DZDR
GND1
IO12
IO23
VCC4
U2
GND
GND
GND
GND
PU.0/DP
PU.1/DM
Micro USB Interface
1.40 k
R1
1.0 MegR2
27
R3 27
R4
33 kR5
10 pFC1
10 pFC2
0.1 µFC3 4.7 µF
C4
XT2
GND
GND
VUSB_VCC
V1
8
VU
SB
0.22 µFC9
0.22 µFC8
D5LL103A-GS08
1
2
JP6
TSW-102-07-G-S
GND
47 kR20
KSI0
KSI1
KSI2
KSI3
KSI4
KSI5
KSI6
KSi7
GPIO8
I2C_SDA
I2C_SCL
GPIO9
GPIO10
GPIO11
GPIO12
KSO0
AIN1
AIN2
AIN3
AIN4
AIN5
AIN6
KSO5
KSO6
KSO12
KSO13
KSO14 VCC
RST/SBWTDIO
SBWTCK
GPIO1_ACLK
GPIO2_LED1
TCAP1
TCAP2
PWM1
PWM2
GPIO3_LED2
GPIO4_LED3
SPI_MOSI
SPI_MISO
SPI_CLK
UART_TX
UART_RX
GPIO5
GPIO6
GPIO7
AIN7
AIN8
KSO1
KSO2
KSO3
KSO4
KSO7
KSO8
KSO9
PWM3
PWM4
PWM5
KSO11
VBUS
VUSB
VCC430
VUSB_VCC
KSO10
GPIO13
10 µFC16
10 µFC13
2.2 nF
C18
DNP
PUR
D-
D+
VBUS
VBUS
www.ti.com Design Files Schematics
43TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
8 Design Files SchematicsTo download the Schematics for each board, see the design files at http://www.ti.com/tool/DESIGNNUMBER.
Figure 31. Schematics - Page 1
GND
Green
12
D2Green
12
D3
GPIO2_LED1
GPIO3_LED2
LEDs
KSI1 KSI2 KSI3 KSI4 KSI5 KSI6 KSI7KSI0
Keyboard Inputs
GND
GND
VC
C4
30
VCC
Power/SBW
1 2
3 4
5 6
7 8
9 10
11 12
13 14
J1
SBH11-PBPC-D07-ST-BK
OUT1
NR3
4
EN5
IN8
9
GND
U4A TPS73533DRBT
SBWTCK 1
2
JP2
TSW-102-07-G-S
1
2
3
J2
TSW-103-07-G-S
330
R6
12345678910
11
12
13
14
15
16
17
18
19
20
21
22
23
24
J32-84952-4
Green
12
D1
1 2
JP3
TSW-102-07-G-S
1 2
JP4
TSW-102-07-G-S
1 2
JP5
TSW-102-07-G-S
GPIO4_LED3
47 kR10
47 kR11
47 kR12
47 kR13
47 kR14
47 kR15
47 kR16
47 kR17
VCC
1
3
56
4
2
7
910
8
12 11
14 13
16 15
18 17
20 19
J4
SSW-110-23-F-D
1
3
56
4
2
7
910
8
12 11
14 13
16 15
18 17
20 19
J5
SSW-110-23-F-D
KS
O0
KS
O1
KS
O2
KS
O3
KS
I0K
SO
4
KS
I1K
SI2
KS
O5
KS
I3K
SO
6K
SO
7K
SO
8K
SO
9K
SO
10
KS
O11
KS
I4K
SO
12
KS
O13
KS
O14
KS
I5K
SI6
KS
I7
GND
4.7 µFC5
VBUS VBUS_LDO
1
2
3
JP1
TSW-103-07-G-S
VUSB_VCCVCC
Keyboard Connector
VCCAIN1UART_RXUART_TXGPIO1_ACLKAIN2SPI_CLKGPIO2_LED1I2C_SCL
VBUS
AIN3AIN4AIN5AIN6AIN7AIN8GPIO8GPIO9
PWM5PWM4PWM3PWM2TCAP2TCAP1GPIO13GPIO12GPIO11GPIO10
PWM1GPIO7GPIO6RST/SBWTDIOSPI_MOSISPI_MISOGPIO5GPIO4_LED3GPIO3_LED2
GND
GNDGND
GND
40 pin BoosterPack Headers
1-2: VUSB
2-3: EXT LDO
VCCGNDGND
1 µFC7
0.01 µF
C6
KSI7 KSO0
KSO1
KSO2
KSO3
KSI0
KSO4
KSO7
KSO6
KSI3
KSO5
KSI2
KSI6
KSI5
KSO14
KSO13
KSO12
KSI4
KSO11
KSO10
KSO9
KSO8
KSI1
RST/SBWTDIO
VBUS
VUSB_VCC
SBWTCK
KSI0 KSI1 KSI2 KSI3 KSI4 KSI5 KSI6 KSI7
VCC
AIN1
UART_RX
UART_TX
GPIO1_ACLK
AIN2
SPI_CLK
GPIO2_LED1
VBUS
AIN3
AIN4
AIN5
AIN6
AIN7
AIN8
GPIO8
GPIO9
PWM5
PWM4
PWM3
PWM2
TCAP2
TCAP1
GPIO13
GPIO12
GPIO11
GPIO10
PWM1
GPIO7
GPIO6
RST/SBWTDIO
SPI_MOSI
SPI_MISO
GPIO5
GPIO4_LED3
GPIO3_LED2
I2C_SDA
I2C_SCL
GPIO2_LED1
GPIO3_LED2
GPIO4_LED3560
R7
560
R8
560
R9
2.2 k
R22
2.2 k
R21
0.1 µFC19
0.1 µFC20
RST/SBWTDIO
I2C_SDA
Design Files Schematics www.ti.com
44 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Figure 32. Schematics - Page 2
GND
VCC
47 k
R30DNP
RST/SBWTDIOSBWTCK
VCC430
0.1 µF
C30
DNP
GND
VCC430
0.1 µF
C32DNP
0
R32DNP
0
R31DNP
KSI7
KSI6
KSI5
KSI4
KSI3
KSI2
KSI1
KSI0
I2C_SDA
KSO4
I2C_SCL
SPI_CLK
UART_TX
UART_RX
KSO5
KSO6
KSO7
KSO8
KSO9
KSO10
KSO11
KSO12
KSO13
KSO14
GPIO1_ACLK
GPIO2_LED1
GPIO3_LED2
GPIO4_LED3
KSO14
KSO13
KSO12
KSO11
KSO10
KSO9
KSO8
KSO7
KSO6
KSO5
UART_RX
UART_TX
SPI_CLK
I2C_SCL
I2C_SDA
KSO4
KSI0
KSI1
KSI2
KSI3
KSI4
KSI5
KSI6
KSI7
GPIO1_ACLK
GPIO2_LED1
GPIO3_LED2
GPIO4_LED3
KSO0
KSO1
KSO2
KSO3
10 µF
C33DNP
10 µF
C31
DNP
2.2 nF
C34DNP
KSO0
KSO1
KSO2
KSO3
msp430g2744_rha_40
TEST/SBWTCK37
*RST/NMI/SBWTDIO5
P1.0/TACLK/ADC10CLK29
P1.1/TA030
P1.2/TA131
P1.3/TA232
P1.4/SMCLK/TCK33
P1.5/TA0/TMS34
P1.6/TA1/TDI/TCLK35
P1.7/TA2/TDO/TDI36
P2.0/ACLK/A06
P2.1/TAINCLK/SMCLK/A17
P2.2/TA0/A28
P2.3/TA1/A3/VREF-/VEREF-27
P2.4/TA2/A4/VREF+/VEREF+28
P2.5/ROSC40
XIN/P2.63
XOUT/P2.72
AV
SS
13
DV
SS
1
DV
SS
4
P3.0/UCB0STE/UCA0CLK/A59
P3.1/UCB0SIMO/UCB0SDA10
P3.2/UCB0SOMI/UCB0SCL11
P3.3/UCB0CLK/UCA0STE12
P3.4/UCA0TXD/UCA0SIMO23
P3.5/UCA0RXD/UCA0SOMI24
P3.6/A625
P3.7/A726
P4.0/TB015
P4.1/TB116
P4.2/TB217
P4.3/TB0/A1218
P4.4/TB1/A1319
P4.5/TB2/A1420
P4.6/TBOUTH/A1521
P4.7/TBCLK22
AV
CC
14
DV
CC
39
DV
CC
38
EP
AD
41
U3DNP
VCC430
RST/SBWTDIO
SBWTCK
VCC
GND
www.ti.com Design Files Schematics
45TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Figure 33. Schematics - Page 3
Design Files Schematics www.ti.com
46 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
www.ti.com Design Files Schematics
47TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
8.1 Bill of MaterialsTo download the Bill of Materials for each board, see the design files at http://www.ti.com/tool/DESIGNNUMBER.
Table 19. KBD430_BOM_F5529Item Qty Reference Value Part Description Manufacturer Manufacturer Part
NumberAlternate Part PCB Footprint Note
1 2 C1, C2 10pF CAP, CERM, 10pF, 50V, +/-5%,C0G/NP0, 0603
Kemet C0603C100J5GACTU
0603
2 1 C3 0.1uF CAP, CERM, 0.1uF, 50V, +/-10%, X7R,0603
Kemet C0603C104K5RACTU
0603
3 1 C4 4.7µF CAP, TA, 4.7uF, 10V, +/-10%, 5 ohm,SMD
Vishay-Sprague 293D475X9010A2TE3
3216-18
4 1 C5 4.7uF CAP, CERM, 4.7uF, 10V, +/-10%, X5R,0603
Kemet C0603C475K8PACTU
0603
5 1 C6 0.01uF CAP, CERM, 0.01uF, 50V, +/-10%, X7R,0603
MuRata GRM188R71H103KA01D
0603
6 1 C7 1uF CAP, CERM, 1uF, 16V, +/-10%, X5R,0603
Kemet C0603C105K4PACTU
0603
7 2 C8, C9 0.22uF CAP, CERM, 0.22uF, 16V, +/-10%, X7R,0603
TDK C1608X7R1C224K080AC
0603
8 2 C10, C11 33pF CAP, CERM, 33pF, 50V, +/-5%,C0G/NP0, 0603
TDK C1608C0G1H330J080AA
0603
9 3 C12, C14, C15 0.1uF CAP, CERM, 0.1uF, 16V, +/-10%, X7R,0603
Kemet C0603C104K4RACTU
0603
10 2 C13, C16 10uF CAP, TA, 10uF, 10V, +/-20%, 3.4 ohm,SMD
Vishay-Sprague 293D106X0010A2TE3
3216-18
11 1 C17 0.47uF CAP, CERM, 0.47uF, 10V, +/-10%, X5R,0603
Kemet C0603C474K8PACTU
0603
12 0 C18, C34 2200pF CAP, CERM, 2200pF, 100V, +/-5%, X7R,0603
AVX 06031C222JAT2A 0603 DNP_F5529
13 2 C19, C20 0.1uF CAP, CERM, 0.1uF, 16V, +/-5%, X7R,0603
AVX 0603YC104JAT2A 0603
14 0 C30, C32 0.1uF CAP, CERM, 0.1uF, 16V, +/-10%, X7R,0603
Kemet C0603C104K4RACTU
0603 DNP_F5529
15 0 C31, C33 10uF CAP, TA, 10uF, 10V, +/-20%, 3.4 ohm,SMD
Vishay-Sprague 293D106X0010A2TE3
3216-18 DNP_F5529
16 3 D1, D2, D3 Green LED, Green, SMD Lite-On LTST-C171GKT LED_LTST-C171
17 1 D4 SD103AW-13-F DIODE, SCHOTTKY, 0.35A, 40V, SOD-123
DIODES INC SD103AW-13-F D_SOD123
18 1 D5 LL103A-GS08 Diode, Schottky, 40V, 0.2A,3.7x1.6x1.6mm
Vishay-Semiconductor
LL103A-GS08 SOD-80
19 1 J1 Connector Header (shrouded), 100 mil, 7x2, Gold,TH
Sullins ConnectorSolutions
SBH11-PBPC-D07-ST-BK
CONN_SBH11-PBPC-D07-ST-BK
20 2 J2, JP1 Connector Header, 100mil, 3x1, Gold, TH Samtec TSW-103-07-G-S TSW-103-07-G-S
Design Files Schematics www.ti.com
48 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Table 19. KBD430_BOM_F5529 (continued)21 1 J3 Keyboard
connectorCONN FPC 24POS 1MM RT ANG SMD TE Connectivity 2-84952-4 CON24_SMT-
RA_FCC
22 2 J4, J5 Connector Connector, Receptacle, 100mil, 10x2,Gold plated, TH
Samtec SSW-110-23-F-D CONN_SSW-110-23-F-D
23 1 J6 USB Connector CONNECTOR, MICRO-USB-AB,RECEPTACLE, RIGHT ANGLE, 5-PIN
HIROSE ZX62D-AB-5P8 USB-ZX62D-AB-5P8_REVISED
24 5 JP2, JP3, JP4, JP5,JP6
Jumper Header, 100mil, 2x1, Gold, TH Samtec TSW-102-07-G-S TSW-102-07-G-S
25 1 R1 1.40k RES, 1.40k ohm, 1%, 0.1W, 0603 Vishay-Dale CRCW06031K40FKEA
0603
26 1 R2 1M RES, 1.0Meg ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW06031M00JNEA
0603
27 2 R3, R4 27 RES, 27 ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW060327R0JNEA
0603
28 1 R5 33k RES, 33k ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW060333K0JNEA
0603
29 1 R6 330 RES, 330 ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW0603330RJNEA
0603
30 3 R7, R8, R9 560 RES, 560 ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW0603560RJNEA
0603
31 9 R10, R11, R12,R13, R14, R15,R16, R17, R20
47k RES, 47k ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW060347K0JNEA
0603
32 2 R18, R19 0 RES, 0 ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW06030000Z0EA
0603
33 2 R21, R22 2.2k RES, 2.2k ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW06032K20JNEA
0603
34 0 R30 47K RES, 47k ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW060347K0JNEA
0603 DNP_F5529
35 0 R31, R32 0 RES, 0 ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW06030000Z0EA
0603 DNP_F5529
36 1 U1 MSP430F5529 Mixed Signal MicroController, PN0080A Texas Instruments MSP430F5529IPN PN0080A_L
37 1 U2 TPD2E001DZDR IC, LOW-CAPACITANCE 2-Chan ±15-kVESD-PROTECTION ARRAY, SOP-4
TEXASINSTRUMENTS
TPD2E001DZDR DZD
38 0 U3 MSP430G2744 MSP430G2744, VQFN40 Texas Instruments MSP430G2744IRHA40R
QFN50P600X600X100-40N
DNP_F5529
39 1 U4 TPS73533 Single Output High PSRR LDO, 500 mA,Fixed 3.3 V Output, 2.7 to 6.5 V Input,with Low IQ, 8-pin SON (DRB), -40 to125 degC, Green (RoHS & no Sb/Br)
Texas Instruments TPS73533DRBT DRB8_1P75X1P5
40 1 Y1 XTAL4M Crystal, 4MHz, 30pF, SMD Auris-GmbH Q- 4,000000M-HC49USSMD-F-30-30-D-16-TR
HCM49-4.000MABJT
Auris_HC49USSMD
www.ti.com Design Files Schematics
49TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Design Files Schematics www.ti.com
50 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Table 20. KBD430_BOM_G2744Item Qty Reference Value Part Description Manufacturer Manufacturer
Part NumberAlternatePart
PCBFootprint
Note
1 2 C1, C2 10pF CAP, CERM, 10pF, 50V, +/-5%, C0G/NP0, 0603
Kemet C0603C100J5GACTU
0603
2 1 C3 0.1uF CAP, CERM, 0.1uF, 50V, +/-10%, X7R, 0603
Kemet C0603C104K5RACTU
0603
3 1 C4 4.7µF CAP, TA, 4.7uF, 10V, +/-10%,5 ohm, SMD
Vishay-Sprague
293D475X9010A2TE3
3216-18
4 1 C5 4.7uF CAP, CERM, 4.7uF, 10V, +/-10%, X5R, 0603
Kemet C0603C475K8PACTU
0603
5 1 C6 0.01uF CAP, CERM, 0.01uF, 50V, +/-10%, X7R, 0603
MuRata GRM188R71H103KA01D
0603
6 1 C7 1uF CAP, CERM, 1uF, 16V, +/-10%, X5R, 0603
Kemet C0603C105K4PACTU
0603
7 0 C8, C9 0.22uF CAP, CERM, 0.22uF, 16V, +/-10%, X7R, 0603
TDK C1608X7R1C224K080AC
0603 DNP_G2744
8 0 C10, C11 33pF CAP, CERM, 33pF, 50V, +/-5%, C0G/NP0, 0603
TDK C1608C0G1H330J080AA
0603 DNP_G2744
9 0 C12, C14,C15
0.1uF CAP, CERM, 0.1uF, 16V, +/-10%, X7R, 0603
Kemet C0603C104K4RACTU
0603 DNP_G2744
10 0 C13, C16 10uF CAP, TA, 10uF, 10V, +/-20%,3.4 ohm, SMD
Vishay-Sprague
293D106X0010A2TE3
3216-18 DNP_G2744
11 0 C17 0.47uF CAP, CERM, 0.47uF, 10V, +/-10%, X5R, 0603
Kemet C0603C474K8PACTU
0603 DNP_G2744
12 0 C18, C34 2200pF CAP, CERM, 2200pF, 100V,+/-5%, X7R, 0603
AVX 06031C222JAT2A
0603 DNP_G2744
13 2 C19, C20 0.1uF CAP, CERM, 0.1uF, 16V, +/-5%, X7R, 0603
AVX 0603YC104JAT2A
0603
14 2 C30, C32 0.1uF CAP, CERM, 0.1uF, 16V, +/-10%, X7R, 0603
Kemet C0603C104K4RACTU
0603
15 2 C31, C33 10uF CAP, TA, 10uF, 10V, +/-20%,3.4 ohm, SMD
Vishay-Sprague
293D106X0010A2TE3
3216-18
16 3 D1, D2, D3 Green LED, Green, SMD Lite-On LTST-C171GKT
LED_LTST-C171
17 1 D4 SD103AW-13-F
DIODE, SCHOTTKY, 0.35A,40V, SOD-123
DIODES INC SD103AW-13-F
D_SOD123
18 0 D5 LL103A-GS08 Diode, Schottky, 40V, 0.2A,3.7x1.6x1.6mm
Vishay-Semiconductor
LL103A-GS08 SOD-80 DNP_G2744
19 1 J1 Connector Header (shrouded), 100 mil,7x2, Gold, TH
SullinsConnectorSolutions
SBH11-PBPC-D07-ST-BK
CONN_SBH11-PBPC-D07-ST-BK
20 2 J2, JP1 Connector Header, 100mil, 3x1, Gold,TH
Samtec TSW-103-07-G-S
TSW-103-07-G-S
21 1 J3 Keyboardconnector
CONN FPC 24POS 1MM RTANG SMD
TEConnectivity
2-84952-4 CON24_SMT-RA_FCC
22 2 J4, J5 Connector Connector, Receptacle,100mil, 10x2, Gold plated, TH
Samtec SSW-110-23-F-D
CONN_SSW-110-23-F-D
23 1 J6 USBConnector
CONNECTOR, MICRO-USB-AB, RECEPTACLE, RIGHTANGLE, 5-PIN
HIROSE ZX62D-AB-5P8
USB-ZX62D-AB-5P8_REVISED
24 4 JP2, JP3,JP4, JP5
Jumper Header, 100mil, 2x1, Gold,TH
Samtec TSW-102-07-G-S
TSW-102-07-G-S
25 0 JP6 Jumper Header, 100mil, 2x1, Gold,TH
Samtec TSW-102-07-G-S
TSW-102-07-G-S
DNP_G2744
26 1 R1 1.40k RES, 1.40k ohm, 1%, 0.1W,0603
Vishay-Dale CRCW06031K40FKEA
0603
27 1 R2 1M RES, 1.0Meg ohm, 5%, 0.1W,0603
Vishay-Dale CRCW06031M00JNEA
0603
28 2 R3, R4 27 RES, 27 ohm, 5%, 0.1W,0603
Vishay-Dale CRCW060327R0JNEA
0603
29 1 R5 33k RES, 33k ohm, 5%, 0.1W,0603
Vishay-Dale CRCW060333K0JNEA
0603
www.ti.com Design Files Schematics
51TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Table 20. KBD430_BOM_G2744 (continued)30 1 R6 330 RES, 330 ohm, 5%, 0.1W,
0603Vishay-Dale CRCW06033
30RJNEA0603
31 3 R7, R8, R9 560 RES, 560 ohm, 5%, 0.1W,0603
Vishay-Dale CRCW0603560RJNEA
0603
32 9 R10, R11,R12, R13,R14, R15,R16, R17
47k RES, 47k ohm, 5%, 0.1W,0603
Vishay-Dale CRCW060347K0JNEA
0603
33 0 R20 47k RES, 47k ohm, 5%, 0.1W,0603
Vishay-Dale CRCW060347K0JNEA
0603 DNP_G2744
34 0 R18, R19 0 RES, 0 ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW06030000Z0EA
0603 DNP_G2744
35 2 R21, R22 2.2k RES, 2.2k ohm, 5%, 0.1W,0603
Vishay-Dale CRCW06032K20JNEA
0603
36 1 R30 47K RES, 47k ohm, 5%, 0.1W,0603
Vishay-Dale CRCW060347K0JNEA
0603
37 2 R31, R32 0 RES, 0 ohm, 5%, 0.1W, 0603 Vishay-Dale CRCW06030000Z0EA
0603
38 0 U1 MSP430F5529
Mixed Signal MicroController,PN0080A
TexasInstruments
MSP430F5529IPN
PN0080A_L DNP_G2744
39 1 U2 TPD2E001DZDR
IC, LOW-CAPACITANCE 2-Chan ±15-kV ESD-PROTECTION ARRAY, SOP-4
TEXASINSTRUMENTS
TPD2E001DZDR
DZD
40 1 U3 MSP430G2744
MSP430G2744, VQFN40 TexasInstruments
MSP430G2744IRHA40R
QFN50P600X600X100-40N
41 1 U4 TPS73533 Single Output High PSRRLDO, 500 mA, Fixed 3.3 VOutput, 2.7 to 6.5 V Input,with Low IQ, 8-pin SON(DRB), -40 to 125 degC,Green (RoHS & no Sb/Br)
TexasInstruments
TPS73533DRBT
DRB8_1P75X1P5
42 0 Y1 XTAL4M Crystal, 4MHz, 30pF, SMD Auris-GmbH Q-4,000000M-HC49USSMD-F-30-30-D-16-TR
HCM49-4.000MABJT
Auris_HC49USSMD
DNP_G2744
Design Files Schematics www.ti.com
52 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
8.2 PCB LayoutTo download the Layout Prints for each board, see the design files athttp://www.ti.com/tool/DESIGNNUMBER.
Figure 34. Layout - Top Layer
Figure 35. Layout – Bottom Layer
www.ti.com Design Files Schematics
53TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
Figure 36. Mechanical Dimensions
8.3 Altium ProjectTo download the Altium project files for each board, see the design files athttp://www.ti.com/tool/DESIGNNUMBER.
8.4 Gerber FIlesTo download the Gerber files for each board, see the design files athttp://www.ti.com/tool/DESIGNNUMBER.
9 Software FilesTo download the software files for this reference design, please see the link athttp://www.ti.com/tool/DESIGNNUMBER.
10 References1. 1. MSP430x5xx and MSP430x6xx Family User’s Guide (SLAU208)2. 2. MSP430x2xx Family User’s Guide (SLAU144)3. 3. Implementing an Ultralow-Power Keypad Interface with the MSP430, 2002 (SLAA149)4. 4. Enabling Low-Power Windows 8 HID Over I2C Applications using MSP430 Microcontrollers, 2012
(SLAA569)5. Programming With the Bootstrap Loader (BSL), 2014 (SLAU319)6. Creating a Custom Flash-Based Bootstrap Loader (BSL), 2013 (SLAA450)7. USB Field Firmware Update on MSP430™ MCUs, 2011 (SLAA452)8. MSPBoot - Main Memory Bootloader for MSP430™ Microcontrollers, 2014 (SLAA600)9. 5. USB HID Usage Tables. http://www.usb.org/developers/hidpage/
About the Author www.ti.com
54 TIDU521–October 2014Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Keyboard Controller using MSP430
11 About the AuthorLuis Reynoso is an Applications Engineer at Texas Instruments. He has taken multiple customer-facingroles in the embedded industry, and during this time he has published several Applications Notes andpapers for microcontrollers. He joined the MSP430 Applications team in 2010.
IMPORTANT NOTICE FOR TI REFERENCE DESIGNS
Texas Instruments Incorporated (‘TI”) reference designs are solely intended to assist designers (“Designer(s)”) who are developing systemsthat incorporate TI products. TI has not conducted any testing other than that specifically described in the published documentation for aparticular reference design.TI’s provision of reference designs and any other technical, applications or design advice, quality characterization, reliability data or otherinformation or services does not expand or otherwise alter TI’s applicable published warranties or warranty disclaimers for TI products, andno additional obligations or liabilities arise from TI providing such reference designs or other items.TI reserves the right to make corrections, enhancements, improvements and other changes to its reference designs and other items.Designer understands and agrees that Designer remains responsible for using its independent analysis, evaluation and judgment indesigning Designer’s systems and products, and has full and exclusive responsibility to assure the safety of its products and compliance ofits products (and of all TI products used in or for such Designer’s products) with all applicable regulations, laws and other applicablerequirements. Designer represents that, with respect to its applications, it has all the necessary expertise to create and implementsafeguards that (1) anticipate dangerous consequences of failures, (2) monitor failures and their consequences, and (3) lessen thelikelihood of failures that might cause harm and take appropriate actions. Designer agrees that prior to using or distributing any systemsthat include TI products, Designer will thoroughly test such systems and the functionality of such TI products as used in such systems.Designer may not use any TI products in life-critical medical equipment unless authorized officers of the parties have executed a specialcontract specifically governing such use. Life-critical medical equipment is medical equipment where failure of such equipment would causeserious bodily injury or death (e.g., life support, pacemakers, defibrillators, heart pumps, neurostimulators, and implantables). Suchequipment includes, without limitation, all medical devices identified by the U.S. Food and Drug Administration as Class III devices andequivalent classifications outside the U.S.Designers are authorized to use, copy and modify any individual TI reference design only in connection with the development of endproducts that include the TI product(s) identified in that reference design. HOWEVER, NO OTHER LICENSE, EXPRESS OR IMPLIED, BYESTOPPEL OR OTHERWISE TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY TECHNOLOGY ORINTELLECTUAL PROPERTY RIGHT OF TI OR ANY THIRD PARTY IS GRANTED HEREIN, including but not limited to any patent right,copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI products orservices are used. Information published by TI regarding third-party products or services does not constitute a license to use such productsor services, or a warranty or endorsement thereof. Use of the reference design or other items described above may require a license from athird party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectualproperty of TI.TI REFERENCE DESIGNS AND OTHER ITEMS DESCRIBED ABOVE ARE PROVIDED “AS IS” AND WITH ALL FAULTS. TI DISCLAIMSALL OTHER WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED, REGARDING THE REFERENCE DESIGNS OR USE OFTHE REFERENCE DESIGNS, INCLUDING BUT NOT LIMITED TO ACCURACY OR COMPLETENESS, TITLE, ANY EPIDEMIC FAILUREWARRANTY AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHTS.TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY DESIGNERS AGAINST ANY CLAIM, INCLUDING BUT NOTLIMITED TO ANY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON ANY COMBINATION OF PRODUCTS ASDESCRIBED IN A TI REFERENCE DESIGN OR OTHERWISE. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, DIRECT,SPECIAL, COLLATERAL, INDIRECT, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES IN CONNECTION WITHOR ARISING OUT OF THE REFERENCE DESIGNS OR USE OF THE REFERENCE DESIGNS, AND REGARDLESS OF WHETHER TIHAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.TI’s standard terms of sale for semiconductor products (http://www.ti.com/sc/docs/stdterms.htm) apply to the sale of packaged integratedcircuit products. Additional terms may apply to the use or sale of other types of TI products and services.Designer will fully indemnify TI and its representatives against any damages, costs, losses, and/or liabilities arising out of Designer’s non-compliance with the terms and provisions of this Notice.IMPORTANT NOTICE
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265Copyright © 2016, Texas Instruments Incorporated