Microchip PIC24FJ128GL408 Handleiding


Lees hieronder de 📖 handleiding in het Nederlandse voor Microchip PIC24FJ128GL408 (42 pagina's) in de categorie Niet gecategoriseerd. Deze handleiding was nuttig voor 37 personen en werd door 2 gebruikers gemiddeld met 4.5 sterren beoordeeld

Pagina 1/42
© 2010 Microchip Technology Inc. DS01071B-page 1
AN1071
INTRODUCTION
Infrared communication is a low-cost method of
providing wireless, point-to-point communication
between two devices. The Infrared Data Association,
often referred to as IrDA, was formed in 1994 to
develop standard methods for communicating over
short-range infrared transmissions. These standards
have continued to evolve and gain in popularity. Now, a
wide variety of devices implement the IrDA standard
specification, including computers, printers, PDAs, cell
phones, watches and other instruments.
Microchip’s 16-bit and 32-bit microcontrollers are a
perfect fit for applications wanting to support IrDA
standard communication. These low-cost
microcontrollers, with their built-in IrDA standard
support, provide an inexpensive solution with plenty of
computing power.
IrDA® STANDARD
Overview
The IrDA standard specification is a half-duplex
communication protocol with Serial Infrared (SIR)
transmission speeds similar to those supported by an
RS-232 port (9600 bps, 19.2 kbps, 38.4 kbps,
57.6 kbps and 115.2 kbps). Microchip currently
supports only the SIR transmission speeds.
The half-duplex nature of the communications is due to
the fact that the receiver is blinded by the light of its own
transmitter. The infrared transceiver transmits pulses in
a cone with a half-angle between 15 and 30 degrees
(Figure 1). The pulses must be visible from a distance
of one meter, but must not be so bright that the receiver
is overwhelmed at close distances. In practice, optimal
positioning for a receiver is usually a distance of 5 cm
to 60 cm from the transmitter, in the center of the
transmission cone.
Protocols
The initial specifications developed by the Infrared
Data Association provided a mechanism for converting
existing serial interfaces to infrared interfaces. These
protocols closely mimic standard serial interfaces. As
the infrared communication mechanism gained
popularity, more protocols were created to tailor the
communication format for different types of end
applications.
The infrared communication support is designed as a
Stack. Figure 2 shows the basic structure of the Stack.
FIGURE 1: OPTICAL PORT ANGLES
Author: Kim Otten
Microchip Technology Inc.
15-30 Degrees Half-Angle 15 Degrees Half-Angle
ReceiverTransmitter
IrDA® Standard Stack for Microchip 16-bit and
32-bit Microcontrollers
AN1071
DS01071B-page 2 © 2010 Microchip Technology Inc.
FIGURE 2: IrDA® STANDARD
PROTOCOL STACK LAYERS
The Stack layers perform the following functions:
Driver – Provides an interface between the Stack
and the microcontroller.
Framer – Prepares the IrLAP frame for transmis-
sion over the physical serial medium by wrapping
it within a frame wrapper and encoding control
characters in the data payload (with byte and bit
stuffing) to make them transparent to the frame
receiver. The framer receiver converts the
encoded, transparent bytes back to their original
values before validating and storing the frame in
the receive queue.
IrLAP (Infrared Link Access Protocol) – Provides
a device-to-device connection for the reliable,
ordered transfer of data. Also provides device
discovery procedures.
IrLMP (Link Management Protocol) – Provides
fundamental discovery, multiplexing and link
control operations between stations. It supports
multiplexing of multiple applications over a single
IrLAP link along with protocol and service
discovery through the IAS.
IAS (Information Access Service) – A mini
database of the services provided by the device.
TinyTP (Tiny Transport Protocol) – Provides flow
control on IrLMP connections with an optional
segmentation and reassembly service.
The current implementation of the Microchip IrDA
Standard Stack allows access to the Stack through one
of three different protocols:
IrCOMM 3-Wire Raw
This protocol is designed to emulate a simple
serial interface consisting of two wires: a receive
and a transmit line. (The third wire, ground, is not
emulated). This protocol is also known as IrLPT,
designed to emulate a PC parallel port interface.
IrCOMM 9-Wire Cooked
This protocol is designed to emulate a serial
interface with either hardware or software
handshaking.
• OBEX
A higher level protocol, designed to simplify
sending and receiving data objects.
These protocols and the application interfaces to them
are described below.
Device Types
There are two basic types of devices:
Client (or Primary)
This device initiates the connection.
Server (or Secondary)
This device responds only when connected to.
A third type of device, called a Peer device, can act as
a Client or a Server. An example of a Peer device is a
PDA, which can either beam information to another
PDA or receive information from another PDA.
Typically, IrCOMM applications are Clients or Servers.
User Application
Protocol
TinyTP
IrLMP
IrLAP
Framer
Driver
IAS
© 2010 Microchip Technology Inc. DS01071B-page 3
AN1071
HARDWARE DESIGN
Many members of Microchip’s families of 16-bit and 32-
bit microcontrollers provide native IrDA standard
support through their UART modules. This greatly
simplifies the hardware design (Figure 3).
For demonstration and prototyping purposes,
Microchip has created the IrDA® PICtail™ Plus card
(AC164124) for use with the Explorer 16 Development
Board (DM240001).
FIGURE 3: BLOCK DIAGRAM
SOFTWARE DESIGN
Overview
The Microchip IrDA Standard Stack is distributed as a
set of libraries, with source code provided for the lowest
level drivers (see Appendix A: “Source Code”). This
allows the Stack to be tailored to account for:
Device family
Device clock speed
• Protocol
Device type
Due to the nature of the libraries, some operational
parameters are fixed. These include the following
parameters shown in Table 1.
TABLE 1: FIXED OPERATIONAL PARAMETERS
16/32-bit PIC®
U1TX
U1RX
Infrared
Transmitter/
Receiver
Microcontroller
Item Value Effect
Internal Timer Timer 2 Timer2 is unavailable to the application and Timer3 may be used only
as a 16-bit timer.
Interrupts vs. Polling Interrupts The UART receive and transmit interrupts are used. Since these
interrupts are vectored, this method provides the quickest, most
reliable method of interfacing with the peripheral.
Window Size 1Maximum number of information frames that can be transmitted before
an Acknowledge is received. This parameter is set for minimum RAM
usage.
Data Frame Size 64 Maximum LAP frame size. This parameter is set for minimum RAM
usage.


Product specificaties

Merk: Microchip
Categorie: Niet gecategoriseerd
Model: PIC24FJ128GL408

Heb je hulp nodig?

Als je hulp nodig hebt met Microchip PIC24FJ128GL408 stel dan hieronder een vraag en andere gebruikers zullen je antwoorden




Handleiding Niet gecategoriseerd Microchip

Handleiding Niet gecategoriseerd

Nieuwste handleidingen voor Niet gecategoriseerd