[sane-devel] Plustek Scanfx /w Proprietary ISA card
Fred Stevens
2skaters@cannon.net
Thu, 06 Jan 2005 10:53:56 -0600
Gerhard Jaeger wrote:
>Hi Fred,
>
>On Friday 31 December 2004 22:29, Fred Stevens wrote:
>
>
>>Hello,
>>
>>I have a Scanfx with an ISA adapter card. The card is mapped to a
>>jumper selectable range of addresses (0x220,230,260,270,320,330,360,370)
>>and IRQ settings(3,4,5,10,11,12). After looking at the card, I
>>determined that it is similar to a parallel port with the exception that
>>the data bus is bi-directional. There are only a handful of LSttl chips
>>(74LS245, 74LS244, 74LS86, 74LS74, 74LS174 and a 16?? pal) and one PAL
>>on the board so it can't be doing too much. The address range of the
>>card is four bytes (I think) and they are mirrored in the next four
>>bytes since address line A2 isn't connected on the card edge. The A0
>>and A1 lines are connected, as well as A3 through A9. Nothing above
>>that along with ~iow and ~ior only being used from the ISA bus. IRQs
>>3,4,5,10,11,12 are connected and are jumper selectable. The connector
>>attached to the cardis a high density 25 pin Dsub style. In the scanner
>>unit the LSI thatis connected to the interface (normal 25 Dsub on the
>>scanner side) is a Plustek 92001. I am going to do some more hardware
>>debugging to see what the card does when I have some time.
>>
>>Is this information useful to anyone? The scanner is a paperweight to
>>me unless I can use it under Linux since I stay away from that other
>>operating system for intel platforms. Even so, the drivers available
>>for Win95/98 aren't very good. My dad gave me the unit when he was done
>>using it under Win98 for that reason. It's rather well made though and
>>could be useful attached to my print server.
>>
>>
>
>the description is more or less useless, because you need to know how this
>ASIC works. I think its a predecessor of the 96001 ASIC, which is used in
>later Plustek parallelport scanner and supported by the plustek_pp backend.
>As this ASIC if pretty old, I don't have any technical documentation on that.
>
>Ciao,
>Gerhard
>
>
>
Well,
I got the beast to talk to me. After some debugging under dosemu, I
came up with some init command strings and some more data on what
happens when a scan is initiated and terminated. The latter I am still
processing. So far, commands are sent and received at location 0x271,
scan data is received at location 0x270 and interrrupt is acknowledged
at location 0x273. I couldn't find any access to location 0x272 so
far. 2544 bytes are received during a scan and then an interrupt is
generated. The dos driver seems to indicate that it is emulating an HP
scanjet 1200. The following text represents a cold initialization of
the unit followed by placing the date and time on the front panel LCD
(16x2 ) display. After this process, the keys on the unit function and
produce scan codes available at 0x271. There is no interrupt generated
when a key is pressed so polling must be used to detect a pressed key.
// Initialize unit
271 < 0 // Write to unit
// Need to wait a while here
271 < 1b // Write to unit
271 > 81 // unit busy
271 > 80 // unit ready
271 < 56 // Write to unit
271 < 0
271 > d2 // Read from unit, not sure what this code is
271 > d2
271 < 0// Write to unit
271 > d2
271 < 0 // Write to unit
... //check to see if we are still busy or d2 code output??
271 < 0 // Write to unit
271 < 1b // Write to unit, check if busy in between these.
271 < 43 // Write to unit
271 < 5a // Write to unit
271 < 0 // Write to unit
271 < 1b // Load scanfx.exe utility into memory 1b 54 writes to LCD
display on front panel.
271 < 54 // 1b 4d is the next line on the display. Status is checked
between writes.
271 < 30 // The date and time are written to the display here. The
first two bytes are commands, the rest are ascii.
271 < 32 // The rest of the "gibberish" below is doing the same as this
set is.
271 < 30
271 < 30
271 < 35
271 < 0
271 < 1b
271 < 54
271 < 31
271 < 30
271 < 31
271 < 2f
271 < 30
271 < 34
271 < 0
271 < 1b
271 < 54
271 < 32
271 < 31
271 < 35
271 < 3a
271 < 33
271 < 31
271 < 0
271 < 1b
271 < 54
271 < 33
271 < 35
271 < 32
271 < 0
271 < 1b
271 < 4d
271 < 32
271 < 20
271 < 20
271 < 20
271 < 20
271 < 20
271 < 20
271 < 20
271 < 20
271 < 0
271 < 1b
271 < 4d
271 < 33
271 < 20
271 < 20
271 < 20
271 < 20
271 < 20
271 < 20
271 < 20
271 < 20
271 < 0
I tried these out by exercising the port and found that things work the
same as the dos driver and the scanfx.exe utility, at least for
initialization. When I have more time I will see what else I can find
out. Thanks for your response by the way, I hope that I'm doing
something useful here. I took a look at the code for the mustek scanner
with a proprietary card but couldn't find anything out from that about
how to create a back end for this thing. I will look at it again though.
Take Care,
Fred