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

X  

AN197 Fiches technique(PDF) 1 Page - Silicon Laboratories

No de pièce AN197
Description  SERIAL COMMUNICATIONS GUIDE FOR THE CP210X
PDF  14 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricant  SILABS [Silicon Laboratories]
Site Internet  http://www.silabs.com
Logo SILABS - Silicon Laboratories

AN197 Fiches technique(HTML) 1 Page - Silicon Laboratories

  AN197 Datasheet HTML 1Page - Silicon Laboratories AN197 Datasheet HTML 2Page - Silicon Laboratories AN197 Datasheet HTML 3Page - Silicon Laboratories AN197 Datasheet HTML 4Page - Silicon Laboratories AN197 Datasheet HTML 5Page - Silicon Laboratories AN197 Datasheet HTML 6Page - Silicon Laboratories AN197 Datasheet HTML 7Page - Silicon Laboratories AN197 Datasheet HTML 8Page - Silicon Laboratories AN197 Datasheet HTML 9Page - Silicon Laboratories Next Button
Zoom Inzoom in Zoom Outzoom out
 1 / 14 page
background image
Rev. 0.6 10/07
Copyright © 2007 by Silicon Laboratories
AN197
AN197
SERIAL COMMUNICATIONS GUIDE FOR THE CP210X
1. Introduction
This document is intended for developers creating products based on the CP210x USB to UART Bridge Controller.
It provides information about serial communications and how to obtain the port number for a specific CP210x
device. Code samples are provided for opening, closing, configuring, reading, and writing to a COM port. Also
included are GetPortNumWinXXXX() functions that can be copied and used to determine the port number on a
CP210x device by using its Vendor ID (VID), Product ID (PID), and serial number.
2. Opening a COM Port
Before configuring and using a COM port to send and receive data, it must first be opened. When a COM port is
opened, a handle is returned by the CreateFile() function that is used from then on for all communication. Here is
example code that opens COM3:
HANDLE hMasterCOM = CreateFile("\\\\.\\COM3",
GENERIC_READ | GENERIC_WRITE,
0,
0,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
0);
The first parameter in the CreateFile() function is a string that contains the COM port number to use. This string will
always be of the form "\\\\.\\COMX" where X is the COM port number to use. The second parameter contains flags
describing access, which will be GENERIC_READ and GENERIC_WRITE for the example in this document, and
allows both read and write access. Parameters three and four must always be 0, and the flag in parameter five
must always be OPEN_EXISTING when using CreateFile() for COM applications. The sixth parameter should
always contain the FILE_ATTRIBUTE_NORMAL flag. In addition, the FILE_FLAG_OVERLAPPED is an optional
flag that is used when working with asynchronous transfers (this option is used for the example in this document).
If overlapped mode is used, functions that read and write to the COM port must specify an OVERLAPPED
structure identifying the file pointer, which is demonstrated in section 3.1. and section 3.2. (more information on
overlapped I/O is located at http://msdn.microsoft.com/library/en-us/dnfiles/html/msdn_serial.asp?frame=true -
serial_topic4). The seventh, and last, parameter must always be 0.
If this function returns successfully, then a handle to the COM port will be assigned to the HANDLE variable. If the
function fails, then INVALID_HANDLE_VALUE will be returned. Upon return check the handle and if it's valid, then
prepare the COM port for data transmission.
Relevant Devices
This application note applies to the following devices:
CP2101, CP2102, CP2103


Numéro de pièce similaire - AN197

FabricantNo de pièceFiches techniqueDescription
logo
STMicroelectronics
AN1971 STMICROELECTRONICS-AN1971 Datasheet
153Kb / 16P
ST7LITE0xxx MICROCONTROLLED BALLAST
17-Dec-2012
AN1978 STMICROELECTRONICS-AN1978 Datasheet
539Kb / 14P
SMART CARD INTERFACE
10-Jun-2004
logo
Freescale Semiconductor...
AN1979 FREESCALE-AN1979 Datasheet
768Kb / 10P
Altimeter and Barometer System
More results

Description similaire - AN197

FabricantNo de pièceFiches techniqueDescription
logo
Advanced Micro Devices
AM8530H AMD-AM8530H Datasheet
797Kb / 194P
Serial Communications Controller
logo
Hitachi Semiconductor
HD64570 HITACHI-HD64570 Datasheet
1Mb / 469P
Serial Communications Adaptor
logo
WJ Communication. Inc.
ECG055 WJCI-ECG055 Datasheet
311Kb / 7P
The Communications Edge
logo
Zilog, Inc.
Z08030 ZILOG-Z08030 Datasheet
304Kb / 9P
Serial Communications Controller
logo
Dallas Semiconductor
DS3900 DALLAS-DS3900 Datasheet
876Kb / 15P
Serial Communications Module For Evaluation Kits
logo
WJ Communication. Inc.
HMJ9 WJCI-HMJ9 Datasheet
59Kb / 4P
The Communications Edge
logo
List of Unclassifed Man...
AMWx06-A1U ETC2-AMWx06-A1U Datasheet
1Mb / 13P
Serial Communications Primer
logo
Maxim Integrated Produc...
DS3900 MAXIM-DS3900 Datasheet
894Kb / 15P
Serial Communications Module For Evaluation Kits
2004
logo
Adlink Technology Inc.
CPCI-3534 ADLINK-CPCI-3534 Datasheet
207Kb / 1P
Serial Communications Controller
CPCI-3544 ADLINK-CPCI-3544 Datasheet
168Kb / 1P
Serial Communications Controller
More results


Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14


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