Sei sulla pagina 1di 39

Korea

2011
2011
Wireless Solutions Wi-Fi module
Wireless Solutions
Wi-Fi module
1. Wi-Fi overview 1. Wi-Fi ? 2. Wi-Fi Frequency 3. Wi-Fi Direct 2. Microchip WiFi

1. Wi-Fi overview

1.

Wi-Fi ?

2.

Wi-Fi Frequency

3.

Wi-Fi Direct

2. Microchip WiFi Module

1. Wi-Fi Module특징

2. Microchip solution vs Others

3. The Internet of Things and Wi-Fi

4. Microchip Products Roadmap

5. Module PCB guideline

3. Microchip TCPIP Stack

4. Wi-Fi hands-on

차례

1.

Source code overview

2.

WIFI TCPIP Demo : webserver 동작 구현 & Iperf 를 이용한 네트웍 속도측정

3.

WIFI TCPIP basic project

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 2

Slide 2

Wi-Fi overview  Ethernet is the most widely deployed data- com network in the world

Wi-Fi overview

Ethernet is the most widely deployed data-

com network in the world

Wi-Fi is wireless Ethernet

Adds mobile internet connectivity Removes the wire, but retains the LAN, WAN, WWW connection

Infrastrature & Adhoc mode

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 3

Slide 3

Wi-Fi overview AP(Access Point), • Wireless Gateway SSID(Service set Identifier), • Name of Network Security

Wi-Fi overview

AP(Access Point),

Wireless Gateway

SSID(Service set Identifier),

Name of Network

Security

WEP, WPA,WPA2

• Name of Network Security • WEP, WPA,WPA2 © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 4

Slide 4

Wi-Fi Frequency © 2011©

Wi-Fi Frequency

Wi-Fi Frequency © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 5

Slide 5

Wi-Fi Frequency © 2011©

Wi-Fi Frequency

Wi-Fi Frequency © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 6

Slide 6

Wi-Fi Direct  Wi-Fi devices to talk to each other without the need for AP

Wi-Fi Direct

Wi-Fi devices to talk to each other without the need for AP

Wi-Fi Direct essentially embeds a software access point, or "soft AP", into any device

that wishes to support Direct

AP", into any device that wishes to support Direct © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 7

Slide 7

Wi-Fi Direct 의 파급효과 IPv6 활성화 되면 M to M 통신 활용한 어플리케이션 급증 .

Wi-Fi Direct 의 파급효과

IPv6 활성화 되면 M to M 통신 활용한 어플리케이션 급증.

비교적 넗은 전송거리와 높은 속도의 무선 통신으로 활용성 증가 ( ex.무선 저장장치)

블루투스, zigbee, RF4CE 영역까지 커버가능

) 블루투스 , zigbee, RF4CE 영역까지 커버가능 © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 8

Slide 8

Microchip WiFi Module © 2011©

Microchip WiFi Module

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 9

Slide 9

Wi-Fi ® Module 특징 MRF24WB0MA and MRF24WB0MB Wi-Fi ® Transceiver Module Features Low-power, low data-rate

Wi-Fi ® Module 특징

Wi-Fi ® Module 특징 MRF24WB0MA and MRF24WB0MB Wi-Fi ® Transceiver Module Features Low-power, low data-rate

MRF24WB0MA and MRF24WB0MB Wi-Fi ® Transceiver Module Features

Low-power, low data-rate Wi-Fiand MRF24WB0MB Wi-Fi ® Transceiver Module Features Connects to standard wireless access points IEEE Std.

Connects to standard wireless access pointsTransceiver Module Features Low-power, low data-rate Wi-Fi IEEE Std. 802.11b/g/n compatible Integrated PCB antenna

IEEE Std. 802.11b/g/n compatibledata-rate Wi-Fi Connects to standard wireless access points Integrated PCB antenna (MRF24WB0MA) External antenna option

Integrated PCB antenna (MRF24WB0MA)wireless access points IEEE Std. 802.11b/g/n compatible External antenna option (MRF24WB0MB) with ultra miniature

External antenna option (MRF24WB0MB) with ultra miniature coaxial (U.FL)802.11b/g/n compatible Integrated PCB antenna (MRF24WB0MA) FCC, Industry Canada and ETSI certification Wi-Fi Certified

FCC, Industry Canada and ETSI certificationoption (MRF24WB0MB) with ultra miniature coaxial (U.FL) Wi-Fi Certified Works with all PIC ® microcontrollers

Wi-Fi Certifiedcoaxial (U.FL) FCC, Industry Canada and ETSI certification Works with all PIC ® microcontrollers SPI interface

Works with all PIC ® microcontrollers ® microcontrollers

SPI interface to PIC microcontrollersWi-Fi Certified Works with all PIC ® microcontrollers Supports WEP, WPA and WPA2 security protocols Single

Supports WEP, WPA and WPA2 security® microcontrollers SPI interface to PIC microcontrollers protocols Single operating voltage: 2.7V-3.6V (3.3V typical)

protocols

Single operating voltage: 2.7V-3.6V (3.3V typical)Supports WEP, WPA and WPA2 security protocols Temperature Range: 0 ° C to +70 ° C

Temperature Range: 0° C to +70 ° C Commercial ° C to +70° C Commercial

Low-current consumptiontypical) Temperature Range: 0 ° C to +70 ° C Commercial RX mode – 85 mA

RX mode – 85 mA (typical) 85 mA (typical)

-TX mode – 154 mA (+10 dBm typical) 154 mA (+10 dBm typical)

-Sleep – 250 μ A (typical) 250 μA (typical)

-Hibernate – <0.1 μ A (typical) <0.1 μA (typical)

μ A (typical) -Hibernate – <0.1 μ A (typical) © 2011©
μ A (typical) -Hibernate – <0.1 μ A (typical) © 2011©
μ A (typical) -Hibernate – <0.1 μ A (typical) © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 10

Slide 10

Wi-Fi ® Module 특징 ‣ Maximize customer engineering re-use and code preservation ‣ Module is
Wi-Fi ® Module 특징 ‣ Maximize customer engineering re-use and code preservation ‣ Module is
Wi-Fi ® Module 특징 ‣ Maximize customer engineering re-use and code preservation ‣ Module is
Wi-Fi ® Module 특징 ‣ Maximize customer engineering re-use and code preservation ‣ Module is

Wi-Fi ® Module 특징

Maximize customer engineering re-use and code preservation

Module is FCC certified minimizing customer time and expense

SPI interface to the MCU

Four different power saving modes for different use models

Hibernate mode typically consumes 0.1uA

Battery life as long as 10 years for “once a day ”wake-up”

No-host polling mode allows host processor shut-down(interrupt)

WEP/WPA/TKIP accelerators reduce RAM & host processor load

On-Chip MAC reduces processor load

Driver integrated into IP Stack (<4Kbytes)

Easily integrated into 8-bit MCU system

Less RAM required reduces cost & allows less expensive MCU

Just add WI-FI I/O eliminates system redesign effort

Globally certified module eliminates up to $100K in costs

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 11

Slide 11

Microchip solution vs Others Traditional Wi-Fi Requirements Requires Linux OS + Driver Requires 32bit processor

Microchip solution vs Others

Traditional Wi-Fi Requirements

Traditional Wi-Fi Requirements

Requires Linux OS + DriverTraditional Wi-Fi Requirements Requires 32bit processor Requires additional memory …or write a custom driver …or

Requires 32bit processorTraditional Wi-Fi Requirements Requires Linux OS + Driver Requires additional memory …or write a custom driver

Requires additional memoryRequires Linux OS + Driver Requires 32bit processor …or write a custom driver …or captive to

…or write a custom driver+ Driver Requires 32bit processor Requires additional memory …or captive to host on SOC Does not

…or captive to host on SOCRequires additional memory …or write a custom driver Does not enable ease of development Microchip Wi-Fi

Does not enable ease of development32bit processor Requires additional memory …or write a custom driver …or captive to host on SOC

Microchip Wi-Fi module

Microchip Wi-Fi module

Complete solutionnot enable ease of development Microchip Wi-Fi module No need for network programming knowledge No need

No need for network programming knowledgeof development Microchip Wi-Fi module Complete solution No need for RF knowledge System possible with only

No need for RF knowledgeComplete solution No need for network programming knowledge System possible with only two chips, crystal, and

System possible with only two chips, crystal,for network programming knowledge No need for RF knowledge and passives Microchip Microchip 8/16 bit MCU

and passives

Microchip Microchip 8/16 bit MCU Wi-Fi SPI Them Memory 32 bit MCU Wi-Fi ~2MB for
Microchip
Microchip
8/16 bit MCU
Wi-Fi
SPI
Them
Memory
32 bit MCU
Wi-Fi
~2MB for
Soft MAC
ARM
USB
Embedded
and OS
Royalty
Linux
SDIO

PIC + Wi-Fi Module = Wi-Fi Solution

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 12

Slide 12

The Internet of Things and Wi-Fi To Access Content To Configure and Control To Interact

The Internet of Things and Wi-Fi

The Internet of Things and Wi-Fi To Access Content To Configure and Control To Interact To
The Internet of Things and Wi-Fi To Access Content To Configure and Control To Interact To

To Access Content

The Internet of Things and Wi-Fi To Access Content To Configure and Control To Interact To

To Configure and Control

Things and Wi-Fi To Access Content To Configure and Control To Interact To Monitor and Alert

To Interact

Wi-Fi To Access Content To Configure and Control To Interact To Monitor and Alert © 2011©
Wi-Fi To Access Content To Configure and Control To Interact To Monitor and Alert © 2011©
Wi-Fi To Access Content To Configure and Control To Interact To Monitor and Alert © 2011©
Wi-Fi To Access Content To Configure and Control To Interact To Monitor and Alert © 2011©

To Monitor and Alert

To Configure and Control To Interact To Monitor and Alert © 2011©
To Configure and Control To Interact To Monitor and Alert © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 13

Slide 13

Impact of Multiple Stations © 2011©

Impact of Multiple Stations

Impact of Multiple Stations © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 14

Slide 14

Microchip Wi-Fi Roadmap IEEE 802.11b/g Radio and Modules Target Production Release CY1Q12 IPv6 support CY1Q12

Microchip Wi-Fi Roadmap

IEEE 802.11b/g Radio and ModulesMicrochip Wi-Fi Roadmap Target Production Release CY1Q12 IPv6 support CY1Q12 Wi-Fi Direct Protocol support Within this

Target Production Release CY1Q12

IPv6 support802.11b/g Radio and Modules Target Production Release CY1Q12 CY1Q12 Wi-Fi Direct Protocol support Within this year

CY1Q12and Modules Target Production Release CY1Q12 IPv6 support Wi-Fi Direct Protocol support Within this year ©

Wi-Fi Direct Protocol supportModules Target Production Release CY1Q12 IPv6 support CY1Q12 Within this year © 2011©

Within this yearCY1Q12 IPv6 support CY1Q12 Wi-Fi Direct Protocol support © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 15

Slide 15

Module Layout Guidelines © 2011©

Module Layout Guidelines

Module Layout Guidelines © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 16

Slide 16

Microchip Wi-Fi review Driver incorporated into Microchip TCP/IP stack A Wi-Fi solution architected to look

Microchip Wi-Fi review

Driver incorporated into Microchip TCP/IP stackMicrochip Wi-Fi review A Wi-Fi solution architected to look just like Ethernet to Microchip customers using

A Wi-Fi solution architected to look just like EthernetWi-Fi review Driver incorporated into Microchip TCP/IP stack to Microchip customers using the stack Wi-Fi Solution

to Microchip customers using the stack

Wi-Fi Solution works with many existing dev kitsjust like Ethernet to Microchip customers using the stack Compatibility across nearly every major Microchip MCU

Compatibility across nearly every major Microchip MCU familythe stack Wi-Fi Solution works with many existing dev kits Pic18 (8-bit), PIC24 (16-bit), dsPIC, PIC32

Pic18 (8-bit), PIC24 (16-bit), dsPIC, PIC32Compatibility across nearly every major Microchip MCU family Demo Source Code and Applications PICtails and PICtail-based

Demo Source Code and ApplicationsMCU family Pic18 (8-bit), PIC24 (16-bit), dsPIC, PIC32 PICtails and PICtail-based development kits shipping now ©

PICtails and PICtail-based development kits(16-bit), dsPIC, PIC32 Demo Source Code and Applications shipping now © 2011©

shipping now

PICtails and PICtail-based development kits shipping now © 2011©
PICtails and PICtail-based development kits shipping now © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 17

Slide 17

Korea

2011
2011
The Microchip TCP/IP Stack
The Microchip TCP/IP Stack
The Microchip TCP/IP Stack About the Stack The TCP/IP Layer Model Layers at a Glance

The Microchip TCP/IP Stack

About the StackThe Microchip TCP/IP Stack The TCP/IP Layer Model Layers at a Glance © 2011©

The TCP/IP Layer ModelThe Microchip TCP/IP Stack About the Stack Layers at a Glance © 2011©

Layers at a GlanceTCP/IP Stack About the Stack The TCP/IP Layer Model © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 19

Slide 19

About the Stack

About the Stack Cross-platform PIC18, PIC24, dsPIC ® DSC, PIC32 MPLAB ® C18, C30, C32 RTOS

Cross-platformAbout the Stack PIC18, PIC24, dsPIC ® DSC, PIC32 MPLAB ® C18, C30, C32 RTOS Independent

PIC18, PIC24, dsPIC ® DSC, PIC32 ® DSC, PIC32

MPLAB ® C18, C30, C32 ® C18, C30, C32

RTOS IndependentPIC24, dsPIC ® DSC, PIC32 MPLAB ® C18, C30, C32 Modular Design Compile only what you

Modular Design® DSC, PIC32 MPLAB ® C18, C30, C32 RTOS Independent Compile only what you need High

MPLAB ® C18, C30, C32 RTOS Independent Modular Design Compile only what you need High performance

Compile only what you needMPLAB ® C18, C30, C32 RTOS Independent Modular Design High performance Full TCP state machine Supports

High performanceRTOS Independent Modular Design Compile only what you need Full TCP state machine Supports multiple connections

Full TCP state machineModular Design Compile only what you need High performance Supports multiple connections © 2011©

Supports multiple connectionsonly what you need High performance Full TCP state machine © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 20

Slide 20

The TCP/IP Layer Model Communication Protocol Standard Layers Each handles a specific task Independent functions

The TCP/IP Layer Model

Communication Protocol StandardThe TCP/IP Layer Model Layers Each handles a specific task Independent functions Shared functionality Communicate only

LayersThe TCP/IP Layer Model Communication Protocol Standard Each handles a specific task Independent functions Shared

Each handles a specific taskThe TCP/IP Layer Model Communication Protocol Standard Layers Independent functions Shared functionality Communicate only

Independent functionsProtocol Standard Layers Each handles a specific task Shared functionality Communicate only with the layer below

Shared functionalityLayers Each handles a specific task Independent functions Communicate only with the layer below © 2011©

Communicate only with the layer belowa specific task Independent functions Shared functionality © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 21

Slide 21

The TCP/IP Layer Model NBNS DNS SNTP DHCP SNMP Telnet SMTP HTTP FTP UDP TCP

The TCP/IP Layer Model

NBNS

DNS

SNTP

DHCP

SNMP

Telnet

SMTP

HTTP

FTP

DNS SNTP DHCP SNMP Telnet SMTP HTTP FTP UDP TCP IP ARP Ethernet MAC/PHY (Silicon) Application
DNS SNTP DHCP SNMP Telnet SMTP HTTP FTP UDP TCP IP ARP Ethernet MAC/PHY (Silicon) Application

UDP

TCP

IP

ARP

Ethernet MAC/PHY (Silicon)

Application

Transport

Addressing

Physical

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 22

Slide 22

Layers at a Glance Foundation Layers Functionality handled by the stack Interact only with TCP

Layers at a Glance

Layers at a Glance Foundation Layers Functionality handled by the stack Interact only with TCP and/or

Foundation Layers

Functionality handled by the stackLayers at a Glance Foundation Layers Interact only with TCP and/or UDP Just send and retrieve

Interact only with TCP and/or UDPGlance Foundation Layers Functionality handled by the stack Just send and retrieve data UDP T C

Just send and retrieve datahandled by the stack Interact only with TCP and/or UDP UDP T C P IP ARP

UDP

TCP

IP

ARP

Ethernet MAC/PHY (Silicon)

Transport

Addressing

Physical

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 23

Slide 23

Layers at a Glance NBNS DNS SNTP DHCP SNMP Telnet SMTP HTTP FTP Application Application

Layers at a Glance

NBNS

DNS

SNTP

DHCP

SNMP

Telnet

SMTP

HTTP

FTP

Application

DHCP SNMP Telnet SMTP HTTP FTP Application Application Layers Custom applications built on these layers

Application Layers

Custom applications built on these layersTelnet SMTP HTTP FTP Application Application Layers Request and transmit data Respond to incoming requests ©

Request and transmit dataApplication Layers Custom applications built on these layers Respond to incoming requests © 2011©

Respond to incoming requestsapplications built on these layers Request and transmit data © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 24

Slide 24

NBNS DNS SNTP DHCP SNMP Telnet SMTP HTTP Application Examples NetBIOS Name Service (Server) Local

NBNS

DNS

SNTP

DHCP

SNMP

Telnet

SMTP

HTTP

Application Examples

NetBIOS Name Service (Server) Local Host Names Domain Name Service (Client)

Global host name resolution

Simple Network Time Protocol (Client) Determines the absolute time Dynamic Host Configuration Protocol (Both) Automatic IP and network configuration Simple Network Management Protocol (Server) Enterprise monitoring and control (AN870) Telnet (Server) Command-line interface

Simple Mail Transfer Protocol (Client)

Sends e-mail messages Hyper-Text Transfer Protocol (Server) Serves web pages and processes web form input

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 25

Slide 25

Application Examples Custom Applications HTTP Client Streaming data / audio Serial to Ethernet bridge Data

Application Examples

Application Examples Custom Applications HTTP Client Streaming data / audio Serial to Ethernet bridge Data logging

Custom Applications

HTTP ClientApplication Examples Custom Applications Streaming data / audio Serial to Ethernet bridge Data logging Bootloader Other

Streaming data / audioApplication Examples Custom Applications HTTP Client Serial to Ethernet bridge Data logging Bootloader Other data transfer

Serial to Ethernet bridgeCustom Applications HTTP Client Streaming data / audio Data logging Bootloader Other data transfer © 2011©

Data loggingHTTP Client Streaming data / audio Serial to Ethernet bridge Bootloader Other data transfer © 2011©

Bootloaderdata / audio Serial to Ethernet bridge Data logging Other data transfer © 2011©

Other data transfer/ audio Serial to Ethernet bridge Data logging Bootloader © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 26

Slide 26

Review: The Microchip TCP/IP Stack Microchip’s Stack No-fee license agreement, source code provided The TCP/IP

Review:

The Microchip TCP/IP Stack

Microchip’s StackReview: The Microchip TCP/IP Stack No-fee license agreement, source code provided The TCP/IP Layer Model Abstract

Review: The Microchip TCP/IP Stack Microchip’s Stack No-fee license agreement, source code provided The TCP/IP Layer

No-fee license agreement, source code

provided

The TCP/IP Layer ModelStack No-fee license agreement, source code provided Abstract common functionality Selecting an Application HTTP

Abstract common functionalityagreement, source code provided The TCP/IP Layer Model Selecting an Application HTTP web server © 2011©

Selecting an ApplicationThe TCP/IP Layer Model Abstract common functionality HTTP web server © 2011©

Model Abstract common functionality Selecting an Application HTTP web server © 2011©

HTTP web server

functionality Selecting an Application HTTP web server © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 27

Slide 27

Korea

2011
2011
Multi-tasking
Multi-tasking
Cooperative Multi-tasking  Potential Pitfalls • Long tasks: add a state machine • UART: use

Cooperative Multi-tasking

Potential Pitfalls

Long tasks: add a state machine

UART: use an interrupt

Delays: use the Tick module

How Often?

More often = better performance

Entire Loop:

Goal: in 1-2ms Acceptable: 10-20ms

Infrequent: 100ms+

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 29

Slide 29

Timing with Tick  Blocking loops are bad • Don’t use while ( i ++

Timing with Tick

Blocking loops are bad

Don’t use while(i++ < 10000);

Use the Tick module

use while ( i ++ < 10000 );  Use the Tick module • Based on

Based on hardware clock

Interrupt driven

Stable and accurate

Implements non-blocking delays

Suitable for a Real Time Clock

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 30

Slide 30

Timing with Tick  Module tracks ticks internally • 48-bit resolution • Requires TMR0 (PIC18)

Timing with Tick

Module tracks ticks internally

48-bit resolution

Requires TMR0 (PIC18) or TMR1 (others)

Defines the TICK type

32-bit unsigned

Defines macros:

TICK_SECOND, TICK_MINUTE, TICK_HOUR

Three retrieval functions

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 31

Slide 31

Timing with Tick Syntax TICK TickGet () TICK TickGetDiv256 () // middle TICK TickGetDiv64K ()

Timing with Tick

Syntax

TICK TickGet()

TICK TickGetDiv256() // middle

TICK TickGetDiv64K() // high

// low 32 bits

Low 32 bits good for few μs to few hours

Middle: few minutes to few months

High: few days to several years (or absolute)

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 32

Slide 32

 Procedure: Timing with Tick • Store current time using TickGet • Transition state machine

Procedure:

Timing with Tick

Store current time using TickGet

Transition state machine and return

Compare TickGet to previous value

Use TICK_SECOND for easy reference

Example TICK doneAt = TickGet() + TICK_SECOND/10; case SM_WAIT: if((LONG)(TickGet() – doneAt) > 0) //
Example
TICK doneAt = TickGet() + TICK_SECOND/10;
case SM_WAIT:
if((LONG)(TickGet() – doneAt) > 0)
// Perform timeout function after 100ms

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 33

Slide 33

Korea

2011
2011
WiFi 실습
WiFi 실습
실습 Source code overview WiFi Demo 시연 TCPIP WIFI Basic project © 2011©

실습

Source code overview실습 WiFi Demo 시연 TCPIP WIFI Basic project © 2011©

WiFi Demo 시연 시연

TCPIP WIFI Basic project실습 Source code overview WiFi Demo 시연 © 2011©

code overview WiFi Demo 시연 TCPIP WIFI Basic project © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 35

Slide 35

Source code overview

Source code overview TCPIPConfig.h TCPIP 관련한 Configure file WF_Config.h WIFI 설정 관련 Configure file ©

TCPIPConfig.hSource code overview TCPIP 관련한 Configure file WF_Config.h WIFI 설정 관련 Configure file © 2011©

TCPIP 관련한 Configure file 관련한 Configure file

WF_Config.hcode overview TCPIPConfig.h TCPIP 관련한 Configure file WIFI 설정 관련 Configure file © 2011©

WIFI 설정 관련 Configure file 설정 관련 Configure file

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 36

Slide 36

WiFi Demo Web Server 를 이용하여 Infra & adhoc 접속해 보기 TCPconfig.h 파일 설정 Heap

WiFi Demo

Web Server 를 이용하여 Infra & adhoc 접속해 보기 를 이용하여 Infra & adhoc 접속해 보기

TCPconfig.h 파일 설정 파일 설정

Heap 설정 하기 설정 하기

WIFI Console Demo 의 Iperf 를 이용하여 네트웍 속도 측정해보기 Iperf 를 이용하여 네트웍 속도 측정해보기

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 37

Slide 37

TCPIP WIFI Basic project TCPIP WIFI Basic project 프로젝트 생성 WIFI 드라이버 포함시키기 최소한의

TCPIP WIFI Basic project

TCPIP WIFI Basic projectTCPIP WIFI Basic project 프로젝트 생성 WIFI 드라이버 포함시키기 최소한의 TCPIP 스택올리기

프로젝트 생성TCPIP WIFI Basic project TCPIP WIFI Basic project WIFI 드라이버 포함시키기 최소한의 TCPIP 스택올리기

WIFI 드라이버 포함시키기 드라이버 포함시키기

최소한의 TCPIP 스택올리기 TCPIP 스택올리기

Hibernate mode 실습 실습

TCP Server 구현 실습 구현 실습

Hibernate mode 실습 TCP Server 구현 실습 © 2011©

© 2011© 2009MicrochipMicrochipTechnologyTechnologyIncorporated.Incorporated.AllAllRightsRightsReserved.Reserved.

Microchip FS USB Device Class

Microchip FS USB Device

Slide 38

Slide 38

Korea

2011
2011
Thank You
Thank You

Note: The Microchip name and logo, dsPIC, MPLAB and PIC are registered trademarks of Microchip Technology Inc. in the U.S.A. and other countries. MiWi, PICDEM and PICtail are trademarks of Microchip Technology Inc. in the U.S.A. and other countries. All other trademarks mentioned herein are property of their respective companies.