310 likes | 613 Views
Communication between Host and MCU via Silicon Lab’s USB Debug Adapter. Department of Computer Science and Software Engineering Southern Polytechnic State University. Objective. Use USB debug adapter for communication purposes
E N D
Communication between Host and MCU via Silicon Lab’s USB Debug Adapter Department of Computer Science and Software Engineering Southern Polytechnic State University
Objective • Use USB debug adapter for communication purposes • Develop software for communication between host and MCU via USB debug adapter (JTAG) • Data collected in MCU (8051 board) can be sent back to host for further processing, e.g., distributed by a web server • Host can query the status of MCU, e.g., request information such temperature, etc.
Hardware • Silicon Labs Stuff • 8051 development board SA-TB1PCB-005 • USB Debug Adapter (EC3) • A PC (laptop or desktop)
Software Download and Installation • Flash Programming Utility, http://www.silabs.com/Support%20Documents/Software/UtilDLL.zip • Silicon Labs IDE • Microsoft Visual Studio 2008
Documents • Flash Programming Utilities, http://www.silabs.com/products/mcu/Pages/FlashProgrammingUtilities.aspx • Silicon Labs application note An117, http://www.silabs.com/Support%20Documents/TechnicalDocs/an117.pdf
Using SiUtil.lib and SiUtil.dll • Developed by Silicon Labs for programming USB interface • Both C2 and Jtag are supported • We will test Jtag and static library only. • The following step-by-step instructions will set up environment in Visual Studio 2008 to use the library.
Make sure SiUtil.dll and USBHID.dll are copied to the Debug directory.
MCUProgramming • Start Silicon labs IDE (a tutorial can be found somewhere in the web) • Open the project obtained from this web. • Compile and download it to the MCU 8051
MCUCode • The MCU code simply enters a loop, check the value at address 0x1a. • If its value equals to 0xab, the program turns on the green LED. • Otherwise, it turn off the green LED.