Moteur de recherche de fiches techniques de composants électroniques
  French  ▼
ALLDATASHEET.FR

X  

USB245 Fiches technique(PDF) 4 Page - List of Unclassifed Manufacturers

No de pièce USB245
Description  Pinout Information
PDF  6 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricant  ETC [List of Unclassifed Manufacturers]
Site Internet  
Logo ETC - List of Unclassifed Manufacturers

USB245 Fiches technique(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


Fiches technique Télécharger

Go To PDF Page


Lien URL



ALLDATASHEET vous a-t-il été utile ?  [ DONATE ] 

À propos de Alldatasheet   |   Publicité   |   Contactez-nous   |   Politique de confidentialité   |   Lien vers la fiche technique    |   Echange de liens   |   Fabricants
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