Free Basic Serial Port Programming Windows

Free Basic Serial Port Programming Windows Rating: 5,0/5 560votes

Freeware RS232 port sniffermonitor software Hi All I wonder if anyone knows of one of these Im looking for a Windows app which will monitor live traffic from an. Hey Socket programming got you down Is this stuff just a little too difficult to figure out from the man pages You want to do cool Internet programming, but you. Operating Systems, freeware and nonfree, such as Linux, FreeBSD, BeOS, Zeta, Unix, RiscOS, Amiga, DOSclones, Windowsemulators, etc. USB Wikipedia. Universal Serial Bus USBCertified USB logo. Type. Bus. Production history. Designer. Compaq, DEC, IBM, Intel, Microsoft, NEC, and Nortel. Designed. January 1. Produced. Since May 1. Superseded. Serial port, parallel port, game port, Apple Desktop Bus, PS2 port, and Mag. Safe. General specifications. Free Basic Serial Port Programming Windows' title='Free Basic Serial Port Programming Windows' />Length. Width. 12 mm type A28. B6. 8 mm minimicro8. CHeight. 4. 5 mm type A27. Features. PIC16F87x serial bootloader. Used successfully by thousands of users worldwide. Compatible with the 16F87013467 and 16F876, 16F876A, 16F877, 16F877A. B1. 0. 4. 4 mm type B Super. Speed1. 83 mm minimicro2. CHot pluggable. Yes. External. Yes. Cable. Super. SpeedPins. On The Go9 Super. Speed1. 1 Powered B Super. Speed2. 4 type CConnector. An example how to use Windows API to control a serial port or a USB VCP device from VB6 or VBA Word, Excel, Access. The code below shows how to declare WinAPI data. In the newgroups there are many questions about serial communication so I thought make it public Its freeware. The only thing I expect from users is that they drop. Unique. Electrical. Signal. 5 V DCMax. Va7. 00. 05. 00. V USB 3. V PDMax. current. A USB 2. 00. 9 A USB 3. A BC 1. 23 A type CUp to 5 A PDData. Data signal. Packet data, defined by specifications. Width. 1 bit. Bitrate. Mbits depending on modeMax. Protocol. Serial. Pilot Speed Into The West Download Torrent there. Pin out. The type A plug left and type B plug rightPin 1     VBUS 5 VPin 2     DataPin 3     DataPin 4     Ground. USB, short for Universal Serial Bus, is an industry standard that defines cables, connectors and communications protocols for connection, communication, and power supply between computers and devices. USB was designed to standardize the connection of computer peripherals including keyboards, pointing devices, digital cameras, printers, portable media players, disk drives and network adapters to personal computers, both to communicate and to supply electric power. It has largely replaced a variety of earlier interfaces, such as serial ports and parallel ports, as well as separate power chargers for portable devices and has become commonplace on a wide range of devices. Created in the mid 1. USB Implementers Forum USB IF. OvervieweditIn general, there are three basic formats of USB connectors the default or standard format intended for desktop or portable equipment for example, on USB flash drives, the mini intended for mobile equipment now deprecated except the Mini B, which is used on many cameras, and the thinner micro size, for low profile mobile equipment most modern mobile phones. Also, there are 5 modes of USB data transfer, in order of increasing bandwidth Low Speed from 1. Full Speed from 1. High Speed from 2. Super. Speed from 3. Super. Speed from 3. USB devices have some choice of implemented modes, and USB version is not a reliable statement of implemented modes. Modes are identified by their names and icons, and the specifications suggests that plugs and receptacles be colour coded Super. Speed is identified by blue. Unlike other data buses e. Ethernet, HDMI, USB connections are directed, with both upstream and downstream ports emanating from a single host. This applies to electrical power, with only downstream facing ports providing power this topology was chosen to easily prevent electrical overloads and damaged equipment. Thus, USB cables have different ends A and B, with different physical connectors for each. Therefore, in general, each different format requires four different connectors a plug and receptacle for each of the A and B ends. USB cables have the plugs, and the corresponding receptacles are on the computers or electronic devices. In common practice, the A end is usually the standard format, and the B side varies over standard, mini, and micro. The mini and micro formats also provide for USB On The Go with a hermaphroditic AB receptacle, which accepts either an A or a B plug. On The Go allows USB between peers without discarding the directed topology by choosing the host at connection time it also allows one receptacle to perform double duty in space constrained applications. There are cables with A plugs on both ends, which may be valid if the cable includes, for example, a USB host to host transfer device with 2 ports, but they could also be non standard and erroneous and should be used carefully. The micro format is the most durable from the point of view of designed insertion lifetime. The standard and mini connectors have a design lifetime of 1,5. Mini B connectors increased this to 5,0. The micro connectors were designed with frequent charging of portable devices in mind, so have a design life of 1. Likewise, the springy component of the retention mechanism, parts that provide required gripping force, were also moved into plugs on the cable side. Historyedit. The basic USB trident logo8. USB logo on the head of a standard A plug. A group of seven companies began the development of USB in 1. Compaq, DEC, IBM, Intel, Microsoft, NEC, and Nortel. The goal was to make it fundamentally easier to connect external devices to PCs by replacing the multitude of connectors at the back of PCs, addressing the usability issues of existing interfaces, and simplifying software configuration of all devices connected to USB, as well as permitting greater data rates for external devices. A team including Ajay Bhatt worked on the standard at Intel 1. USB were produced by Intel in 1. The original USB 1. January 1. 99. 6, defined data transfer rates of 1. Mbits. Low Speed and 1. Mbits Full Speed. Microsoft Windows 9. OSR 2. 1 provided OEM support for the devices. The first widely used version of USB was 1. September 1. 99. 8. The 1. 2 Mbits data rate was intended for higher speed devices such as disk drives, and the lower 1. Mbits rate for low data rate devices such as joysticks. Apple Inc. s i. Mac was the first mainstream product with USB and the i. Macs success popularized USB itself. Following Apples design decision to remove all legacy ports from the i. Mac, many PC manufacturers began building legacy free PCs, which led to the broader PC market using USB as a standard. The USB 2. 0 specification was released in April 2. USB Implementers Forum USB IF at the end of 2. Hewlett Packard, Intel, Lucent Technologies now Nokia, NEC, and Philips jointly led the initiative to develop a higher data transfer rate, with the resulting specification achieving 4. Mbits, 4. 0 times as fast as the original USB 1. The USB 3. 0 specification was published on 1. November 2. 00. 8. Its main goals were to increase the data transfer rate up to 5 Gbits, decrease power consumption, increase power output, and be backward compatible with USB 2. USB 3. 0 includes a new, higher speed bus called Super. Speed in parallel with the USB 2. For this reason, the new version is also called Super. Speed. 2. 0 The first USB 3. January 2. 01. 0. As of 2. 00. 8update, approximately 6 billion USB ports and interfaces were in the global marketplace, and about 2 billion were being sold each year. The USB 3. 1 specification was published in July 2. In December 2. 01. USB IF submitted USB 3. USB Power Delivery 2. USB Type C specifications to the IEC TC 1. Audio, video and multimedia systems and equipment for inclusion in the international standard IEC 6. Universal Serial Bus interfaces for data and power, which is currently based on USB 2. The USB 3. 2 specification was published in September 2. Version historyeditOvervieweditRelease name. Release date. Maximum transfer rate. Note. USB 0. 8. December 1. Prerelease. USB 0. April 1. 99. 5Prerelease. USB 0. 9. 9August 1. Prerelease. USB 1. RCNovember 1. 99. Release Candidate. USB 1. 0. January 1. Low Speed 1. 5 MbitsUSB 1. August 1. 99. 8Full Speed 1. Mbits2. 4USB 2. April 2. High Speed 4. MbitsUSB 3. November 2. Super. Speed 5 GbitsAlso referred to as USB 3. Programming The Parallel Port In Visual Basic. If you have built any of the interfaces on my circuits page and now want to know how to actually make use of them, this page is for you. This is a simple introduction to programming the parallel port in Visual Basic. Note that most of the concepts in this page apply to both 1. VB. If you are interested in using QBasic to control the port, see Programming The Parallel Port In QBasic. What this document will not do is give you lots of details on using bi directional ports, DMA and other advanced topics. This document assumes that you are familiar with the basic functions of Visual Basic itself. Now before we go any further, we must figure out a way around some limitations built into Visual Basic. VB cannot directly access the hardware on a system. All hardware requests must go through Windows. Because of this, the closest we can get to manipulating the parallel port is with the Printer object. While this is all fine and good when you want to actually print something, it is useless when we want direct hardware control. There may be API calls to get round this, but as of yet I have been unable to find any. In order to control the port directly, we must use something external to our program. It just so happens that there is a great, free product that does exactly what we want. It is a DLL from a company called Soft. Circuits. You can download this DLL from their Programming Tools and Libraries page. Use VBASM. DLL in the VBASM. ZIP package for VB1, VB2, VB3 or VB4 1. Bit. Use WIN9. 5IO. DLL in the WIN9. IO. ZIP package for VB4 3. VB5 or VB6. No matter which one you choose, the DLL file itself must be in the windowssystem directory in any machine the interface control software is to be used or developed on. Please note that no matter which DLL you use, this wont work under any Windows NT based system, including Win. NT, Win. 2K, XP, Vista, Win. Windows Server. NT based systems do not allow direct hardware access to non drivers. Now that we have that finished with, lets get to the port. The parallel port is made up of three different sections. These are the data lines, control lines and status lines. There are 8 data lines, and they are the primary means of getting information out of the port. In simple projects, you will be concentrating mostly on the data lines. The control lines are another 4 outputs. They are meant to provide control signals to the printer such as form feed or initialize. The status lines are a standard parallel ports only inputs. There are 5 of them. They were meant to allow the printer to communicate things such as error, paper out and busy to the PC. Each section is accessed by its own address and will act independently from the rest. This is almost as if they were different ports. The addresses are as follows. Port. Address DecimalAddress HexData Lines. Control Lines. 89. Ah. Status Lines. You need to know the address of the port you want to use. You will also need two other things the command to access the port and the number you want to set it to. The command will be explained in a little while. The ports work with numbers. These can be expressed in hex, binary or decimal, but for this document all values will be expressed in decimal. Its just easier that way. Anyway, you operate the port by sending it a number that represents the binary pattern of the physical outputs on the port. For example, to set the 8 data lines to 1. To set them to 0. Note that these are all 8 bit binary numbers, and the port is also 8 outputs. Coincidence I think not. Before we can use any of the functions contained within either DLL, we must declare them. These declarations are to be placed in any module in your program in the GeneralDeclarations section. For 1. 6bit VB VBASM. DLL, use. Declare Function vb. Inp Lib VBASM. DLL By. Val n. Port As Integer As Integer. Declare Sub vb. Out Lib VBASM. DLL By. Val n. Port As Integer, By. Val n. Data As Integer. For 3. 2bit VB WIN9. IO. DLL, use. Declare Sub vb. Out Lib WIN9. 5IO. DLL By. Val n. Port As Integer, By. Val n. Data As Integer. Declare Sub vb. Outw Lib WIN9. IO. DLL By. Val n. Port As Integer, By. Val n. Data As Integer. Declare Function vb. Inp Lib WIN9. 5IO. DLL By. Val n. Port As Integer As Integer. Declare Function vb. Inpw Lib WIN9. 5IO. DLL By. Val n. Port As Integer As Integer. Once you declare the functions, you will have two new commands available. These are vb. Inp and vb. Out. vb. Out is a statement and is used to send a bit to a port, like the following. Out port,number. We will get to vb. Inp later. As you can see, the two parameters required are the port address and the value we want to set it to. The address can be decimal or hex, as can the value. Because there are only 8 data lines, we can only send a maximum of 2. The examples below illustrate sending a few different bit patterns to the data lines. Of course, you can also turn on more than one bit. Note that when you send a bit pattern to the port everything that was there previously is cleared. This is a convenience and also a annoyance. For example, what if we want bit 2 to always stay at 1, but want to turn bit 5 on and off in sequenceEvery time we set bit 5, bit 2 is turned off, and vice versa. We will discuss how to get around this when we get to the vb. Inp function. The control lines are just as easy to control, but there are a few differences. First, the address of the port is 8. Second is that there are only 4 outputs, so the highest decimal representation of the binary bit pattern you will be using is 1. Outputting information is easy, and inputting is just as easy. If you actually want to get information into the computer, you will be using the 5 status lines. Reading the bit pattern of a port is done using the vb. Inp function. This function is used in the following way. Inpport. So if we wanted to get the current status of the status lines port 8. Crossfit Softball Throw Fail. Port. Numvb. Inp8. Port. Num would then contain the decimal representation of the binary bit pattern present at the 5 status lines. If you try this and get 3. When there is nothing connected to the input of a TTL logic chip, a high input is usually assumed. Not only can you perform inputs on ports actually designed for inputting, but you can also use vb. Inp to read the status of an output port. For example. Port. Numvb. Inp8. 88. The above would set Port. Num to the current value of the data lines port 8. We can prove this by doing the following. Port. Numvb. Inp8. Msg. Box Port. Num. If all is well, the number 5. Now that we know the vb. Inp function we can use it to solve the problem of keeping the state of one bit while changing the state of another. For that we will define a subroutine that uses both functions. SUB Out. PortPort. Address, Out. Num. Port. State vb. InpPort. Address. Port. Num Port. State Out. Num. Out Port. Address, Port. Num. Note how the sub adds the current port state to the number we send it. This has the effect of keeping all previous bits at the same state they were in, but either turning on or off the bit or bits represented by the number we pass to the sub. This also requires a change in the way the function is used. To turn on bit 1, we would. This example assumes a current port status of 0 0. If bit 1 is already high, you will get unexpected results, so keeping track of the port is important. To turn bit 1 back off, we would. Out. Port 8. 88, 1. Now this sub introduces a problem. How do we clear everything on the port as if we were doing vb.