Subject:
|
Re: random dodgy sensor readings?
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Mon, 29 Dec 1997 13:27:55 GMT
|
Original-From:
|
Mike Vande Weghe <VANDEWEG@PARLANCE-NCSavoidspam.COM>
|
Viewed:
|
1248 times
|
| |
| |
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
|
|
Message has 1 Reply: | | Re: random dodgy sensor readings?
|
| In article <34A7A55B.9E3A63BA@p...-ncs.com>, Mike Vande Weghe <vandeweg@parlance-ncs.com> writes (...) 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 (...) (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
|
|
|
|