Teen Programmers Unite  


Return to forum top


Posted by Spyder_Y3K [send private reply] at August 16, 2002, 04:39:57 AM

Anyone know the max number of ports that can be on a machine
...I know its something like 1-65,000 but whats the exact number?

Posted by Spyder_Y3K [send private reply] at August 16, 2002, 04:46:29 AM

Sorry for the same title...I tried editing the other "-=Potrz=-" post and it just posted a new one...anyway...whats one way you can check for an internet connection in Visual Basic ?

Posted by Spyder_Y3K [send private reply] at August 16, 2002, 04:48:08 AM

I think something is wrong...post 2 ^ was supposed to be the "Edited" version of post 1...instead it just replied...

Posted by AnyoneEB [send private reply] at August 16, 2002, 09:31:23 AM

tell the suggestions board :)

There are 2^16 ports so port numbers 0 - 65535.

Posted by Psion [send private reply] at August 16, 2002, 10:00:26 AM

Your question is ill-formed. Computers are not required to have any "ports". You need to specify the architecture to be able to get an answer.

Posted by Spyder_Y3K [send private reply] at August 17, 2002, 06:53:27 AM

AnyoneEB thanx for your help...I never said computers were required to have any "ports"...all I asked was the max number of "ports" that "could" be on a machine....

Posted by buzgub [send private reply] at August 17, 2002, 06:56:17 AM

However, you didn't specify which breed of port you had in mind.

Posted by AnyoneEB [send private reply] at August 17, 2002, 09:06:03 AM

Sorry, I thought you meant ports as in the TCP/IP protocol, I don't think there is a limit to phyical ports (except maybe IRQ numbers, which total between 10 and 20)

Posted by RedX [send private reply] at August 17, 2002, 11:09:47 AM

AFAIK the bios generaly support 4 serial ports and 2 parallel ports. If you add more boards with UARTs and ISA to parallel port ICs (or PCI decoders) and controll them with your own drivers the limite depents on your own skills and the computers speed.

Posted by CodeRed [send private reply] at August 17, 2002, 02:56:37 PM

USB busses can be split several thousand times each

Posted by RedX [send private reply] at August 17, 2002, 03:51:47 PM

If you can afford all those hubs. Not to mention store and provide power.

Posted by Mike_L [send private reply] at August 24, 2002, 12:39:21 AM

There are two principle mechanisms for hardware devices to communicate on an ISA bus. These are memory and port accesses. There are read ports and write ports. Ports can be accessed one byte at a time (8-bit) or two bytes at a time (16-bit). For example, the standard ISA game port provides its data on port 0x201. When a program on the cpu executes an instruction to read port 0x201, the request is broadcast on the ISA bus. Any card that has a game port configured will respond by broadcasting the reply back down the ISA bus. The reply is a single byte that represents the state of the physical port on the back of the PC. The cpu then recieves this data and stores it wherever the program specified (a register or memory).

Transferring data by reading and writing memory is much faster than io ports. But providing memory on an ISA card requires chips that are much more complex and expensive.

To send a large amount of data to an io port, the cpu must feed it one or two bytes at a time. This is slow and prevents the cpu from doing other things. To solve this problem, the DMA chip was created. The Direct Memory Access chip can take a chunk of data from memory and feed it byte by byte to an io port. It can also read data piece by piece from an io port and store the data in memory. The standard PC DMA controller can handle several streams at once. These streams are called channels (DMA channel 1, 2, etc.). SoundBlaster Compatible sound cards work with the DMA controller to play and record sound. UDMA IDE controllers support very large data transfers via the DMA controller. This allows the CPU's program to issue a command to the disk drive (read block 12345) and specify which part of memory the data should be stored in. Then the CPU's program can check back a little later to see if the data has been read.

PCI works similarly, but I believe it uses 32-bit io ports (4 bytes). Some motherboards have special 64-bit PCI slots and you can purchase 64-bit PCI SCSI controllers. The double-wide data path of 64-bit PCI allows more data to be transferred per 1/33,000,000 of a second (33 MHz). AGP is another flavor of PCI. It is designed with proper timing and cache going both ways, so the AGP card can access the system RAM just as easily as the cpu can access the AGP card's memory. I believe AGP has a 128-bit data bus too... judging from how many lines are on the plug.

Anyway nothing much has changed since ISA. Personal computers still use a simple broadcast bus internally... kinda like Ethernet even. Oh yeah, and I think the ISA port numbers are a single byte... so there are 256 of them.


Posted by RedX [send private reply] at August 24, 2002, 07:53:53 AM

16bit ISA has a 24bit adress bus and a 16bit data bus.
However a 8bit ISA interface card used only the first 10bits of the adress bus. That's still 1024 adresses.

PCI is a bit differend than ISA. It has still a data and an adress bus but a big part of the adressing and initialisation is handled by the bios (Each card needs a vendor ID for the bios to detect and init it), This makes it more difficult to make your own PCI cards.

You must be logged in to post messages and see which you have already read.

Log on
Save for later automatic logon

Register as a new user
Copyright TPU 2002. See the Credits and About TPU for more information.