Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Архив4 / Proshin_polnostyu_ves_kursach / pic18f2455_2550_4455_4550.pdf
Скачиваний:
49
Добавлен:
07.08.2013
Размер:
7.07 Mб
Скачать

PIC18F2455/2550/4455/4550

17.6USB Power Modes

Many USB applications will likely have several different sets of power requirements and configuration. The most common power modes encountered are Bus Power Only, Self-Power Only and Dual Power with Self-Power Dominance. The most common cases are presented here.

17.6.1BUS POWER ONLY

In Bus Power Only mode, all power for the application is drawn from the USB (Figure 17-10). This is effectively the simplest power method for the device.

FIGURE 17-10: BUS POWER ONLY

VBUS VDD

~5V

VUSB

VSS

17.6.2SELF-POWER ONLY

In Self-Power Only mode, the USB application provides its own power, with very little power being pulled from the USB. Figure 17-11 shows an example. Note that an attach indication is added to indicate when the USB has been connected.

FIGURE 17-11: SELF-POWER ONLY

 

Attach Sense

VBUS

I/O pin

~5V

100 kΩ

VSELF

VDD

~5V

 

100 kΩ

VUSB

 

VSS

17.6.3DUAL POWER WITH SELF-POWER DOMINANCE

Some applications may require a dual power option. This allows the application to use internal power primarily, but switch to power from the USB when no internal power is available. Figure 17-12 shows a simple Dual Power with Self-Power Dominance example, which automatically switches between Self-Power Only and USB Bus Power Only modes.

FIGURE 17-12: DUAL POWER EXAMPLE

 

100 kΩ Attach Sense

 

I/O pin

VBUS

VDD

~5V

 

100 kΩ

VUSB

VSELF

VSS

~5V

 

Note: Users should keep in mind the limits for devices drawing power from the USB. According to USB Specification 2.0, this cannot exceed 100 mA per low-power device or 500 mA per high-power device.

17.7Streaming Parallel Port

The Streaming Parallel Port (SPP) is an alternate route option for data besides USB RAM. Using the SPP, an endpoint can be configured to send data to or receive data directly from external hardware.

This methodology presents design possibilities where the microcontroller acts as a data manager, allowing the SPP to pass large blocks of data without the microcontroller actually processing it. An application example might include a data acquisition system, where data is streamed from an external FIFO through USB to the host computer. In this case, endpoint control is managed by the microcontroller and raw data movement is processed externally.

The SPP is enabled as a USB endpoint port through the associated endpoint buffer descriptor. The endpoint must be enabled as follows:

1.Set BDnADRL:BDnADRH to point to FFFFh.

2.Set the KEN bit (BDnSTAT<5>) to let SIE keep control of the buffer.

3.Set the INCDIS bit (BDnSTAT<4>) to disable automatic address increment.

Refer to Section 18.0 “Streaming Parallel Port” for more information about the SPP.

Note 1: If an endpoint is configured to use the SPP, the SPP module must also be configured to use the USB module. Otherwise, unexpected operation may occur.

2:In addition, if an endpoint is configured to use the SPP, the data transfer type of that endpoint must be isochronous only.

2007 Microchip Technology Inc.

Preliminary

DS39632D-page 183

Соседние файлы в папке Proshin_polnostyu_ves_kursach