To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 3111
3110  |  3112
Subject: 
Re: random dodgy sensor readings?
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Mon, 29 Dec 1997 18:16:48 GMT
Original-From: 
Ian Bagley <ian@bagley&StopSpam&.demon.co.uk>
Viewed: 
1253 times
  
In article <34A7A55B.9E3A63BA@parlance-ncs.com>, Mike Vande Weghe
<vandeweg@parlance-ncs.com> writes
About 2 weeks ago Bill Bynum sent in a fix for a bug that one of his
students had discovered.  The student was using multiple processes to
read analog values, and noticed spurious readings.  The problem caused
by IC making context switches after the A/D channel had been selected,
but before the reading had been taken.  The student's fix was to wrap a
pair of "hog_processor()" and "defer()" commands around the sensitive
code.  The student did this in the analog() function in lib_hb.c, but it
seems like an even better place would be within the raw_analog()
function, since that would also protect any calls you might be making
to  knob().

If you are using multiple processes to read your analog() values, this
might be the problem.

- Mike

Thanks,

I'm not using multiple processes, however i am using the servo routines,
perhaps this has a similar effect? I will try putting in the hog and
defer pair and let you know what the results are.

See you later!

  ___  IAN
|   |__   _______ ______ ___     ______ ___  ___
|   _   \|   _   |   ___|   |   | _____|\  \/  /
|  |_ )  |   _   |  |_---   |___| ____|  |    |
|________|__| |__|____   |______|______| |____|
WWW.BAGLEY.DEMON.CO.UK|__|IAN@BAGLEY.DEMON.CO.UK



Message is in Reply To:
  Re: random dodgy sensor readings?
 
About 2 weeks ago Bill Bynum sent in a fix for a bug that one of his students had discovered. The student was using multiple processes to read analog values, and noticed spurious readings. The problem caused by IC making context switches after the (...) (27 years ago, 29-Dec-97, to lugnet.robotics.handyboard)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR