PIC16C765 USB Test Kartı

| Haziran 5, 2023 Tarihinde güncellendi
PIC16C765 USB Test Kartı

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.

PCBway Türkiye PCB Manufacturer PCB Assembly

PIC16C765 pcb, şema (Eagle3.5) USB test kartı ve kaynak kodları (VisualC 5 ve MPASM) içeren USB demosu

PIC’deki program aşağıdaki işlevleri yerine getirir:

PORTA üzerindeki beş analog girişten AD değerlerini okuyun. PORTA, program ile dijital IO’lara değiştirilemez!

Seri arayüz kalıcı olarak 9600 baud, 8, N, 1 olarak ayarlanmıştır ve veri gönderip alabilir.

İki PWM çıkışı aktiftir (DutyCycle %0 önceden ayarlanmış). PWM frekansı PR2 kaydı aracılığıyla değiştirilebilir.

Diğer tüm PORT’lar dijital IO’lara ayarlıdır ve okunup yazılabilir.

TRIS kayıtları, portların/pinlerin veri yönünü değiştirmek için okunabilir ve yazılabilir.

Her RESET’ten sonraki temel ayar:

PORTA4 dijital girişi hariç analog girişlerdeki her şey.

PORTB tüm çıkışlar

PORTC1 PWM çıkışı1, PORTC2 PWM çıkışı2, TxD için PORTC6 çıkışı, RxD için PORTC7 girişi,

diğer PORTC pin girişleri

PORTD ve PORTE tüm girişler


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;)


Şifre-Pass: 320volt.com

Yayım tarihi: 2010/11/28 Etiketler: ,

1 Yorum “PIC16C765 USB Test Kartı

  1. Sabri BozkurtSabri Bozkurt

    12 volt ile çalışacak motora değiştirebileceğim sayısal değer ile sayıp durmasını sağlayabileceğim bir devreye ihtiyacım var


Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir