전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

PIC16C745/P 데이터시트(PDF) 73 Page - Microchip Technology

부품명 PIC16C745/P
상세설명  8-Bit CMOS Microcontrollers with USB
PDF  158 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  MICROCHIP [Microchip Technology]
홈페이지  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16C745/P 데이터시트(HTML) 73 Page - Microchip Technology

Back Button PIC16C745/P Datasheet HTML 69Page - Microchip Technology PIC16C745/P Datasheet HTML 70Page - Microchip Technology PIC16C745/P Datasheet HTML 71Page - Microchip Technology PIC16C745/P Datasheet HTML 72Page - Microchip Technology PIC16C745/P Datasheet HTML 73Page - Microchip Technology PIC16C745/P Datasheet HTML 74Page - Microchip Technology PIC16C745/P Datasheet HTML 75Page - Microchip Technology PIC16C745/P Datasheet HTML 76Page - Microchip Technology PIC16C745/P Datasheet HTML 77Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 73 / 158 page
background image
© 1999 Microchip Technology Inc.
Advanced Information
DS41124A-page 73
PIC16C745/765
SET_CONFIGURATION command. Once the device
is configured, the application can communicate with
the host using the GetUSB and PutUSB calls.
The USB peripheral detects several different errors
and handles most internally. The USB_ERR interrupt
notifies the microcontroller that an error has occurred.
No action is required by the device when an error
occurs. Instead the errors are simply acknowledged
and counted.
There is no mechanism to pull the
device off the bus if there are too many errors. If this
behavior is desired it must be implemented in the
application.
The Activity interrupt is left disabled until the USB
peripheral detects no bus activity for 3 mS. Then it
suspends the USB peripheral and enables the activity
interrupt.
The activity interrupt then reactivates the
USB peripheral when bus activity resumes so process-
ing may continue.
CheckSleep is a separate call that takes the bus idle
one step further and puts the device to sleep if the
USB peripheral has detected no activity on the bus.
This powers down most of the device to minimal cur-
rent draw.
This call should be made at a point in the
main loop where all other processing is complete.
10.9.6
EXAMPLES
This example shows how the USB functions are used.
This example first initializes the USB peripheral which
allows the host to enumerate the device. The enumer-
ation process occurs in the background, via an Inter-
rupt service routine.
This function waits until
enumeration is complete, and then polls EP1 OUT to
see if there is any data available. When a buffer is
available, it is copied to the IN buffer. Presumably your
application would do something more interesting with
the data than this example.
; ******************************************************************
; Demo program that initializes the USB peripheral, allows the Host
;
to Enumerate, then copies buffers from EP1OUT to EP1IN.
; ******************************************************************
main
call
InitUSB
; Set up everything so we can enumerate
ConfiguredUSB
; wait here until we have enumerated.
idleloop
call
CheckSleep
; Ok, here’s a good point to put part to sleep if no activity on the bus.
CheckEP1
; Check Endpoint 1 for an OUT transaction
bcf
STATUS,IRP
; point to lower banks
movlw
buffer
movwf
FSR
; point FSR to our buffer
movlw
1
; check end point 1
call
GetUSB
; If data is ready, it will be copied.
btfss
STATUS,C
; was there any data for us?
goto
idleloop
; Nope, check again.
PutBuffer
bcf
STATUS,IRP
; point to lower banks
movwf
bufferlen
; save buffer length
movlw
buffer
movwf
FSR
; point FSR to our buffer
swapf
bufferlen,w
; upper nybble of W is buffer length
iorlw
1
; lower nybble of W is EndPoint number
call
PutUSB
btfss
STATUS,C
; was it successful?
goto
PutBuffer
; No: try again until successful
goto
idleloop
; Yes: restart loop
end



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com