Kenbo wrote:Port I/O doesn't get any simpler than a parallel port, but by protocols I meant addressing protocols. It's just an eight bit interface and it seems there needs to be a layer that specifies to the board whether you're reading or writing and which register to address or, if a totally polled interface, the order in which reads and writes occur. I'm just curious how simple or complex the logic is.
Yes your correct, the designers of pb2k did a great job of addressing a lot of different I/O via a simple 8 bit port. It's really not that complicated at all, which is a testiment to their clever work. I don't have the details in front of me, but IIRC the pport has 3 registers, so they used 1 as the control port to tell the I/O board what data they wanted to address, 1 register as the data bus, and 1 register for something else, perhaps read or write selection, I don't recall now.
There's a webpage on the net somewhere that outlines most of it, but in fact has several mistakes, which cost me a few weeks of headaches till I realized it wasn't a bug in my code but rather simply incorrect info.
[edit]
Oh and I also recall that the I/O data protocol is done in a series of data byte sequences, like 5 or so, most of which are just toggling control bits with the real data byte sandwhiched in between. It's been a couple of years since I worked on that part though, so my memory is very hazy on it.