Connectivity Seminar
COM0100
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
V1.10 May 25th, 2009
Slide
Agenda
COM0100 - Morning
O
O
O
O
O
9:00
10:15
10:45
12:00
12:30
Part 1: USB Connectivity
Coffee break
Part 2 : Ethernet, TCP/IP & WiFi
Part 3 : Wireless Communications
End
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
Part 1:
USB
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
V1.10 May 25th, 2009
Slide
Objectives
O
After this class you will be able
to select an appropriate USB connectivity solution
for your embedded control application
select the most suitable PIC MCU for that purpose
select the appropriate development platform for
your application
decide which Microchip hands on training will
assist you in your development process.
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
Agenda
O
The Connectivity Challenge for Embedded Application
Designers
USB Overview
PIC Microcontroller solutions for USB from MCHP
Microchip USB Development Tools
USB Demo
How to get started
Summary & Resources
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
The Connectivity Challenge
O
Many embedded
applications require
connectivity to
external equipment
exchange control
signals
down load data
upload data and new
firmware
diagnostics
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
The Connectivity Challenge
O
O
Past Solution: RS232 Connectivity
New Challenge: No RS232 or parallel ports
on laptops or computers or printers
only USB, Ethernet and/or WLAN
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
The Connectivity Challenge
O
Alternative ?
keep using old computers
Use USB-to-RS232 adaptors
Solution: Implement USB connectivity in
your application
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
Agenda
O
The Connectivity Challenge for Embedded Application
Designers
USB Overview
PIC Microcontroller solutions for USB from MCHP
Microchip USB Development Tools
USB Demo
How to get started
Summary & Resources
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
USB Overview
O
USB was co-developed by a consortium of
companies.
Compaq/HP, Intel, Microsoft, LSI, NEC etc.
sought to create a single bus that would
O
O
Connect to many devices on the same bus
Be easy to add/remove peripheral devices
connected on the bus
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
10
USB Connectivity Advantages
Extend the functionality of
your computer!
Data Analysis,
Data Logging,
Firmware Updates,
Diagnostics,
Embedded Applications!
Auto detection & configuration (Plug&Play)
Easy expansion using hubs
Bus power reduces wall transformers
Data CRC protected, bad packets resent.
Three speeds:
Low- 1.5, Full- 12, High- 480 Megabits / second
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
RS232
Parallel
PS/2
Slide
11
Buses & Speeds Comparison
1394-Fire Wire
Does not have to
support High-Speed
to be USB 2.0
Compliant
Ethernet
WiFi (b/g)
USB 2.0
LS-USB
1.5 Mb/s
CAN
HS-USB
480 Mb/s
USB 1.1
Serial Port
500 Kb/s
FS-USB
12 Mb/s
Parallel Port
1 Mb/s
2008 Microchip Technology Incorporated. All Rights Reserved.
1.5 Mb/s
12 Mb/s
COM3100
100 Mb/s 480 Mb/s 1 Gb
Slide
12
Elements of a USB system
USB Host Controller (Master)
and Root Hub
Hub
Mouse Device
(Slave)
2008 Microchip Technology Incorporated. All Rights Reserved.
Printer Device
(Slave)
COM3100
Audio Device
(Slave)
Slide
13
USB Physical Interface
5V Power and GND Lines
Host Connector
D+ and D- Twisted Pair, Differential mode
Communication Lines
Device Connector
Four Wire Interface
5 V Power and GND line from which USB
Devices can draw power
Twisted pair, differential mode communication
lines for excellent noise immunity of data
Special connectors at Host and Device
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
14
USB Data Transfer Mechanism
O
USB is a Single Master + Multiple Slaves polled bus
USB Host Controller (Master)
and Root Hub
Mouse
Printer
Speaker
All Transactions are initiated by the Host
Devices respond to the Host
Devices cannot talk to one another
Each Device is polled by the Host
Shared USB bandwidth
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
15
USB Host
O
O
O
O
Manages and controls the Bus
Initiates all Transactions
Automatically detects all Device insertions and
extractions
Enumerates all Devices connected and matches
them with drivers
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
16
Typical MCU Requirements for Host
O
O
O
O
O
High throughput 32/64 bit MCU running a Real
Time Operating System like Windows
Applications with Graphical User Interface
USB Drivers identifying and enumerating USB
Devices
USB Host Controller, running at Full Speed
(12Mbps) or High Speed(480Mbps).
Microchips PIC MCUs typically not used as Host
However PICs can be used in embedded Host
applications as we will see next
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
17
Embedded Host
O
O
O
O
Embedded Application connected to a USB Peripheral
Device
Embedded Application not connected to another Host
Advantage: Smaller less complex embedded firmware
Example: Remote Temperature Data Logger
Download data to USB Flash Drive
Act as Host when connected to Flash Drive but
Not connected directly to PC Host
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
18
Typical Requirements for Embedded
Host
O
O
O
O
O
Peripherals to service real world inputs and
outputs
A/D converters, Comparators etc
Serial Interfaces like SPI, I2C, UART
PWMs, Timers and I/O lines
High throughput 16/32 bit MCU
Full Speed (12Mbps) USB OTG transducer with
data input/output buffers
Host Software Drivers to identify and enumerate
USB Peripheral Devices
Microchips 16 and 32 bit PIC MCUs are designed
for Embedded Host applications
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
19
USB Peripheral Device
O
O
O
O
Responds to Host, cannot initiate transactions
Requires drivers to be recognized by the Host
Hardware/Firmware to respond to Host
Microchips PIC MCUs are used in USB
Peripheral Devices
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
20
Typical MCU Features for Peripheral Device
O
Peripherals to service real world inputs and
outputs
A/D converters, Comparators etc
Serial Interfaces like SPI, I2C, UART
PWMs, Timers and I/O lines
O
O
O
Full Speed (12Mbps) USB transducer with data
input/output buffers
USB Device and peripheral interface Firmware
Throughput to service Full speed USB requests
Microchips PIC MCU are designed for USB
Peripheral Device applications
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
21
USB Peripheral Device Classes
Postcript
printer
MIDI device
Audio Device Class
Mouse
Data Glove
PICkit 2 / 3
HPCL printer
USB key
(thumb drive)
Floppy
Drive
External
Hard Drive
Mass Storage Device
Class (MSD)
Joystick
Printer Device Class
Serial
Bridge
Ethernet
Adapter
Modem
Real-Ice
Communication Device
Class (CDC)
ICD3
Keyboard
ICD2
Custom Class
(Vendor Class)
Human Interface Device Class
(HID)
Many more USB classes.
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
22
USB On-The-Go (OTG) and Dual Role
O
USB On-The-Go (OTG) allows Device to operate as Host
or Device
PDA (Device) connected to PC (Host)
PDA (Host) connected to Thumb drive (Device)
PDA in Dual Role Mode
PDA connected to PDA, host and device roles can switch
PDA in OTG mode
PC Host
PDA OTG Device
2008 Microchip Technology Incorporated. All Rights Reserved.
PDA OTG Host
Thumb Drive
COM3100
PDA OTG Host
PDA OTG Device
Slide
23
Typical Requirements for OTG Devices
O
Peripherals to service real world inputs and
outputs
A/D converters, Comparators etc
Serial Interfaces like SPI, I2C, UART
PWMs, Timers and I/O lines
O
O
O
O
O
High throughput 16/32 bit MCU
Full Speed (12Mbps) USB OTG transducer with
data input/output buffers
Host Software Drivers to identify and enumerate
USB Peripheral Devices
SW to run as Device when connected to Host
Microchips 16 and 32 bit PIC MCUs are designed
for USB OTG applications
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
24
USB Hub
O
O
O
O
Connects Additional
Devices to USB Bus
Max 5 Hubs on Root Hub Keyboard
Provides power to
devices connected
Most Hubs use ASIC
controllers
Speaker
Hub
Logic
Analyzer
Hub
Hub
Hub
Hub
Up to 126 peripherals...
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Data Logger
Slide
Hub
25
Summary of USB Elements
O
Full USB Host
PC
Embedded USB Host
No installable drivers
Reduced Firmware requirements
USB Peripheral Device
Mouse, Keyboard, Thumb drive, etc.
Dual Role/OTG
Can switch Roles
Can be OTG or just dual role
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
26
Agenda
O
The Connectivity Challenge for Embedded Application
Designers
USB Overview
PIC Microcontroller solutions for USB from MCHP
Microchip USB Development Tools
USB Demo
How to get started
Summary & Resources
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
27
Microchips USB PIC MCUs
O
O
O
O
O
Support USB 2.0 Low and Full Speed
On Chip USB/OTG Transducers, Voltage Regulator and
pull up resistors
On Chip PLL for USB Clock
USB Dual Port RAM
No additional hardware required to support USB
PIC USB Microcontroller
Built in Pullups
+5V
D+
Transceiver
DGND
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
28
Microchips USB PIC MCUs
O
O
O
O
O
O
8, 16, and 32 bit Architecture MCUs offered
20 - 100 Pin devices
8Kb up to 256Kb Flash Program Memory
512 bytes to 16Kb Data Ram
Voltage of Operation:1.8V to 5.5V
Wide Range of Peripherals for Real World
Applications
A/D converters, Comparators
SPI, I2C, UART
PWMs, Timers and I/O lines
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
29
PIC18F13K50 / 14K50
Low Pin count USB MCU
Features
O
8-bit, 12Mips
O
Voltage 1.8 to 5.5V
O
8KB/16KB Flash
O
512/768 Bytes SRAM
O
256 Bytes DPRAM
O
256 Bytes EEPROM
O
XLP Nanowatt
technology (sub uA
32kHz & watchdog)
O
25nA sleep mode
O
-40 to +125C
O
20 pins package
Peripherals
O
CCP + ECCP
O
SPI/IC
O
A/E/USART (232/485/LIN)
O
9 ch. x 10-bit A/D
O
1 x 8-bit, 3 x 16-bit timers
O
2 x Comparators
O
USB 2.0 Full Speed
O
16 endpoints (8 IN + 8 OUT)
Designed to be main MCU in Peripheral Device Applications
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
30
PIC24FJ256GB110
General Purpose / USB On-the-Go
Features
O
16-bit, 16 Mips
O
256KB Flash
O
16 KB RAM
O
100-, 80-, 64-pin
O
Internal Oscillator
O
3.3 V operation
USB OTG / HOST / DEVICE
O
Internal Boost Regulator
O
USB OTG Full Speed
Peripherals
O
4 x UART
O
3 x IC
O
3 x SPI
O
16 ch. x 10-bit A/D
O
5 x 16-bit timers
O
9 x IC, 9 x OC/PWM
O
Peripheral Pin Select
O
3 x Comparators
O
CTMU for capacitive keyboard
Designed to be the main MCU in Peripheral Device,
Embedded Host or OTG/Dual Role Applications
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
31
PIC32MX460F512L
General Purpose / USB On-the-Go
Features
O
32-bit, 80 Mips
O
512KB Flash
O
32 KB RAM
O
100-, 64-pin
O
Internal Oscillators
O
2.3-3.6 V operation
USB OTG / HOST / DEVICE
O
USB OTG Full Speed
O
DMA controller
Peripherals
O
4-ch. DMA
O
2 x UART
O
2 x IC
O
2 x SPI
O
16 ch. x 10-bit A/D
O
5 x 16-bit timers
O
5 x IC, 5 x OC/PWM
O
2 x Comparators
Designed to be the main MCU in Embedded Host
or OTG/Dual Role Applications
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
32
Typical PIC MCU Application
PIC MCU based Application
New Communications via USB
A/D, PWM, SPI,
I2C, I/O, etc.
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Old Communications via RS232
Slide
33
Solution From Microchip
O
AN956: Migrating Applications to USB from RS232
PIC18 based applications
Implementation done on Standard Full Speed Demo Board
Communication Device Class (CDC) Implementation
C Code easily migrates to other USB PIC MCUs
4KB of firmware to implement USB interface
Supports all PIC MCUs with Full Speed USB
Includes windows based drivers for the Host PC
RS232
USB
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
34
Solution From Microchip
AN1003: USB Mass Storage
Standard
Windows
Drivers
MSD Pictail Board
Full Speed Demo Board
USB
USB Interface to a MSD Class device
Implemented using Secure Digital/Multimedia Card
PIC MCU implementation on standard Full Speed
Demo board and MSD Pictail Board
Uses standard Windows based drivers: usbstor.sys
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
35
Solution From Microchip
USB PICtail
QVGA PICtail
Explorer 16
O
O
O
Embedded Host Using the PIC24FJ256GB110 (16-bit) or
PIC32MX460F512L (32-bit)
Host reads & decode jpeg or bit mapped pictures from
USB Flash Drive (File system)
Host Displays pictures on QVGA color display
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
36
Microchips USB PIC MCU solutions
O
USB Device, Embedded Host or OTG
Applications:
Real world interface
O
Collect data on Temperature, Pressure, weight,
etc.
Control heaters, motors, displays etc.
Interface to a PC, Embedded Host or USB
Device
O
For data analysis, display, storage, etc.
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
37
USB Solutions from Microchip
Complexity and Speed
Full-Speed On-The-Go (12 Mbps)
Full Speed USB Embedded Host or Device
Negotiates with other OTG Products
Copy Box, PDA, Portable Instrument
Full-Speed Embedded Host (12 Mbps)
Full Speed USB Embedded Host
Security System, Download Files, Upload Software
Full-Speed Device (12 Mbps)
Full Speed USB Device
Biometrics, Data loggers
Low-Speed Device (1.5 Mbps)
Low Speed USB Device
Mouse, Keyboard, Speaker, Cell Charger
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
38
Agenda
O
The Connectivity Challenge for Embedded Application
Designers
USB Overview
PIC Microcontroller solutions for USB from MCHP
Microchip USB Development Tools
USB Demo
How to get started
Summary & Resources
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
39
PICDEM Full-Speed USB
O
O
O
O
PIC18F4550, 20 MHz xtal
O Power LED Indicators
USB Port
O Potentiometer
Serial Port
O Temperature Sensor
PICtail Daughter Board Compatible
(for PIC18) PICDEM FS-USB ref : DM163025
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
40
Low Pin Count USB Development Kit
O
O
O
O
O
O
O
Demo board for
PIC18F13K50 &
PIC18F14K50
Connects directly to
PICkit 2 / PICkit 3
USB 2.0 Port
RS232 Port
LEDs
Potentiometer
Breadboard area
Software for USB
peripheral devices
Tutorials
(Can also be purchased without Pickit 2) ref : DM164127
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
41
PIC18F87J50 FS USB Plug-In Module
O
O
O
O
O
PIC18F87J50, 12 MHz xtal
USB Full Speed Port
LEDs,
Pushbuttons
Plugs as Plug In Module
(PIM) on other boards to get
extra I/Os UART
connector, :
O
O
PIC18 Explorer Board (DM183032)
PICDEM HPC Explorer Board (DM183022)
PIC18F87J50 FS USB Demonstration
Plug-In Module (ref MA180021)
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
42
Explorer 16 USB Demo boards
Explorer 16
(DM240001)
USB PIC MCU PIM
USB PICtail+
PIC24F : (MA240014)
PIC32 : (MA320002)
(AC164131)
Demo board for all 16 and 32bit
PIC MCUs
Requires 16 or 32 bit USB PIC
MCU PIM
Requires USB PICtail+ Daughter
Board
2008 Microchip Technology Incorporated. All Rights Reserved.
O
COM3100
Supports OTG, Embedded Host and
Device
USB OTG stacks for Device and
host
Class drivers for Generic, HID, and
Mass Storage
Slide
43
PIC24F Starter Kit
Debugger Port
(DM240011)
USB Peripheral Device Port
OTG Port
Debugger
O
O
O
O
O
O
Application
The PIC24F Starter Kit is based on the PIC24 USB MCU
Highlights the PIC24 as a Embedded Host or OTG
USB Flash Drive Interface
Interactive Display and Touch keypad interface
Built-in MPLAB compatible Debugger / Programmer
Board powered by USB port to PC
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
44
PIC32 USB Starter Board
USB Peripheral Device Port
Debugger
Port
Debugger Port
Thumb Drive
Connection
(Host)
(DM320003)
On-The-Go Port
(Dual-Role)
OTG Port
O
O
O
O
O
The PIC32 USB Starter Board is based on the PIC32MX460F512 USB MCU
Highlights the PIC32 as an Embedded Host or OTG
USB Peripheral Device Interface
Built-in MPLAB compatible Debugger / Programmer
Board powered by USB port to PC
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
45
USB Development Support
O
Microchip USB Design Center
All USB Development Boards and Kits available for sale
from Microchip/Distributors/Catalog partners
Detailed Product Information at:
www.microchip.com/pic32
www.microchip.com/pic24
www.microchip.com/pic18
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
46
Agenda
O
The Connectivity Challenge for Embedded Application
Designers
USB Overview
PIC Microcontroller solutions for USB from MCHP
Microchip USB Development Tools
USB Demo
How to get started
Summary & Resources
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
47
Demo 1 Peripheral Device PIC18
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
48
Demo 2 Embedded Host PIC24
USB PICtail
QVGA PICtail
Explorer 16
O
O
O
Embedded Host Using the PIC24FJ256GB110 (16-bit) or
PIC32MX460F512L (32-bit)
Host reads and decode jpeg or bit mapped (BMP)
pictures from USB Flash Drive (file system)
Host Displays pictures on QVGA color display
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
49
Agenda
O
The Connectivity Challenge for Embedded Application
Designers
USB Overview
PIC Microcontroller solutions for USB from MCHP
Microchip USB Development Tools
USB Demo
How to get started
Summary & Resources
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
50
Microchip Regional Training Centers
(RTCs)
O
O
O
Worldwide network of training facilities
Product, Tools and Applications-orientated classes
(Ethernet, USB, Motor Control, etc..)
Flexible
Most classes are half day or one day duration
Classes can be performed in-house (min 5 eng x 2 days)
Cost Effective
Cost varies between 60 , 120 or 150 + tax
Discounts coupons on development tools (20%)
6 training centers in Europe (FR : Les Ulis (91) near Paris)
http ://www.microchip.com/RTC
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
51
RTC Training Curriculum
New to Microchip
You
are
here
MPLAB Tool
Basics TLS0103
New to PIC18
PIC18 Arch.
MCU2101
PIC18 Peri.
MCU2121
New to PIC24
16-bit Arch.
MCU3101
16-bit Peri.
MCU3121
New to USB
Intro USB
COM3101
USB Device Ap.
USB Device
COM3201
USB Emb. Host
USB Host
COM3202
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Adv Peri.
MCU3122
Slide
52
Introduction to USB
COM3101
O
Target Audience: New to USB and would like a fast path to
developing a Full USB Application
Class Details
O
O
Full USB Hardware and Protocol
Practical USB Design Issues
Debugging Host-Device USB Transfers
USB Device Classes
USB Compliance Testing
All concepts reinforced with Hands-on exercises using standard
Microchip Development Boards and Tools
Class Length: 7 hours
Class dates: please see handout or www.microchip.com/rtc
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
53
USB: Bridging The Gap Between PC
Application & End Device (COM3201)
O
Target Audience: Engineers interested in implementing generic data
transfer between a Windows PC Host and a Device using CDC, HID
and Custom USB Device Classes.
Class Details:
O
O
Full-Speed USB Review
USB PIC MCUs and Frameworks
Windows Basics and Programming
Generic Data Transfer using CDC Class
Generic Data Transfer using HID Class
Generic Data Transfer using Custom Class
Class Length: 7 hours
Class dates : see handout or www.microchip.com/rtc
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
54
USB Embedded Host Application Using
Microchip Framework (COM3202)
O
Target Audience: Engineers interested in designing USB
OTG or Embedded Host Application using MCHPs USB
Framework
Class Details:
USB OTG and Embedded Host Hardware
USB OTG and Embedded Host Protocol
USB Host Device Interface Protocol
Microchips Solutions for OTG and Embedded Host
Firmware/Software
All Concepts reinforced using Hands-on exercises on Standard
Microchip Development Boards and Tools
Class Length: 7 hours
Class dates: see handout or www.microchip.com/rtc
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
55
Agenda
O
Brief USB Overview
PIC Microcontroller solutions from MCHP
Microchip USB Development Boards
USB Demo
Next Step in RTC USB Training
Summary & Resources
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
56
Summary
O
Microchip Offers a Complete Range of USB Solutions:
Wide Range of PIC MCU
O
with built-in USB and USB OTG Transducers
O
8-bit, 16-bit and 32-bit MCU solutions
USB Device solutions for HID, CDC, MSD and Custom Class
Embedded Host and OTG solutions for MSD, HID and Generic
Class
PC side Drivers for Windows interface via USB
Standard Demo boards for quick prototype development
Application Notes for Step-by-Step guidance
Hand-on training classes for developing expertise and
knowledge on USB
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
57
COM0100
Connectivity Seminar
- Part 2 -
Overview of Ethernet, TCP/IP & WiFi
Connectivity Solutions
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
V1.10 May 25th, 2009
Slide
58
Objectives
O
Learn application possibilities for
Ethernet, TCP/IP & WiFi designs
Become familiar with Microchips
Ethernet, TCP/IP & WiFi offerings
Understand the capabilities of several
application protocols
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
59
Agenda
O
Introducing Ethernet
Microchips Offerings
Starting Your Design
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
60
Introducing Ethernet
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
61
Why Ethernet?
O
Most widely deployed network
Offices, homes, industrial buildings
Huge existing infrastructure
Interoperable
Open standards
Leverage existing protocols
Leverage existing software
Large support community
Once equipment is connected to an Ethernet
network, it can be monitored or controlled
through the Internet
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
62
Demo 1
O
WEBSERVER : Remote Monitor and Control
Text-based over Telnet
Graphical over HTTP
Cross-platform!
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
63
Demo / Example 2
O
Send e-mail alerts
Attachments work too
SMS gateways to cell phones
WA
O v RNI
Ba erhe NG:
co ckup at!
sta oling
rte
d.
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
64
Why Ethernet?
O
Scalable Network
Inexpensive equipment
Automatic configuration
The Internet
Same standards, same protocols
Standards are called Request for Comments (RFC)
Cross-Platform Windows, Mac, Linux,
Easy migration to wireless
WiFi 802.11 is interoperable with Ethernet
O
O
Same standards, same protocols
Just replace the MAC/PHY layers
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
65
What is Ethernet?
O
Broadband networking technology
Standardized as IEEE 802.3
Many different speeds
10 Mbps, 100 Mbps, 1 Gbps,
MAC address provides unique address for every node
Requires an Organizationally Unique Identifier (OUI)
Purchasable from IEEE
http://standards.ieee.org/regauth/oui/index.shtml
$1,650 USD for 16 million addresses, $550 USD for 4,096
addresses
CAT5+ cable is the most prevalent in use today
Twisted Pairs
RJ-45 connector
Uses Star topology
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
66
Basic Networking
O
A network may consist of:
Computers
Printers
Network Infrastructure Equipment
O
Hubs
O
Switches
O
Routers
Embedded Devices, IP Phones....
Do all nodes on a network operate at the same speed using the
same cable type?
In most cases the same CAT5+ cable is used
WiFi is also popular
All of which can operate at various speeds
Is there a maximum Ethernet cable length?
Yes, any single Ethernet cable should not exceed 100m
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
67
Basic Networking Hubs
O
Older Equipment, superseded by the Switch
Generally 10 Mbps with some 10/100 Mbps
A hub is effectively an electrical repeater
Data comes in on one port and is sent out to all other ports
No traffic filtering or intelligence is applied to the data
transfer
This can result in slow traffic
Useful for development
Repeater function useful when monitoring network traffic
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
68
Basic Networking Switches
O
Most commonly used piece of equipment
Can provide 10/100 Mbps with many 10/100/1000 Mbps
The switch intelligently filters traffic
Keeps a list of which nodes are connected to which port
Auto sense the speed of the end device
Store and forward mechanism buffers data on one port and then
forwards to another
Accepts data at 10Mbps on one port and transmits on another port
to the destination at 100/1000Mbps (and vice versa)
Helps reduce traffic on the network
For development, a switch with Port Mirroring capability is useful
Allows 1 port to be mirrored onto another port for monitoring/sniffing
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
69
Basic Networking Routers
O
Connects networks together
LAN Segment to LAN Segment
LAN to WAN
Creates 'Routing Tables' to intelligently route data to its destination
ADSL Routers or Residential Gateway converts IP over Ethernet to
IP over Cable or DSL
Makes all devices on Ethernet side look like one single device
Uses Network Address Translation (NAT) to translate addresses between
Internet and Local Network Addressing
Routers work at the IP address level
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
70
Basic Networking
Do I really need 100 Mbps?
O
In most cases, for embedded devices, 10 Mbps is more
than adequate
Data traffic is low
Connection speed is high
Modern switched network will automatically manage and
handle speed difference
There will be some cases where 100 Mbps IS required!
e.g. Streaming High Quality Video
Maximum ADSL/Cable link is usually less than 10Mbps
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
71
Basic Networking
Theory Test
MODE L
ProSafe VPN Wireless ADSL Gateway
100
1
TEST
24 PORT
10/100Mbps
MODE L
Fast Ethernet Switch
LINK/ACT
DSL
DGFV 338
LOCAL
INTERNET
100
PWR
8
Link/ACT
WLAN
FS 524
100 Mbps
1
12
12
L ink
Green=Rx/Tx, Yellow=Collision
F DX
100 Mbps
13
Bay Networks
Power
Auto
Uplink
24
Green=Rx/Tx, Yellow=Collision
13
24
SD
SUPER
STACK
1x
7x
6x
3 Com
Status
green=enabled, link OK
flashing green=disabled, link OK
off=link, fail
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11 12
Packet
Status
12x
SuperStack II
Baseline 10/100 Switch
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
72
Basic Networking
Theory Test Answer
MODE L
ProSafe VPN Wireless ADSL Gateway
100
1
TEST
24 PORT
10/100Mbps
MODE L
Fast Ethernet Switch
LINK/ACT
DSL
DGFV 338
LOCAL
INTERNET
100
PWR
8
Link/ACT
WLAN
FS 524
100 Mbps
1
12
12
L ink
Green=Rx/Tx, Yellow=Collision
F DX
100 Mbps
13
Bay Networks
Power
Auto
Uplink
24
Green=Rx/Tx, Yellow=Collision
13
24
SD
SUPER
STACK
1x
7x
6x
3 Com
Status
green=enabled, link OK
flashing green=disabled, link OK
off=link, fail
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11 12
Packet
Status
12x
SuperStack II
Baseline 10/100 Switch
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
73
Application Ideas
O
Asset Management
Networked vending machines
Special event
price is $2.50
Diet Cola
is low!
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
74
Application Ideas
O
Home Automation
Running late at work? Preheat the oven!
Preheat
to 350F
Internet
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
75
Application Ideas
O
Data Logging
Kate has
arrived!
Remote door locks
Door
Door
Door
Door
2008 Microchip Technology Incorporated. All Rights Reserved.
2
1
3
3
8:57a:
9:14a:
10:32a:
1:57p:
...
COM3100
Clare
John
Mark
Kate
Slide
76
Application Ideas
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
77
Embedded Advantages
O
O
Yes we can do anything and everything with a PC but...
With an embedded solution we can do it with
O Lower Cost
O Smaller Size
Less working parts, so less to go wrong
O No Fans
O No Hard Drives
And we can still obtain
Scalable performance with PIC18, PIC24, dsPIC DSC,
and PIC32
Graphical Interfaces
Mass storage on USB Drives, CF and SD Cards
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
78
Microchips Offerings
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
79
Microchips Offerings
O
Ethernet Hardware
Demo 3 Internet Radio
TCP/IP Stack
Whats Included?
O
O
Microchip Development Tools
Third Party Tools
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
80
Ethernet Hardware
O
ENC28J60 In Production
Stand-alone 10Mbps Ethernet Controller
Integrated MAC + PHY + 8kB SRAM
3.3V, 20MHz SPI interface
28-pin SOIC, SSOP, QFN, SPDIP
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
81
Ethernet Hardware
O
PIC18F97J60 Family In Production
PIC18 8-bit microcontroller
Integrated 10Mbps MAC + PHY
3.3V, 64-128K Flash, 3.8kB + 8kB RAM
64-, 80-, or 100-pin TQFP
Extra 8kB is memory mapped
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
82
Ethernet Hardware
O
ENC424J600 (44pins) / ENC624J600 (64pins)
Stand-alone 10/100Mbps Controller
Integrated MAC + PHY + 24kB SRAM
3.3V, 20MHz SPI or 8/16 parallel interface
44-pin TQFP and QFN, 64-pin TQFP
Pre-programmed MAC Address
Hardware encryption acceleration for SSL
O
RSA, DHE, AES, MD5, SHA-1
Schedule
O
O
Datasheet : now
Samples : Q3 CY 2009
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
83
Demo 3
O
Internet Radio
Streams MP3 from SHOUTcast servers
Uses PIC18F67J60
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
84
Demo 3
SHOUTcast
Server
MP3
Audio
MP3 Decoder
64kB RAM
Ethernet
Internet
(HTTP Client)
2008 Microchip Technology Incorporated. All Rights Reserved.
PIC18F67J60
COM3100
Slide
85
TCP/IP Stack
O
O
Hardware just generates the signals
Still need to:
Find other nodes and addresses
Transmit data to specific nodes
Manage incoming/outgoing packets
Communicate with other software
Microchip TCP/IP Stack!
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
86
TCP/IP Stack
O
C source code provided
O
O
O
O
O
No-fee license agreement
Use Microchip PIC MCU or dsPIC DSC
Only driver for ENC28J60 can be ported
Download: www.microchip.com/tcpip
PIC18, PIC24, dsPIC DSC, PIC32
RTOS Independent & Modular
Supports multiple connections
Example projects in the stack
Microchip technical support & training
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
87
UDP
ICMP
FTP
HTTP
SMTP
Telnet
SNMP
DHCP
DNS
SNTP
NBNS
Whats Included?
Transport
TCP
ARP
IP
Ethernet MAC/PHY (Silicon)
2008 Microchip Technology Incorporated. All Rights Reserved.
Application
COM3100
Addressing
Physical
Slide
88
Whats Included?
HTTP
SMTP
Telnet
SNMP
TCP/UDP
SSL
Bootload
DDNS
Web Server
Serve web pages and process web form input
E-mail Client
Send e-mail or SMS messages
Command-Line Interface Server
Allow simple text-based monitoring and control
Simple Network Management Protocol Server
Aggregate enterprise monitor/control capabilities
Generic Data Transports
Retrieve data from servers, or serve data to clients
Secure Socket Layer
Encrypt communications over untrusted networks
TFTP Bootloader
Update embedded firmware remotely
Dynamic Domain Name Service Client
Associate host names with dynamic addresses
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
89
Secure Sockets Layer SSL
O
O
O
O
O
SSL Module Available with Stack v4.5x
Required Encryption Routines are
provided separately and require purchase
www.microchipdirect.com
SW300052 Download or CD
Subjected to Export Regulations
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
90
Example / Demo 4
Secured Web Server
O
512-bit RSA Performance
PIC18 - Connects in ~6 seconds
PIC24 - Connects in ~2 seconds
PIC32
- Connects in less than 0.3 seconds
128-bit ARCFOUR Throughput
PIC18 - 11k bytes/s
PIC24 - 20k bytes/s
PIC32 - 95k bytes/s
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
91
Microchip Development Tools
O
PICDEM.net 2 Board (DM163024)
PIC18F97J60
ENC28J60
Ethernet PICtail Board
(AC164121)
PICDEM HPC Explorer
(DM183022)
PIC18 Explorer
(DM183032)
Ethernet PICtail Plus Board
(AC164123)
Explorer 16 (DM240001)
PIC24, dsPIC DSC, PIC32
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
92
Third Party Tools
O
CMX-MicroNet
Alternative TCP/IP Stack (www.cmx.com/microchip)
Useful when using ENC28J60 with non-PIC MCUs
TCPmaker
Visually generates web management interface code
www.tracesystemsinc.com
EZ Web Lynx
Ethernet module for existing applications
Analog, digital, and serial I/O pins
www.ezweblynx.com
Others
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
93
Starting Your Design
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
94
Server or Client?
O
Server
Listens for connections from remote nodes
Always on, always waiting
Fixed location or address
Client
Makes connection to remote node
Occasionally active event driven
Unknown location or address
Traffic flows both ways for either!
Difference is who initiates the connection
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
95
Server or Client?
O
Firewalls & Routers
Block most incoming traffic
Allow most outgoing traffic
Internet
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
96
Selecting a Protocol
HTTP
SMTP
Telnet
SNMP
TCP/UDP
SSL
Web Server
Serve web pages and process web form input
E-mail Client
Send e-mail or SMS messages
Command-Line Interface Server
Allow simple text-based monitoring and control
Simple Network Management Protocol Server
Aggregate enterprise monitor/control capabilities
Generic Data Transports
Build your own protocol!
Secure Socket Layer
Encrypt traffic between two nodes
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
97
Example / Demo 5
O
Legacy Serial to Ethernet Bridge
Waits for connections
Forwards:
O
O
Incoming Ethernet data to serial port
Incoming serial data to remote node
( Projet included by default
in TCPIP stack )
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
98
Demo 5
Ethernet
TCP Server
2008 Microchip Technology Incorporated. All Rights Reserved.
TCP Client
COM3100
Slide
99
Example / Demo 6
O
Information Appliance
Fetch data from Internet
Display on screen or some other manner
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
100
Demo 6
RSS News
Server
RSS
Headlines
es
qu
Re
t
Internet
Ethernet
HTTP (TCP) Client
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
101
Typical Connection overview
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
102
Typical Connection
External Components
O
O
25MHz 50ppm Crystal
RJ-45 Jack
Ethernet Transformer Module
Use types with integrated magnetics
O
O
O
See specification in ENC28J60 Data Sheet
Passive Components
~11 Resistors
~10 Capacitors
1 Ferrite Bead
3.3V 200mA Power Supply
Unique MAC Address
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
103
What Next?
O
Download Microchip TCP/IP Stack
http://www.microchip.com/tcpip
v5.00 with WiFi support available NOW
Regional Training Center (RTC)
COM4201 Designing a Web-based
Monitor and Control Application
O
O
O
8 hours hands-on class
Class scheduled every 2 months
For further dates and locations please check
handout or http://www.microchip.com/rtc
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
104
Software Tools
O
MPLAB IDE
http://www.microchip.com/mplab
MPLAB C18 / C30 / C32 compiler
http://www.microchip.com/mplabc
Wireshark Packet Sniffer (free)
http://www.wireshark.org
Third Party Tools
TCPmaker, Proteus VSM, CMX-MicroNet,
ModbusTCP
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
105
Getting Help
O
Microchip TCP/IP Stack Help
Comes with TCP/IP Stack
On your Windows Start menu
Application Notes
AN1120 Ethernet Theory of Operation
AN870 SNMP Agent
Microchip Forums
http://forum.microchip.com
Direct Questions
http://support.microchip.com
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
106
Introducing embedded
WiFi solutions
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
107
Microchip + ZeroG WiFi solution
http://www.zerogwireless.com/
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
108
Core value propositions
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
109
ZeroG vs existing WiFi
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
110
Good Fit for embedded WiFi
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
111
Application examples
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
112
Configuration example
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
113
Development Tools
AC164136 ZeroG 802.11
Demonstration kit for Explorer 16
AC164136-2 ZeroG 802.11
Pictail Plus card for Explorer 16
FREE TCPIP STACK WITH WiFi support (from v5.00) :
http://www.microchip.com/TCPIP
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
114
Development Tools (optional)
DM240001 - Explorer 16 Demo Board
+ AC162048 - RS232 / 9V desktop kit
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
DV164035 - MPLAB ICD3
Programmer / Debugger
Slide
115
WiFi module
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
116
COM0100
- Part 3 Wireless Networking Solutions ZigBee
and MiWi Protocols
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
V1.10 May 25th, 2009
Slide
117
Objectives for This Class
Introduce IEEE 802.15.4, ZigBee,
MiWi, and MiWi P2P wireless
networking protocol standards
Show how Microchip can help you with
your ZigBee or MiWi protocol designs
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
118
Agenda
O
O
Overview of IEEE 802.15.4 Wireless Network
Standard
Overview of ZigBee, MiWi, and MiWi P2P
Wireless Network Protocols
How they Work
Example Applications
Differences Between ZigBee, MiWi, and MiWi P2P
Protocols
Microchip solutions for ZigBee, MiWi, and MiWi P2P
Protocols
Silicon
Software
Development Tools
Recommendations and Summary
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
119
Wireless Networking Options
Range (meters)
10,000
Cellular
Technologies
GSM, GPRS
1,000
802.15.4
100
WLAN Technologies
IEEE 802.11
ZigBee
MiWi
Proprietary MiWi P2P
10
Bluetooth
1
1
10
2008 Microchip Technology Incorporated. All Rights Reserved.
100
1,000
COM3100
10,000
100,000
Slide
120
What is IEEE 802.15.4?
Wireless network standard for low power, low
data rate (250 kbps max) applications
Defines the following:
Medium Access Control (MAC) and
Physical Control (PHY) layers
Security (AES128 bit encryption)
Packet Types and Formats
Supports multiple network topologies
ZigBee, MiWi, MiWi P2P protocols use this
standard
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
121
IEEE 802.15.4
Frequencies and Data Rates
2.4 GHz
Band
Coverage
ISM
Worldwide
250 kbps
16
Europe
20 kbps
Americas
40 kbps
10
868 MHz
915 MHz
ISM
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Data Rate
# Of Channel(s)
Slide
122
IEEE 802.15.4 Network Formation
Finding a
network:
Beacon request
Beacon
Is there a network
out there already?
(Beacon Request)
out there already?
(Beacon Request)
I would like to join
your network.
(Association
Request)
Yes, Here is the
network info.
(Beacon)
Direct Message
Broadcast
End Device
PAN Coordinator
Sure, here is your
network address.
(Association
Response)
2008 Microchip Technology Incorporated. All Rights Reserved.
Association
Request
Association
Response Is there a network
COM3100
Slide
123
IEEE 802.15.4 Topology Examples
PAN
P2P
Star
Cluster Tree
Mesh
Full Function Device (FFD)
Reduced Function Device (RFD)
Coordinator (FFD)
PAN = Personal Area Network
Total devices in a PAN = 65536
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
124
Coordinator
Forms the network
Allows other nodes to join
Transceiver always on
Mains powered
Requires relatively large
amount of program and data
memory
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
125
Router
Extends the physical reach of
the network
Capable of peer-to-peer
communication
Transceiver always on
Mains powered
Requires relatively large amount
of program and data memory
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
126
Full Function Device
Nearly identical to a router
Does not allow other nodes to
join the network
Capable of peer-to-peer
communication
Requires less RAM and ROM
than a router
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
127
Reduced Function Device
Found on edge of network
Can communicate only with its
parent node
Can be battery powered
Requires the least amount of
RAM and ROM
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
128
IEEE 802.15.4 Reliability
Coordinating control of the media with CSMA-CA
Packets are acknowledged on MAC layer and possibly on
the application level
Data
B
A
Time
C
Network
Nodes
Data
Ack to A
Data
Ack to B
Ack From C To A
Ack to C
Ack From C to A
Direct Message
Ack to B
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
129
How ZigBee & MiWi Protocols
add to IEEE 802.15.4
ZigBee and MiWi (P2P) protocols define
how devices discover and connect with
each other
Determines the size of the network
Adapts to changing network conditions
Self healing compensates for device failures
Network senses a mobile users location and
automatically adapts to maintain connections
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
130
Adaptability/Recoverability
Failure at join point
Coordinator
End device
Direct Message
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
131
Mobility
O
Node locations environment may change over time
Coordinator
End device
Direct Message
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
132
Mobility
O
Node locations environment may change over time
Coordinator
End device
Direct Message
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
133
Mobility
O
Node locations environment may change over time
Coordinator
End device
Direct Message
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
134
Mobility
O
Node locations environment may change over time
Coordinator
End device
Direct
Message
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
135
ZigBee and MiWi Protocols
Application Example
End Device
Coordinator
PAN Coordinator
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
136
Monitors
Sensors
Control, Automation
Security
Lighting
HVAC
Access, Closures
Monitors
Diagnostics
2008 Microchip Technology Incorporated. All Rights Reserved.
ZigBee and
MiWi Protocol
Applications
RF Remotes
Gameboys
PC Peripherals
COM3100
Remote monitors
Remote Meter Reading
Security
Lighting
Appliance Control, HVAC
Access, Closures
Slide
137
Transceiver: MRF24J40
Microcontroller
User Application
Protocol
Physical Driver
2.4 GHz IEEE 802.15.4 compliant
Supports ZigBee and MiWi
Protocols
4-wire SPI Interface
In-line/stand-alone encryption
Automatic MAC retransmit
MAC Architecture
SPI
Interface
MRF24J40
Receive
Buffer
RXMAC
Control
Registers
Security
Transmit
Buffers
TXMAC
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
PHY Architecture
RXPHY
PHY TX/RX
Control
TXPHY
Slide
138
MRF24J40MA Certified RF Module
MRF24J40MA2.4 GHz,
IEEE 802.15.4 compliant radio
transceiver module
Supports Microchips free
ZigBee MiWi, and MiWi P2P
protocol stack
ZigBee Compliant Platform
radio module
Module features:
Microchips MRF24J40 2.4
GHz transceiver
Integrated PCB antenna
Matching circuit components
FCC (U.S.A.), IC (Canada),
and ETSI (Europe) certified
Surface-mountable PCB
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
139
Ease-of-Implementation
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
140
IEEE 802.15.4
Wireless Stack Comparison
Stack
MiWi
P2P
Hops
Memory
PIC18
PIC24
PIC32
Star/P2P
3K-9K
YES
YES
YES
Star/Mesh
7K-17K
YES
YES
YES
Star/Mesh
Infinite
40K-96K
YES
YES
TBD
Topography
Proprietary
MiWi
Proprietary
ZigBee
Certified
ZigBee Alliance Membership/Implementation Costs:
$3,500 per year + testing fees + certification fee
-or- $9,500 per year + testing fees
Downloadable at: www.microchip.com/wireless
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
141
Choice between
50 different PIC18 Micros
Flash
KB
Program Memory
128K
ZigBee Protocol Stack ~ 18 to 96 KB
MiWi Protocol Stack ~ 2 to 16 KB
General
Purpose
General
Purpose
96K
64K
48K
General
Purpose
and CAN
32K
USB
16K
Motor
Control
28
2008 Microchip Technology Incorporated. All Rights Reserved.
General
Purpose
and CAN
CAN
CAN
LCD
LCD
USB
Motor
Control
40/44
Pin Count
COM3100
64
80
Slide
142
Microchips ZigBee Protocol Stack
Delivered with PICDEM Z Demo Kit or stand-alone
Simple implementation
Supports RFD, FFD and Coordinators
Modular architecture provides structured interface for:
Application code cooperative multi-tasking
Application and RTOS independent
Available under no-cost license agreement
Supports PIC18F, PIC18J and some 16-bit devices
Out-of-box support via Microchip C18 compiler
Completely described in application note AN1232
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
143
MiWi Protocol supports
Sockets and Device Reports
Use OpenSocket() to dynamically set up a
link to another device
Use SendReport() to send them a message
A meet B,
B meet A
I am looking for
someone to talk
to.
I am looking for
someone to talk
to.
Hello A
Hello B
Coordinator
End device
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
144
MiWi Protocol Security
Obtain Network and Manufacturers Keys
Lower Power with User Interface
Message Authentication
MIC Message Integrity Code
Cipher Block Chaining Message Authentication
Code (CBC-MAC)
Replay Attack/Sequential Freshness
Sequence Number
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
145
Development Kits
PICDEM Z 2.4 GHz Demonstration
Kit
Part # DM163027-5
Explorer 16 board,
with MRF24J40MA
PICtail Plus Daughter Card
Part # DM240001
Part # AC164134
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
146
ZENA Wireless Network Analyzer
DM183023 - ZENA NETWORK ANALYZER
Windows based software
USB to IEEE 802.15.4 Packet Sniffer using PIC18LF2550
Demo (Software Only) and Full Versions Available
Also generates design specific network configuration stack
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
147
ZigBee Protocol Design Center
Version 2.0-2.6.0a of stack
now available for download
One stop shop for ZigBee
protocol information
AN1232 Application ote
Free ZigBee 2006 Stack
ZigBee Pro stack U/D
PICDEM Z Demo Board
product overview
Link to Development Kit
FAQs
2008 Microchip Technology Incorporated. All Rights Reserved.
Further Information:
http://www.microchip.com/zigbee
http://www.zigbee.org
COM3100
Slide
148
ZigBee Protocol : what to do next?
Visit http://ww.zigbee.org
Understand the licensing procedures
Obtain the free Microchip stack
Purchase Microchips development tools
PICDEMTM Z development board and ZENATM wireless
network analyzer
Become a ZigBee alliance member
Obtain ZigBee alliance and FCC certification
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
149
MiWi Protocol : what to do next?
Obtain the free Microchip stack
http://www.microchip.com/MiWi
MASTERs Conference in July 09 in Phoenix
Purchase Microchips development tools
PICDEMTM Z development board and ZENATM wireless
network analyzer
Obtain FCC / ETSI certification
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
150
References
IEEE 802.15.4
IEEE OUI
http://www.microchip.com/miwi
ZigBee Protocol
https://standards.ieee.org/regauth/oui/forms/OUI-form.shtml
MiWi Protocol
http://ieee802.org/15/pub/TG4.html
http://ww.zigbee.org
AN1232 - ZigBee Protocol Application Note
http://www.microchip.com/zigbee
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
151
Summary
O
What we have learned today
Basics about USB and Microchip USB solutions
O
O
O
8, 16, 32 Bit MCUs with on-chip USB H/W
Demo Boards
Free Protocol Stack Software
Basics about Ethernet, TCP/IP & WiFi
O
O
O
O
8-Bit MCUs with on-board H/W
Stand-alone Chip for other MCUs
Demo Boards
Free Protocol Stack Software
Basics about ZigBee and MiWi
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
152
THANK YOU!
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
153
APPENDIX
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
154
8 / 16 / 32 BITS
USB microcontrollers
ROADMAP
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
155
PIC18 Full Speed USB 2.0
(device) Flash Family
128KB
PIC18F27J50
PIC18F27J50
2.0
2.0 Full-Speed
Full-Speed
PIC18F47J50
PIC18F47J50
2.0
2.0 Full-Speed
Full-Speed
PIC18F67J50
PIC18F67J50
2.0
2.0 Full-Speed
Full-Speed
PIC18F87J50
PIC18F87J50
2.0
2.0 Full-Speed
Full-Speed
96 KB
PIC18F26J55
PIC18F26J55
2.0
2.0 Full-Speed
Full-Speed
PIC18F46J55
PIC18F46J55
2.0
2.0 Full-Speed
Full-Speed
PIC18F66J55
PIC18F66J55
2.0
2.0 Full-Speed
Full-Speed
PIC18F86J55
PIC18F86J55
2.0
2.0 Full-Speed
Full-Speed
64 KB
PIC18F26J50
PIC18F26J50
2.0
2.0 Full-Speed
Full-Speed
PIC18F46J50
PIC18F46J50
2.0
2.0 Full-Speed
Full-Speed
PIC18F66J50
PIC18F66J50
2.0
2.0 Full-Speed
Full-Speed
PIC18F86J50
PIC18F86J50
2.0
2.0 Full-Speed
Full-Speed
PIC18F65J50
PIC18F65J50
2.0
2.0 Full-Speed
Full-Speed
PIC18F85J50
PIC18F85J50
2.0
2.0 Full-Speed
Full-Speed
NEW
32 KB
24 KB
PIC18F25J50
PIC18F25J50
NEW
PIC18F45J50
PIC18F45J50
RTCC,
RTCC,PPS,CTMU,DS
PPS,CTMU,DS
RTCC,
RTCC,PPS,CTMU,DS
PPS,CTMU,DS
PIC18F2550/3*
PIC18F2550/3*
2.0
2.0 Full-Speed
Full-Speed
PIC18F4550/3*
PIC18F4550/3*
2.0
2.0 Full-Speed
Full-Speed
PIC18F2455/3*
PIC18F2455/3*
2.0
2.0 Full-Speed
Full-Speed
PIC18F4455/3*
PIC18F4455/3*
2.0
2.0 Full-Speed
Full-Speed
PIC18F2450
PIC18F2450
2.0
2.0 Full-Speed
Full-Speed
PIC18F4450
PIC18F4450
2.0
2.0 Full-Speed
Full-Speed
* Denotes 12-bit ADC
NEW
16 KB
PIC18F14K50
PIC18F14K50
2.0
2.0 Full-Speed
Full-Speed
NEW
NEW
8 KB
Design
PIC18F13K50
PIC18F13K50
2.0
2.0 Full-Speed
Full-Speed
20-Pin
Existing
28-Pin
2008 Microchip Technology Incorporated. All Rights Reserved.
40/44-Pin
COM3100
64-Pin
80-Pin
Slide
156
192-256KB
PIC24F USB Flash Family
24FJ256GB106
24FJ256GB106
24FJ256GB108
24FJ256GB108
24FJ256GB110
24FJ256GB110
24FJ192GB106
24FJ192GB106
24FJ192GB108
24FJ192GB108
24FJ192GB110
24FJ192GB110
24FJ128GB106
24FJ128GB106
24FJ128GB108
24FJ128GB108
24FJ128GB110
24FJ128GB110
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
128KB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
96KB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
64KB
24FJ64GB102
24FJ64GB102
24FJ64GB104
24FJ64GB104
32KB
In production
3 months
6 months
24FJ32GB102
24FJ32GB102
24FJ32GB104
24FJ32GB104
28 Pin
40/44 Pin
2008 Microchip Technology Incorporated. All Rights Reserved.
24FJ64GB106
24FJ64GB106
24FJ64GB108
24FJ64GB108
24FJ64GB110
24FJ64GB110
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
16KB
16KBRAM,
RAM,PPS,
PPS,USB
USB
64 Pin
80 Pin
100 Pin
COM3100
Slide
157
32KB
512K/32K
512K/32K
512K/32K
512K/32K
4ch
4chDMA
DMA++USB
USBDMA
DMA
+Trace
+Trace
PIC32MX460F512L
4ch
4chDMA
DMA++USB
USBDMA
DMA
PIC32MX440F512H
256K/32K
256K/32K
256K/32K
256K/32K
4ch
4chDMA
DMA++USB
USBDMA
DMA
PIC32MX440F256H
4ch
4chDMA
DMA++USB
USBDMA
DMA
+Trace
+Trace
PIC32MX460F256L
128K/32K
128K/32K
128K/32K
128K/32K
4ch
4chDMA
DMA++USB
USBDMA
DMA
4ch
4chDMA
DMA++USB
USBDMA
DMA
PIC32MX440F256H
PIC32MX440F128L
All parts are now 80MHz
64KB
128KB
256KB
512KB
PIC32 USB Flash Family
Low-end Part Speed Increased to 40MHz
32K/8K
32K/8K (40MHz)
(40MHz)
USB
USBDMA
DMA
A/D Increase to 500ksps (3.3v +/- 10%)
PIC32MX420F032H
64 Pin
2008 Microchip Technology Incorporated. All Rights Reserved.
100 Pin
COM3100
Slide
158
Trademarks
The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KeeLoq, KeeLoq logo,
MPLAB, PIC, PICmicro, PICSTART, PRO MATE, rfPIC and SmartShunt are registered
trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
FilterLab, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL, SmartSensor and The
Embedded Control Solutions Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net,
dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, In-Circuit Serial Programming,
ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, PICkit,
PICDEM, PICDEM.net, PICtail, PIC32 logo, PowerCal, PowerInfo, PowerMate, PowerTool,
REAL ICE, rfLAB, Select Mode, Total Endurance, UNI/O, WiperLock and ZENA are
trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
All other trademarks mentioned herein are property of their respective companies.
2008, Microchip Technology Incorporated. All Rights Reserved.
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
159
Additional Slides
Stack Details
MiWi/ZigBee Protocol Comparison
Details
MRF24J40 Technical Details
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
160
Stack Architecture
State machine based
Various flags show network and
stack status
Nomenclature is based on the
ZigBee protocol specification
Most stack functionality is triggered
through one API call!
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
161
Stack Flow Primitives
Stack flow is specified in terms of
primitives
Most primitives are internal to the stack
Primitive names are based on the ZigBee
protocol specification
APSDE-DATA.request becomes APSDE_DATA_request
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
162
Stack Application Interface
Using Primitives
Each primitive has an associated parameter
list
Names follow ZigBee protocol specification
Complete list available in AN1232
Typical application primitives and responses (p.23)
Primitives that come from the stack and must be
handled (p.24)
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
163
MRF24J40 System Design Features
Complete IEEE 802.15.4 radio
Supports ZigBee and MiWi protocols
Built-in AES Engine
Simple four-wire SPI interface
Integrated 20 MHz and 32.768 kHz oscillator
drive
20 MHz reference clock output
Available to drive microcontroller oscillator
Low current consumption,
typical 18 mA in RX and 22 mA in TX mode
Typical 2 A Sleep mode
Supports Power Save mode
Small 40-pin no lead QFN 6x6 mm package
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
164
MRF24J40 Transceiver
RF/Analog Features
ISM band 2.405-2.480 GHz operation
-95 dBm sensitivity and 0 dBm maximum input level
0 dBm output power and 40 dB TX power control
range
Differential RF input/output and integrated TX/RX
switch
Integrated low phase noise VCO, frequency
synthesizer
and PLL loop filter
Digital VCO and filter calibration
Integrated RSSI ADC and I/Q DACs
Integrated LDO
High receiver and RSSI dynamic range
2008 Microchip Technology Incorporated. All Rights Reserved.
COM3100
Slide
165