23.03.2021 tarihinde güncellenen 28.11.2010 tarihinde yayımlanan PIC16C765 USB Test Kartı ile 2728 yazısı var. Yazar gevv
Mikrodenetleyiciler ile aram iyi olmadığı için devre hakkında fazla açıklama yapmıyacağım 🙂 fakat projeye ait eagle ile hazırlanan pcb, şema, asm ve Visual C++ hazırlanan PC progrogramı (kaynak kodları var) bulunuyor.
Holgi’s PIC16C765 USB Test Board
Microchip PIC16C765 or PIC16c745 USB controllers are well suited for experimentation when no simple stupid USB port but need a chip with programmable integrated intelligence. Since this is for USB 1.1 devices LowSpeed it should not have to hurry. The USB interface provides the controllers give 1.5Mbit / s, but the data must be processed in the chip yet. It comes in the end, so on 1000 bytes / s. A data packet with 8 byte takes about 8ms. That’s enough for measurements of slowly changing variables such as temperature measurements, or to switch relays. A CompactFlash reader should not be built better with these controllers.
The Microchip USB routines require about 2 KB program memory. This leaves 6kB left for their own programs.
PIC16C765 USB Test Board
USB test board layout for PIC16C765 (Eagle3.5) and USB demo with source code (VisualC 5 and MPASM)
The program in the PIC performs the following functions: AD values of the five analog inputs on PORTA read. PORTA can not be changed to digital IO’s with the program!
The serial interface is fixed at 9600 baud, 8, N, 1 set, and can send and receive data. But see also below. The two PWM outputs are active (default DutyCycle 0%). About the PR2 register, the PWM frequency can be changed. All others are set to PORT’s digital IO’s and can be read and written. The TRIS registers are read and written to the data direction of port’s / Pins change.
The default setting after each RESET: PORTA analog inputs on everything except PORTA4 digital input. PORTB all outputs PORTC1 PWM Output 1, Output 2 PWM PORTC2, PORTC6 output TxD, RxD input for PORTC7, the other PORTC pins inputs PORTD and PORTE all inputs
If you need other features or some other default has to adjust itself to program the PIC’s wishes.
The PC demo program shows how to port and reads simply describes how to change the TRIS registers and how to get values from the AD converter. At the beginning of a nice little chase on PORTB and PORTD. Yet no example of the serial interface.
It has already been asked several times whether the Danch PIC16C765 can be programmed via USB. This is NOT. For this you need a PIC programmer. Microchip hopefully soon bring out a USB flash controller with a USB bootloader. With the EPROM types, the work is just annoying;)
Unfortunately, there is no Microchip USB driver in the form of a DLL. Although there are VBHIDComm.ocx. A VB ActiveX component. The compiler did not embed but my VisualC. The search for a different option led to days not until much. Until I found a page titled USB by Example. Link? Are you watching at www.google.com. The light then brought into the matter.
The PIC’s are known as human interface devices (HID). No need for the driver. Win asks also if not then to plug in the test board. In the Device Manager appears after a few seconds under HID (human interface devices), not USB! On an HID compliant device. You can win with those HID devices resources board (HID.DLL and setupapi.dll) edit. One must only know how. I have the whole of a few examples of the visual basic page up together, and wrote custom C routines. Do not ask me exactly what is being done. I do not know. The main thing it is;)
Alternatif Dosya indirme LINK listesi (TXT formatında) link-13286.zip şifre-pass: 320volt.com