công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

USB245 bảng dữ liệu(PDF) 4 Page - List of Unclassifed Manufacturers

tên linh kiện USB245
Giải thích chi tiết về linh kiện  Pinout Information
PDF  6 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  ETC [List of Unclassifed Manufacturers]
Trang chủ  
Logo ETC - List of Unclassifed Manufacturers

USB245 bảng dữ liệu(HTML) 4 Page - List of Unclassifed Manufacturers

  USB245 Datasheet HTML 1Page - List of Unclassifed Manufacturers USB245 Datasheet HTML 2Page - List of Unclassifed Manufacturers USB245 Datasheet HTML 3Page - List of Unclassifed Manufacturers USB245 Datasheet HTML 4Page - List of Unclassifed Manufacturers USB245 Datasheet HTML 5Page - List of Unclassifed Manufacturers USB245 Datasheet HTML 6Page - List of Unclassifed Manufacturers  
Zoom Inzoom in Zoom Outzoom out
 4 / 6 page
background image
The Following is a sample ‘C’ that reads a character from the USB and writes it back out.
#include <c:\sxc\include\dev\SX28AC.H>
#include <c:\sxc\include\port.h>
#define TXEn
PORTA.3
// INPUT
#define WRITE
PORTA.2
// OUTPUT
#define READn
PORTA.1
// OUTPUT
#define RXFn
PORTA.0
// INPUT
#pragma FUSE = FOSC_HS2 & TURBO & WDTD
#pragma FUSEX = EXTEND
unsigned char byte;
/*--------------------------------------------------------------------------*/
/*
*/
/*--------------------------------------------------------------------------*/
void send_byte()
{
DDR(PORTC,0x00);
// make PORTC output
WRITE=1;
NOP();
PORTC=byte;
NOP();
WRITE=0;
DDR(PORTC,0xFF);
// now make PORTC input
}
/*--------------------------------------------------------------------------*/
/*
*/
/*--------------------------------------------------------------------------*/
void read_byte()
{
READn=0;
NOP();
byte=PORTC;
NOP();
READn=1;
}
/*--------------------------------------------------------------------------*/
/*
*/
/*--------------------------------------------------------------------------*/
void main()
{
OPTION(RTW|RTE_D|PSA);
// start with RTC int disabled
DDR(PORTC,0xFF);
// USB Data Port
DDR(PORTB,0xFF);
// all inputs
DDR(PORTA,0xF9);
// USB Status lines
WRITE=0;
// Initialize control
READn=1;
// Outputs Here
while (1)
// Loop forever
{if (RXFn == 0)
// Is there a character available
{read_byte(); // Yes, so get it
send_byte(); // and send it back out
}
}
}
Setup and running.
Place the USB device in an empty breadboard, noting proper pin orientation. If you are using
the USB adapter cable, while it is NOT plugged into a master or PC, plug the proper end into the
breadboard next to the USB245 so that the pin with the Red wire connects to USB245 pin 22, and
the pin with the black wire connects to pin 19. Place a jumper wire between pins 22 & 23 of the
USB245 on the breadboard. At this point only the top-right 6 pins of the USB245 will be attached.
With nothing else attached to the module, except as noted above, now plug the other end of the
cable into the PC. It should recognize a new USB device a start searching for drivers. When it



Html Pages

1 2 3 4 5 6


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
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