Unrepentant Geek (matthew) wrote,
Unrepentant Geek


I spent some time tonight looking at how the registers in this scanner are accessed and modified. I had to delve into the SANE plustek driver to figure out how to deal with the registers as the data was not in the Nat Semi manual. It seems that you build a buffer consisting of commands and data, and send it down the pipe to the scanner. The first 4 bytes of the buffer seem to be the command, with the rest (up to 60 more bytes) being data. byte 1 has 3 meanings (so far)

0: write
1: read
2: increment register?

Byte 2 simply contains the hex for the address that you intend to modify. Bytes 3 and 4 are the length of the data to transfer in or out. 3 is most significant byte, 4 is least. After that comes the data. In a write you send the 4 bytes plus data, repeating as needed til the entire buffer is sent. In a read you send the 4 byte command and then read in data that is sent back.

The next step is to actually code the read/write functions into my driver now that I know how they work.

But first, I must play Mario Kart :)

  • I welcome our new cube overlord

    Posted via LiveJournal app for Android.

  • it begins again...

    Tonight I changed the oil and started in on replacing the seat bushing. looks pretty odd without a tank. Posted via LiveJournal app for Android.

  • Makerbot madness

    I finally took some time to poke at my makerbot again. gordonmessmer and I tried to get it working again in a fairly standard config only…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded