use barcode reader in asp.net Serial Port in Software

Drawing QR-Code in Software Serial Port

Serial Port
QR Code ISO/IEC18004 Reader In None
Using Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Creating QR In None
Using Barcode creator for Software Control to generate, create QR image in Software applications.
The device you are most likely to interface to is the PC, and its serial ports consist of basically the same hardware and BIOS interfaces that were rst introduced with the rst PC in 1981. Since that time, a 9-pin connector has been speci ed for the port (in the PC/AT), and one signi cant hardware upgrade was introduced when the PS/2 was announced. For the most part, the serial port has changed the least of any component in the PC over the past 25-plus years. Either a male 25- or 9-pin connector is available on the back of the PC for each serial port. These connectors are shown in Fig. 19.1 and are wired according to Table 19.1. The 9-pin standard was developed originally for the PC/AT because the serial port was put on the same adapter card as the printer port, and there wasn t enough room for the serial port and parallel port to both use 25-pin D-shell connectors. Actually, I prefer the smaller form-factor connector.
Scanning QR-Code In None
Using Barcode reader for Software Control to read, scan read, scan image in Software applications.
QR Maker In C#.NET
Using Barcode encoder for .NET Control to generate, create QR-Code image in VS .NET applications.
DB-25 (Male)
Painting QR Code In .NET Framework
Using Barcode creation for ASP.NET Control to generate, create QR image in ASP.NET applications.
Draw QR Code ISO/IEC18004 In .NET Framework
Using Barcode printer for VS .NET Control to generate, create Quick Response Code image in .NET applications.
13 12 25 11 24 10 23 9 22 8 21 7 20 6 19 5 18 4 17 3 16 2 15 1 14
Print Quick Response Code In Visual Basic .NET
Using Barcode creation for Visual Studio .NET Control to generate, create Denso QR Bar Code image in .NET framework applications.
EAN13 Generation In None
Using Barcode creation for Software Control to generate, create EAN-13 Supplement 5 image in Software applications.
D-9 (Male)
Drawing UPC-A Supplement 2 In None
Using Barcode printer for Software Control to generate, create UPC Code image in Software applications.
GTIN - 128 Creator In None
Using Barcode creation for Software Control to generate, create EAN128 image in Software applications.
5 4 3 2 1 9 8 7 6
Bar Code Generator In None
Using Barcode generator for Software Control to generate, create bar code image in Software applications.
Creating Code 128 Code Set B In None
Using Barcode creation for Software Control to generate, create Code 128 Code Set B image in Software applications.
Figure 19.1 The PC normally has a 9-pin RS-232 connector, but some older models may have a 25-pin connector.
Printing Identcode In None
Using Barcode encoder for Software Control to generate, create Identcode image in Software applications.
UPC - 13 Drawer In VS .NET
Using Barcode generator for Reporting Service Control to generate, create UPC - 13 image in Reporting Service applications.
SERIAL PORT
Print Data Matrix ECC200 In Visual Studio .NET
Using Barcode maker for Reporting Service Control to generate, create DataMatrix image in Reporting Service applications.
Making Code39 In VB.NET
Using Barcode printer for .NET Control to generate, create Code 39 Extended image in VS .NET applications.
TABLE 19.1 PIN NAME
GTIN - 13 Creator In None
Using Barcode maker for Online Control to generate, create European Article Number 13 image in Online applications.
European Article Number 13 Drawer In None
Using Barcode drawer for Font Control to generate, create GTIN - 13 image in Font applications.
THE STANDARD RS-232 CONNECTOR PINOUTS 25-PIN 9-PIN I/O DIRECTION
Code 128 Code Set A Scanner In Java
Using Barcode decoder for Java Control to read, scan read, scan image in Java applications.
Matrix 2D Barcode Maker In Visual Basic .NET
Using Barcode creation for Visual Studio .NET Control to generate, create Matrix Barcode image in VS .NET applications.
TxD RxD Gnd RTS CTS DTR DSR RI DCD
2 3 7 4 5 20 6 22 8
3 2 5 7 8 4 6 9 1
Output (O) Input (I)
O I O I I I
I feel that the serial ports are the best way to interface a PIC microcontroller to the PC. This is so because the serial port s timing is standard across virtually all PCs, and signal current is very low, which minimizes the chances that a problem with the circuit connected to it will damage the PC. Note that I said minimizes the chances that the PC can be damaged very high voltage inputs can damage the PC s RS-232 interface circuitry or the PC itself. This can be avoided by only using proper RS-232 interfaces on your PIC microcontroller application. Up to four serial ports can be addressed by the PC, and of these, probably only two will be usable for connecting external devices to the PC. The serial port base addresses are listed in Table 19.2, and each base address is used as an initial offset to eight registers that are used by the serial port controller (the 8250). The interrupt number is the interrupt vector requested when an interrupt condition is encountered. The block diagram of the 8250 Universal Asynchronous Receiver/Transmitter (UART) used as the baseline device in the PC is quite simple, and if you were to design your own device, its block diagram probably would look like the 8250 s. Figure 19.2 shows the data paths for serial communications. You might want to refer back to this diagram as I explain how the various registers work.
TABLE 19.2 PORT
PC SERIAL PORT BASE ADDRESSES BASE ADDRESS INTERRUPT NUMBER
COM1 COM2 COM3 COM4
0x3F8 0x2F8 0x3E8 0x2E8
0xC 0xB 0xC 0xB
PRACTICAL PC INTERFACING
Tx Holding Register Tx Shift Register Clock Divisor Latch 1.8432 MHz
Rx Holding Register Rx Shift Register Line Status Register Modem Status Register
PC Data Bus
Modem Control Register
Figure 19.2 Block diagram of the 8250 UART chip used in the original PC and the basis for the hardware used in modern PCs.
When implementing an RS-232 interface, you can make your life easier by doing a few simple things. The rst is to simplify the connection. Whenever I do an application, I standardize on using a 9-pin D-shell with the DTE interface (the one that comes out of the PC). As well as standardizing on the DTE connection, I also loop back the DTR/DSR and CTS/RTS data pairs inside the external device rather than at the PC or in the cable. These actions allow me to use a standard PC and cable without having to do any wiring on my own or any modi cations. It actually looks a lot more professional as well. Tying DTR/DSR and CTS/RTS also means that I can take advantage of built-in terminal emulators. Virtually all operating systems have a built-in dumb terminal emulator that can be used for debugging the external device without requiring the PC code to run. Getting the external device working before debugging the PC application code should simplify the work that you have to do. The last point is that while I can develop applications that run up to 115,200 bps (by writing a 1 into the two data divisor registers), I typically run at 9,600 or 19,200 bps. By keeping the data rates reasonable, I can run the applications to reasonable lengths (up to about a 1,000 feet with shielded cabling) without requiring special protocols because of bit errors. A PIC microcontroller application that is appropriate for PC serial communications has the following characteristics:
1 A standard PC serial port is to be used. 2 Only two computing devices are connected together. 3 These two devices may be an arbitrary distance apart (from inches to miles to astro-
nomical distances).
Copyright © OnBarcode.com . All rights reserved.