[sane-devel] how to fill values in Genesys_Frontend structure from usb log?

Parag N(पराग़) panemade at gmail.com
Wed Dec 28 13:16:52 UTC 2005


Hello,

On 12/27/05, Pierre Willenbrock <pierre at pirsoft.dnsalias.org> wrote:
> Parag N(पराग़) schrieb:
> >       I have usb log captured on windows just after powering up
> > scanner HP 2400. I am checking Genesys_Frontend,Genesys_Motor
> > structure values in genesys_devices.c. I want to know how to calculate
> > values for Genesys_Frontend structure. Also how to calculate maximum
> > start speed ,maximum end speed of scanner motor?
>
> I assume you can already interpret register reads/writes.
>
> Genesys_Frontend contains the setting of the analog frontend:
>   AFE   |Genesys_Frontend
> Register|    member
> --------+----------------
> 0x00    |.reg[0]
> 0x01    |.reg[1]
> 0x02    |.reg[2]
> 0x03    |.reg[3]
> 0x04    |(reset)
> 0x06    |.reg2[0]
> 0x08    |.reg2[1]
> 0x09    |.reg2[2]
> 0x20    |.offset[0]
> 0x21    |.offset[1]
> 0x22    |.offset[2]
> 0x24    |.sign[0]
> 0x25    |.sign[1]
> 0x26    |.sign[2]
> 0x28    |.gain[0]
> 0x29    |.gain[1]
> 0x2a    |.gain[2]
>
 does that mean i have to fill Genesys_Frontend like this with
replacing values of registers mentioned above
 {{0x00, 0x31, 0x1f, 0x13}
   , {0x08, 0x02, 0x16}
   , {0x20, 0x80, 0x10}
   , {0x80, 0x00, 0x00}
   , {0x01, 0xff, 0x00}
   }

> AFE Registers a written by setting register FEWDA(0x50) to the register
> number and then writing to registers FEWRDATA(0x3a,0x3b), so you will
> see these three register writes repeat in your log(Register numbers for
> gl646).
>
 But i am getting 0x51,0x3a,0x3b as repetitive registers in my linux
debug log in gl646_bulk_write_register function.
???
> Genesys_Motor is not used in the gl646 part, but we want to move over to
> parametrized slope generation not depending on hard-coded settings.
>
> Each Genesys_Motor_Slope contains a slope description for a specific
> stepping mode. The described slope should lead to the fastest final
> speed possible.
>
> The needed numbers can be directly derived from the slope tables(bulk
> writes of maximum 256/512 bytes, to be interpreted as usigned short.
> Each entry is the time between the corresponding steps). Take the
> maximum starting speed you can find, and the maximum ending
> speed(minimum value).
>
> The motor can be actuated in different step modes, so there will be
> slope tables using half steps and tables using full steps. Half step
> tables will contain values half as large as full step tables. Currently
> the values in Genesys_Motor are the time for a full step, even if used
> for half step mode. They will be devided accordingly.
>
> The 'g' entry can be set to 1, resulting in a linear acceleration.
>
> I see that 'minimum_steps' is misleading, it contains the number of
> steps used for the slope, which is more of an upper limit for the number
> of steps.
>
> In Genesys_Motor the 'base_ydpi' member is the motor resolution for full
> step mode. 'optical_ydpi' is the maximum stepping resolution possible.
> 'max_step_type' is the smallest step type: 0->full step, 1->half step,
> 2->quarter step. Actually there is redundant information here, as
> optical_ydpi=base_ydpi*2^max_step_type
>

 > If you got your scanner to work and you are not afraid to damage it, you
> can try to finetune the acceleration slopes. I could speed them up for
> my scanner. But that will only improve low quality scan time and head
> moving home time.
>
> Regards,
>   Pierre
>
> --
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> Unsubscribe: Send mail with subject "unsubscribe your_password"
>              to sane-devel-request at lists.alioth.debian.org
>


More information about the sane-devel mailing list