參數(shù)資料
型號: PIC16C745/JW
廠商: Microchip Technology
文件頁數(shù): 136/165頁
文件大小: 0K
描述: IC MCU EPROM8KX14 USB A/D 28CDIP
標準包裝: 15
系列: PIC® 16C
核心處理器: PIC
芯體尺寸: 8-位
速度: 24MHz
連通性: SCI,UART/USART,USB
外圍設(shè)備: 欠壓檢測/復位,POR,PWM,WDT
輸入/輸出數(shù): 22
程序存儲器容量: 14KB(8K x 14)
程序存儲器類型: EPROM,UV
RAM 容量: 256 x 8
電壓 - 電源 (Vcc/Vdd): 4.35 V ~ 5.25 V
數(shù)據(jù)轉(zhuǎn)換器: A/D 5x8b
振蕩器型: 外部
工作溫度: 0°C ~ 70°C
封裝/外殼: 28-CDIP(0.300",7.62mm)窗口
包裝: 管件
PIC16C745/765
DS41124C-page 72
Preliminary
2000 Microchip Technology Inc.
10.9
USB Firmware Users Guide
10.9.1
INTRODUCING THE USB SOFTWARE
INTERFACE
Microchip provides a layer of software that handles the
lowest level interface so your application won’t have
to. This provides a simple Put/Get interface for com-
munication. Most of the USB processing takes place in
the background through the Interrupt Service Routine.
From the application viewpoint, the enumeration pro-
cess and data communication takes place without fur-
ther interaction. However, substantial setup is required
in the form of generating appropriate descriptors.
FIGURE 10-3: USB SOFTWARE INTERFACE
10.9.2
INTEGRATING USB INTO YOUR
APPLICATION
The latest version of the USB interface software
is
available
on
Microchip's
website
(see
http://www.microchip.com/).
The interface to the application is packaged in 3 func-
tions: InitUSB, PutUSB and GetUSB. InitUSB initial-
izes the USB peripheral, allowing the host to
enumerate the device. Then, for normal data commu-
nications, function PutUSB sends data to the host and
GetUSB receives data from the host.
However, there's a fair amount of setup work that must
be completed. USB depends heavily on the descrip-
tors. These are the software parameters that are com-
municated to the host to let it know what the device is,
and how to communicate with it. See USB V1.1 spec
section 9.5 for more details.
Also, code must be added to give meaning to the
SetConfiguration command. The Chapter 9 com-
mands call SetConfiguration when it receives the
command. Both the descriptors and SetConfigura-
tion are in DESCRIPT.ASM.
InitUSB enables the USB interrupt so enumeration
can begin. The actual enumeration process occurs in
the background, driven by the host and the Interrupt
Service Routine. Macro ConfiguredUSB waits until
the device is in the CONFIGURED state. The time
required to enumerate is completely dependent on the
host and bus loading.
10.9.3
INTERRUPT STRUCTURE CONCERNS
10.9.3.1
Processor Resources
Most of the USB processing occurs via the interrupt and
thus is invisible to application. However, it still con-
sumes processor resources. These include ROM, RAM,
Common RAM and Stack Levels. This section attempts
to quantify the impact on each of these resources, and
shows ways to avoid conflicts.
If you write your own Interrupt Service Routine: W,
Status, FSR and PCLATH may be corrupted by servic-
ing the USB interrupt and must be saved.
USB_MAIN.ASM provides a skeleton ISR which does
this for you, and includes tests for each of the possible
interrupt bits. This provides a good starting point if you
haven't already written your own.
10.9.3.2
Stack Levels
The hardware stack on the PICmicro MCU is only 8
levels deep. So the worst case call between the applica-
tion and ISR can only be 8 levels. The enumeration pro-
cess requires 4 levels, so it’s best if the main application
holds off on any processing until enumeration is com-
plete. ConfiguredUSB is a macro that waits until the
enumeration process is complete for exactly this pur-
pose, by testing the lower two bits of USWSTAT
(0x197).
10.9.3.3
ROM
The code required to support the USB interrupt,
including the chapter 9 interface calls, but not includ-
ing the descriptor tables, is about 1kW. The descriptor
and string descriptor tables can each take up to an
additional 256W. The location of these parts is not
restricted.
10.9.3.4
RAM
With the exception of Common RAM discussed below,
servicing the USB interrupt requires ~40 bytes of
RAM in Bank 2. That leaves all the General Purpose
RAM in banks zero and one, plus half of bank two,
available for your application to use.
10.9.3.5
Common RAM Usage
The PIC16C745/765 has 16 bytes of common RAM.
These are the last 16 addresses in each bank and all
refer to the same 16 bytes of memory, without regard
to which register bank is currently addressed by the
RP0, RP1 and IRP bits.
These are particularly useful when responding to inter-
rupts. When an interrupt occurs, the ISR doesn’t imme-
diately know which bank is addressed. With devices
that don’t support common RAM, the W register must
be provided for in each bank. The 16C745/765 can
save the appropriate registers in Common RAM and not
have to waste a byte in each bank for W register.
Main Application
Put
Get
Init
USB Peripheral
USB
745cov.book Page 72 Wednesday, August 2, 2000 8:24 AM
相關(guān)PDF資料
PDF描述
PIC16F723A-I/SS MCU PIC 7KB FLASH XLP 28-SSOP
PIC12C508A-04/SN IC MCU OTP 512X12 8SOIC
PIC12C509A-04/SM IC MCU OTP 1KX12 8-SOIJ
PIC16LF627T-04I/SO IC MCU FLASH 1KX14 COMP 18SOIC
PIC12C509A-04/P IC MCU OTP 1KX12 8DIP
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
PIC16C745T-I/SO 功能描述:8位微控制器 -MCU 14KB 256 RAM 22 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風格:SMD/SMT
PIC16C74A/JW 功能描述:8位微控制器 -MCU 7KB 192 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風格:SMD/SMT
PIC16C74A-04/L 功能描述:8位微控制器 -MCU 7KB 192 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風格:SMD/SMT
PIC16C74A-04/L 制造商:Microchip Technology Inc 功能描述:8BIT CMOS MCU SMD 16C74 PLCC44
PIC16C74A-04/P 功能描述:8位微控制器 -MCU 7KB 192 RAM 33 I/O RoHS:否 制造商:Silicon Labs 核心:8051 處理器系列:C8051F39x 數(shù)據(jù)總線寬度:8 bit 最大時鐘頻率:50 MHz 程序存儲器大小:16 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:1.8 V to 3.6 V 工作溫度范圍:- 40 C to + 105 C 封裝 / 箱體:QFN-20 安裝風格:SMD/SMT