Ok, Willy Robion's alternative USB timing is available with release 2.4p1

Use --altUSB (note the spellling) in the command line. That's
double-dash altUSB.

I see no difference, but perhaps others will note better or worse
results. Please give feedback.

Paul Alfille

On 6/7/06, Paul Alfille <[EMAIL PROTECTED]> wrote:
> As you noted, all the USB specific code is on module/owlib/src/c/ow_ds9490.c
>
>  Look at function (line 257):
>  static int DS9490_setup_adapter(const struct parsedname * pn) {
>
>  Here is what Willy Robison suggested:
>    I pourchased the weather station parts from AAG, and had
>  a problem with everything under linux recgonizing all of
>  the chips in the weather station.  AAG indicated that
>  the latest drivers from Dallas/Maxim addressed the problem.
>  There was a terse reference to changing the slew rate
>  to 1.37V/uS.
>
>    Referrinhg to the DS2490 datasheet, the mode commands
>  to set various parameters are listed.  It seems that the default
>  values for the 3 settings were not quite optimal...
>
>    I've reworked the code fragment to match the style in
>  ow_ds9490.c, but I don't have the calls to the routine in
>  the correct locations at this point...
>
>    I'll try to send some more information as I stumble on to
>  a solution.
>
>    To complicate things, I suspect that the timing requirements
>  are dependant on the topology of the 1-wire bus , so a working
>  solution may require that the parameters be set from the command
>  line.
>
>  --- xxx ---
>  DS9490_BusParm( int slewrate,
>                  int low_time,
>                  int ds0_low,
>                  const struct parsedname * pn ) {
>      int Value;
>      int Index;
>      int ret[3];
>  /*
>   *      Slew Rate
>   */
>      Value = MOD_PULLDOWN_SLEWRATE;
>      if(slewrate<0)
>           Index = PARMSET_Slew1p37Vus;
>      else
>           Index = slewrate;
>      if((ret[0] = usb_control_msg(pn->in->connin.usb.usb,
>                                  0x40,                           //
> RequestType
>                                  MODE_CMD,                       // Request
>                                  Value,                          // Value
>                                  Index,                          // Index
>                                  NULL,                           //
>                                  0,                              // Length
>                                  TIMEOUT_USB )) < 0)
>           LEVEL_DATA("DS9490_BusParm: Error MOD_PULLDOWN_SLEWRATE\n") ;
>
>  /*
>   *      LowTime
>   */
>      Value = MOD_WRITE1_LOWTIME;
>      if(low_time<0)
>           Index = PARMSET_W1L_10us;
>      else
>           Index = low_time;
>      if((ret[1] = usb_control_msg(pn->in->connin.usb.usb,
>                                  0x40,                           //
> RequestType
>                                  MODE_CMD,                       // Request
>                                  Value,                          // Value
>                                  Index,                          // Index
>                                  NULL,                           //
>                                  0,                              // Length
>                                  TIMEOUT_USB )) < 0)
>           LEVEL_DATA("DS9490_BusParm: Error MOD_WRITE1_LOWTIME\n") ;
>
>  /*
>   *      DS0 Low
>   */
>      Value = MOD_DSOW0_TREC;
>      if(ds0_low<0)
>           Index = PARMSET_DS0_W0R_8us;
>      else
>           Index = ds0_low;
>      if((ret[2] = usb_control_msg(pn->in->connin.usb.usb,
>                                  0x40,                           //
> RequestType
>                                  MODE_CMD,                       // Request
>                                  Value,                          // Value
>                                  Index,                          // Index
>                                  NULL,                           //
>                                  0,                              // Length
>                                  TIMEOUT_USB )) < 0)
>           LEVEL_DATA("DS9490_BusParm: Error MOD_DSOW0_TREC\n") ;
>      if(ret[0])  return ret[0];
>      if(ret[1])  return ret[1];
>      if(ret[2])  return ret[2];
>      return 0;
>
>      }
>
>
> On 6/7/06, Michael Weber <[EMAIL PROTECTED]> wrote:
> > On Wed, 7 Jun 2006, Jan Kandziora wrote:
> >
> > > Am Mittwoch, 7. Juni 2006 21:44 schrieb Paul Alfille:
> > >> Actually, I have some alternative timing settings suggested by William
> > >> Robison that we could try.
> > >>
> > >> It's been hard to justify changing anything until we had test networks
> that
> > >> could be compared.
> > >>
> > >> I'll add it in, at least temporarily, add a command line flag, and
> package
> > >> it up.
> > >>
> > >> In the long run there are 3 cases:
> > >> 1. Old time best
> > >> 2. New timking best
> > >> 3. Varies by network.
> > >>
> > > Oh, there's actually another tweak Michael could try: Maxim supposes to
> add an
> > > RC circuit for medium length busses. Michael, see App. D of
> > >
> > > http://pdfserv.maxim-ic.com/en/an/AN148.pdf
> > >
> > > The whole document would be interesting to you, I think.
> > >
> > > Kind regards
> > >
> > >       Jan
> >
> > Thanks for the suggestions.
> >
> > We are actually implementing the filter, but since the network is in a
> > slightly remote location (an observatory on Tenrife, where I only go to
> > fix problems) I was looking for a solution I could try remotely.
> >
> > The network is indeed a mixed topology, it consists of 2 Hubs, about 5-10m
> > apart from each other (and the master). We splitted it up (it was a bit
> > more complicated before) but that did not improve matters. Nor did using
> > USB instead of rs232.
> >
> > I will try the filter (I also take an oscilloscope to measure timings and
> > voltages) next week, but I would still like to play around with timings
> > (Maxim says something about 5us pulldown time for the 5Volts, which should
> > be tuned by the timing setting.
> >
> > Any suggestions to where I could insert some timing related changes in the
> > source code? Preferably changeable at runtime, but thats not really
> > important.
> >
> > Thanks again,
> >
> > Michael
> >
> >
> >
> > _______________________________________________
> > Owfs-developers mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
> >
>
>


_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to