PIC16C745/JW Microchip Technology, PIC16C745/JW Datasheet - Page 75

IC MCU EPROM8KX14 USB A/D 28CDIP

PIC16C745/JW

Manufacturer Part Number
PIC16C745/JW
Description
IC MCU EPROM8KX14 USB A/D 28CDIP
Manufacturer
Microchip Technology
Series
PIC® 16Cr

Specifications of PIC16C745/JW

Core Processor
PIC
Core Size
8-Bit
Speed
24MHz
Connectivity
SCI, UART/USART, USB
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
22
Program Memory Size
14KB (8K x 14)
Program Memory Type
EPROM, UV
Ram Size
256 x 8
Voltage - Supply (vcc/vdd)
4.35 V ~ 5.25 V
Data Converters
A/D 5x8b
Oscillator Type
External
Operating Temperature
0°C ~ 70°C
Package / Case
28-CDIP (0.300", 7.62mm) Window
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Eeprom Size
-

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16C745/JW
Manufacturer:
MICROCHIP
Quantity:
51
Part Number:
PIC16C745/JW
Manufacturer:
MICROCHIP
Quantity:
1 000
Part Number:
PIC16C745/JW
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
10.9.7
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
; ******************************************************************
; Demo program that initializes the USB peripheral, allows the Host
;
; ******************************************************************
main
CheckEP1
; Code host to process out buffer from host
PutBuffer
10.9.8
The code is designed to be used with the linker. There
is no provision for includable files. The code comes
packaged as several different files:
• USB_CH9.ASM - handles all the Chapter 9 com-
• USB_DEFS.INC - #Defines used throughout the
• USB_MAIN.ASM - Sample interrupt service
• HIDCLASS.ASM - Handles the HID class specific
2000 Microchip Technology Inc.
mand processing.
code.
routine.
commands.
call
ConfiguredUSB
bankisel buffer
movlw
movwf
movlw
call
btfss
goto
bankisel buffer
movlw
movwf
movlw
call
btfss
goto
goto
end
to Enumerate, then copies buffers from EP1OUT to EP1IN.
EXAMPLE
ASSEMBLING THE CODE
InitUSB
buffer
FSR
1
GetUSB
STATUS,C
PutBuffer
buffer
FSR
0x81
PutUSB
STATUS,C
PutBuffer
idleloop
; Check Endpoint 1 for an OUT transaction
; Set up everything so we can enumerate
; wait here until we have enumerated.
; point to lower banks
; point FSR to our buffer
; check end point 1
; If data is ready, it will be copied.
; was there any data for us?
; Nope, check again.
; point to lower banks
; save buffer length
; point FSR to our buffer
; put 8 bytes to Endpoint 1
; was it successful?
; No: try again until successful
; Yes: restart loop
Preliminary
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.
10.9.8.1
There are two #defines at the top of the code that con-
trol assembly options.
10.9.8.2
This define includes code to count the number of
errors that occur, by type of error. This requires extra
code and RAM locations to implement the counters.
10.9.8.3
This is useful for debug. It encodes the upper 6 bits of
USWSTAT (0x197) to indicate which function is exe-
cuting. See the defines in USB_DEFS.INC for the
codes that will be encoded.
Assembly Options
#define ERRORCOUNTERS
#define FUNCTIONIDS
PIC16C745/765
DS41124C-page 75

Related parts for PIC16C745/JW