Upload
asutoshpat
View
226
Download
0
Embed Size (px)
Citation preview
7/27/2019 USB Ethernet ISP Handson
1/27
USB & Ethernet
Working Examples
Ivy Cheong
Product Line Microcontrollers
Business Line Standard ICs
J uly, 2007
7/27/2019 USB Ethernet ISP Handson
2/27
USB Firmware Examples
Koninklijke Philips Electronics
7/27/2019 USB Ethernet ISP Handson
3/27
COMPANY CONFIDENTIAL
Installing latest Keil software V3.11 and
Hardware setupOn your CD, go to
D:\LPC2300\software\Installer\Keil
Double click on mdk311.exeFollow the instructions to install the software
Connect the Keil ULINK to your PC via USB
Connect the MCB2300 board to your PC via USB
7/27/2019 USB Ethernet ISP Handson
4/27
Audio Device Class Example(Keil)
7/27/2019 USB Ethernet ISP Handson
5/27
COMPANY CONFIDENTIAL
Running the Audio Device Class Example
Open up Keil uVision3
Open the Audio example:
C:\Keil\ARM\Boards\Keil\MCB2300\USBAudio\Audio.Uv2
Rebuild all target files
Download to Flash
Disconnect and Re-connect MCB2300 USB cable
(wait a few seconds in between)
7/27/2019 USB Ethernet ISP Handson
6/27
7/27/2019 USB Ethernet ISP Handson
7/27
COMPANY CONFIDENTIAL
Running the Audio Device Class Example
(cont.)Open and play an MP3 file
(there is one on your CD)
MCB2300 will act as a USB speaker Sound from the speaker (DAC output) Potentiometer controls the volume
LEDs act as VU meter (VU=Volume Unit)
7/27/2019 USB Ethernet ISP Handson
8/27
Mass Storage Device (MSD) ClassExample (Keil)
7/27/2019 USB Ethernet ISP Handson
9/27
7/27/2019 USB Ethernet ISP Handson
10/27
COMPANY CONFIDENTIAL
Running the Mass Storage Device (MSD)
Class Example (cont.)Go to My Computer
MCB2140 will show up
as removable disk
Double-click the drive to access the content
Experiment with the example Open Readme.txt
Create a new directory
Store a (small) file
7/27/2019 USB Ethernet ISP Handson
11/27
COMPANY CONFIDENTIAL
Running the Mass Storage Device (MSD)
Class Example (cont.)You can also see the drive in the Hardware Device Manager (Start | Control
Panel | System | Hardware | Device Manager)
Double-click to see the properties
7/27/2019 USB Ethernet ISP Handson
12/27
COMPANY CONFIDENTIAL
Running the Mass Storage Device (MSD)
Class Example (cont.)If you disconnect the
USB cable, the drive
will disappear from the view
If you re-connect, the drive will show up again, but all modifications you made
will be gone The example is only using RAM (8KB) for storage,
not Flash
7/27/2019 USB Ethernet ISP Handson
13/27
Human Interface Device (HID) ClassExample (Keil)
7/27/2019 USB Ethernet ISP Handson
14/27
COMPANY CONFIDENTIAL
Running the Human Interface Device (HID)
Class ExampleNOTE: HIDClient does not work on MCB2300, need modification in
HIDClient.exe
Open up Keil uVision3Open the HID example:
C:\Keil\ARM\Boards\Keil\MCB2140\USBHID\HID.Uv2
Rebuild all target files
Download to Flash
Disconnect and Re-connect MCB2300 USB cable
(wait a few seconds in between)
7/27/2019 USB Ethernet ISP Handson
15/27
COMPANY CONFIDENTIAL
Running the Human Interface Device (HID)
Class Example (cont.)You can also see the HID in the Hardware Device Manager (Start | Control
Panel | System | Hardware | Device Manager | Human Interface Devices )
Double-click to see the properties
7/27/2019 USB Ethernet ISP Handson
16/27
COMPANY CONFIDENTIAL
Running the Human Interface Device (HID)
Class Example (cont.)
Open HID Client example #1:
C:\Keil\ARM\Utilities\HID_Client1\Release\HIDClient.exe
Select Keil MCB2140 HID Device:
You can now control the LEDs:
(Output)
The INT1 Button will be recognized:
(Input)
7/27/2019 USB Ethernet ISP Handson
17/27
EasyWeb Example (Keil)
7/27/2019 USB Ethernet ISP Handson
18/27
COMPANY CONFIDENTIAL
Running the EasyWEB Example
This project is a tiny web server that shows the values of two analog
inputs (AD0 and AD1) on a web page. This project allows access from
the internet to open the board page, accept instructions and run a
small application, as blinking the LEDs or displaying a short message
on the LCD.
Open up Keil uVision3
Open the EasyWEB example:
C:\Keil\ARM\Boards\Keil\MCB2300\EasyWEB\easyweb.uV3
Rebuild all target files
Download to Flash
Disconnect and Re-connect MCB2300 USB cable
(wait a few seconds in between)
7/27/2019 USB Ethernet ISP Handson
19/27
COMPANY CONFIDENTIAL
Running the EasyWEB Example
7/27/2019 USB Ethernet ISP Handson
20/27
COMPANY CONFIDENTIAL
Running the EasyWEB Example
Open Command Prompt, and ping to 192.168.0.100
7/27/2019 USB Ethernet ISP Handson
21/27
COMPANY CONFIDENTIAL
Running the EasyWEB Example
Under LAN settings, selectAutomatic detect settings
7/27/2019 USB Ethernet ISP Handson
22/27
COMPANY CONFIDENTIAL
Running the EasyWEB Example
Open an Internet Browser and type http://. This
should display the following screen:
7/27/2019 USB Ethernet ISP Handson
23/27
Using FlashMagic
7/27/2019 USB Ethernet ISP Handson
24/27
COMPANY CONFIDENTIAL
FlashMagic - ISP Blinky Example
Open up Keil uVision3
Open the Blinkyexample:
C:\Keil\ARM\Boards\Keil\MCB2300\Blinky\Blinky.Uv2
Rebuild all target files
Connect RS232 serial cable to COM0, make sure jumper ISP and RST
are connected on boards
7/27/2019 USB Ethernet ISP Handson
25/27
COMPANY CONFIDENTIAL
FlashMagic - ISP
Goto ISP | Read Device Signature to read device ID
Once communication is established, browse to your hex file and start
programming
7/27/2019 USB Ethernet ISP Handson
26/27
COMPANY CONFIDENTIAL
FlashMagic - ISP
Launch FlashMagic
Select COM Port, Baud Rate and Devices
In Advance Options | Hardware Config, checked on the following
7/27/2019 USB Ethernet ISP Handson
27/27
COMPANY CONFIDENTIAL