PIC16C765-I/P Microchip Technology, PIC16C765-I/P Datasheet - Page 73

IC MCU OTP 8KX14 USB 40DIP

PIC16C765-I/P

Manufacturer Part Number
PIC16C765-I/P
Description
IC MCU OTP 8KX14 USB 40DIP
Manufacturer
Microchip Technology
Series
PIC® 16Cr

Specifications of PIC16C765-I/P

Core Size
8-Bit
Program Memory Size
14KB (8K x 14)
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Core Processor
PIC
Speed
24MHz
Connectivity
SCI, UART/USART, USB
Number Of I /o
33
Program Memory Type
OTP
Ram Size
256 x 8
Voltage - Supply (vcc/vdd)
4.35 V ~ 5.25 V
Data Converters
A/D 8x8b
Oscillator Type
External
Operating Temperature
-40°C ~ 85°C
Package / Case
40-DIP (0.600", 15.24mm)
Controller Family/series
PIC16C
No. Of I/o's
33
Ram Memory Size
256Byte
Cpu Speed
24MHz
No. Of Timers
3
Processor Series
PIC16C
Core
PIC
Data Bus Width
8 bit
Data Ram Size
256 B
Maximum Clock Frequency
24 MHz
Number Of Programmable I/os
33
Number Of Timers
3
Operating Supply Voltage
4.35 V to 5.25 V
Maximum Operating Temperature
+ 85 C
Mounting Style
Through Hole
3rd Party Development Tools
52715-96, 52716-328, 52717-734
Development Tools By Supplier
ICE2000, DM163022
Minimum Operating Temperature
- 40 C
On-chip Adc
5 bit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
ISPICR1 - ADAPTER IN-CIRCUIT PROGRAMMING444-1001 - DEMO BOARD FOR PICMICRO MCU
Eeprom Size
-
Lead Free Status / Rohs Status
 Details
Other names
Q975613

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16C765-I/P
Manufacturer:
MICROCHIP
Quantity:
12 000
Part Number:
PIC16C765-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
10.9.3.6
The PIC16C745/765 has 64 bytes of Dual Port RAM.
24 are used for the Buffer Descriptor Table (BDT),
leaving 40 bytes for buffers.
Endpoints 0 IN and OUT need dedicated buffers since
a setup transaction can never be NAKed. That leaves
three buffers for four possible Endpoints, but the USB
spec requires that low speed devices are only allowed
2 endpoints (USB 1.1 paragraph 5.3.1.2), where an
endpoint is a simplex connection that is defined by the
combination of Endpoint number and direction.
10.9.3.7
Vendor specific commands are defined by the vendor.
These are parsed out, but are not processed. Instead,
control is passed to function CheckVendor where
they can be processed.
10.9.4
The software interface is packaged into four files,
designed to simplify the integration with your application.
File USB_CH9.ASM contains the interface and core
functions
DESCRIPT.ASM contains the device, config, inter-
face, endpoint and string descriptors. Both of these
files must be linked in with your application.
HIDCLASS.ASM provides some HID Class specific
functions. Currently only GetReportDescriptor is sup-
ported. Other class specific functions can be imple-
mented in a similar fashion. When a token done
interrupt determines that it’s a class specific command
on the basis that ReportType bit 6 is set, control is
passed to function ClassSpecific. If you’re working
with a different class, this is your interface between the
core functions and the class specific functions.
USB_MAIN.ASM is useful as a starting point on a new
application and as an example of how an existing
application needs to service the USB interrupt and
communicate with the core functions.
10.9.5
Interface between the Application and Protocol layer
takes place in three main functions: InitUSB, PutUSB
and GetUSB.
InitUSB should be called by the main program immedi-
ately upon power-up. It enables the USB peripheral and
USB Reset interrupt, and transitions the part to the pow-
ered state to prepare the device for enumeration. See
Section 10.9.6 “Behind the Scenes” for details on the
enumeration process.
DeInitUSB disables the USB peripheral, removing the
device from the bus. An application might call
DeInitUSB if it was finished communicating to the host
and didn't want to be polled any more.
2000 Microchip Technology Inc.
FILE PACKAGING
FUNCTION CALL REFERENCE
Buffer Allocation
Vendor Specific Commands
needed
to
enumerate
the
bus.
Preliminary
PutUSB (Buffer pointer, Buffer size, Endpoint) sends
data up to the host. The pointer to the block of data to
transmit is in the FSR/IRP, and the block size and end-
point is passed in W register. If the IN buffer is available
for that endpoint, PutUSB copies the buffer, flips the
Data 0/1 bit and sets the OWNS bit. A buffer not avail-
able would occur when it has been previously loaded
and the host has not requested that the USB peripheral
transmit it. In this case, a failure code would be returned
so the application can try again later.
GetUSB (Buffer Pointer, Endpoint) returns data sent
from the host. If the out buffer pointed to by the endpoint
number is ready, as indicated by the OWNS bit, the
buffer is copied from dual port RAM to the locations
pointed to by the buffer pointer, and resets the endpoint
for the next out transaction from the host. If no data is
available, it returns a failure code. Thus the functions of
polling for buffer ready and copying the data are com-
bined into the one function.
ServiceUSBInt handles all interrupts generated by the
USB peripheral. First, it copies the active buffer to com-
mon RAM, which provides a quick turn around on the
buffer in dual port RAM and also avoids having to
switch banks during processing of the buffer. File
USB_MAIN.ASM
ServiceUSBInt would be invoked.
StallUSBEP/UnstallUSBEP sets or clears the stall bit
in the endpoint control register. The stall bit indicates to
the host that user intervention is required and until such
intervention is made, further attempts to communicate
with the endpoint will not be successful. Once the user
intervention has been made, UnstallUSBEP clears the
bit allowing communication to take place. These calls
are useful to signal to the host that user intervention is
required. An example of this might be a printer out of
paper.
SoftDetachUSB clears the DEV_ATT bit, electrically
disconnecting the device from the bus, then reconnect-
ing, so it can be re-enumerated by the host. This pro-
cess takes approximately 50 mS, to ensure that the host
has seen the device disconnect and reattach to the bus.
CheckSleep tests the UCTRL.UIDLE bit if set, indicat-
ing that there has been no activity on the bus for 3 mS.
If set, the device can be put to SLEEP, which puts the
part into a low power standby mode, until wakened by
bus activity. This has to be handled outside the ISR
because we need the interrupt to wake us from SLEEP,
and also because the application may not be ready to
SLEEP when the interrupt occurs. Instead, the applica-
tion should periodically call this function to poll the bit,
when the device is in a good place to SLEEP.
Prior to putting the device to SLEEP, it enables the
activity interrupt so the device will be awakened by the
first transition on the bus. The PICmicro device will
immediately jump to the ISR, recognize the activity
interrupt, which then disables the interrupt and resumes
processing
CheckSleep call.
with
PIC16C745/765
gives
the
instruction
an
example
DS41124C-page 73
following
of
how
the

Related parts for PIC16C765-I/P