You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
4.9 KiB

5 years ago
  1. -------------------------------MEDIAPAD README----------------------------------
  2. Ver.: 1.00 (February 2011)
  3. - Initial Release
  4. Author: Dung Dang
  5. MSP430 Applications
  6. Texas Instruments Inc.
  7. --------------------------------------------------------------------------------
  8. CONTENTS
  9. I. DESCRIPTION
  10. II. APPLICATION USAGE
  11. III. PROJECT SOLUTION & FILE CONFIGURATION
  12. IV. USB SERIAL COM PORT PROTOCOL
  13. I. DESCRIPTION
  14. -----------------------------------
  15. PC demo application for establishing a serial connection with the LaunchPad
  16. CapTouch BoosterPack. It receives capacitive touch button presses and capacitive
  17. wheel gestures that are captured and transmitted by the MSP430, and uses this
  18. data to simulate virtual keystrokes to control windows media. The program will
  19. not open a window; instead it will place a small icon into the taskbar
  20. notification area.
  21. To exit the program, right-click on the icon, and then select "Exit".
  22. The code was developed with the Express Edition of Visual C++ 2008
  23. http://www.microsoft.com/express/
  24. Big thanks to Andreas Dannenberg for creating the .NET COM Serial port
  25. auto-detection code.
  26. II. APPLICATION USAGE
  27. -----------------------------------
  28. Upon execution, the application starts looking for a LaunchPad or an eZ430
  29. emulator compatible USB serial COM port. If no compatible COM port is found,
  30. the application displays an error message which then exits the application.
  31. If a LaunchPad COM port is found, the application prompts a greeting start-up
  32. message. Once the message is closed, the application minimizes itself to the
  33. taskbar. The application then executes in background, receiving UART data from
  34. the serial port and translating them into Windows virtual key strokes.
  35. These keystrokes are determined based on the user capacitive input on the
  36. LaunchPad CapTouch BoosterPack when the device is in active mode*.
  37. 1. Center button press: Start Media Player [Windows Media Player by default]**
  38. 2. Bottom arrow button press: Play/Pause
  39. 3. Left arrow button press: Previous Track
  40. 4. Right arrow button press: Next Track
  41. 5. Scroll wheel clockwise: Volume Up
  42. 6. Scroll wheel counter-clockwise: Volume Down
  43. *Make sure to wake up device before providing touch inputs.
  44. Device frequently goes to sleep after inactivity. To wake up, slowly wave hand
  45. 1-2 inch away from the BoosterPack, an LED sequence (slow clockwise, then fast
  46. counter-clockwise) indicates a device wakeup. Only after device fully wakes up,
  47. the capacitive touch inputs can be captured and transmitted to the program.
  48. **Depending on the computer system, opening the Media Player might take some
  49. time.
  50. The prorgam's system tray icon provides an About dialog box and an option to
  51. exit the application.
  52. III. PROJECT SOLUTION & FILE CONFIGURATION
  53. -----------------------------------
  54. PROJECT SOLUTION ROOT - MediaPad
  55. | 430Boost_CapTouchMediaPad.ncb
  56. | 430Boost_CapTouchMediaPad.sln
  57. | ReadMe.txt
  58. |
  59. +---[MediaPad]
  60. | | MediaPad.cpp
  61. | | MediaPad.h
  62. | | MediaPad.ico
  63. | | MediaPad.rc
  64. | | MediaPad.vcproj
  65. | | MediaPad.vcproj.ENT.a0271518.user
  66. | | ReadMe.txt
  67. | | Resource.h
  68. | | small.ico
  69. | | stdafx.cpp
  70. | | stdafx.h
  71. | | targetver.h
  72. | |
  73. | \---[Release]
  74. |
  75. \---[Release]
  76. 430Boost_CapTouchMediaPad.exe <Executable Program>
  77. 430Boost_CapTouchMediaPad.pdb
  78. Legend: [Directory]
  79. |---filename
  80. IV. USB SERIAL COM PORT PROTOCOL
  81. -----------------------------------
  82. Per each event (wake up, go to sleep, touch/press, or gesture), the LaunchPad
  83. transmits a 2-byte UART packet, which appears from the USB serial COM port on
  84. the PC. They are specified as follows.
  85. WAKE UP [due to proximity sensor detection]: 0xBE 0xEF
  86. SLEEP [after period of inactivity]: 0xDE 0xAD
  87. CENTER BUTTON PRESS: 0x80 0x80
  88. WHEEL POSITION TOUCH/PRESS [z = touch position]: 0x3z 0x3z [z=1 nibble 0x0-F]
  89. GESTURE START [z = touch position]: 0xFC 0x2z [z=1 nibble 0x0-F]
  90. GESTURE STOP: 0xFB 0xFB
  91. GESTURE & GESTURE END POSITION : 0xGG 0x2z
  92. GG = [binary] b????????
  93. First bit is direction: 0 = clockwise, 1 = counter-clockwise
  94. Last 7 bits = count of gesture movement
  95. z = ending position of the immediate gesture [[z=1 nibble 0x0-F]
  96. The UART receiver can decipher the packets by comparing them against the fixed
  97. values (WAKE UP, SLEEP, CENTER BUTTON PRESS, GESTURE START & STOP) or against
  98. ranges (WHEEL TOUCH = 0x30-0x3F, GESTURE = 0x00-0x1F, GESTURE POSITION =
  99. 0x20-0x2F)
  100. MediaPad processes all UART packets and checks for their integrity. However, the
  101. application only uses the inputs from CENTER BUTTON PRESS, WHEEL POSITIONS, and
  102. GESTURES to generate virtual keystrokes.