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 / 4496
4495  |  4497
Subject: 
Improving the analog drivers
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Mon, 12 Oct 1998 17:50:28 GMT
Original-From: 
Jaron Paludanus <jaron@SPAMCAKEcybercomm.nl>
Viewed: 
1046 times
  
Hoi,

I have been playing around with the Chuck McManis (Thanks!) code for the
HandyBoard. Everything compiled quite easily on my COSMIC compiler. (Isn't
there a small bug in the LCD driver, I had to remove an = sign). I have
(almost?) finished a more detailed port in which I re-placed the compiler
specific options and settings with the ones needed for COSMIC. I also
changed most integers to characters to save some cycles.

I use two shaft encoders to measure wheel velocity. I created a simple shaft
encoding routine which work fine but implement the 32 cycle wait before
accessing the appropriate result registers. Since this routine runs 1000 Hz
for 2 encoders this implies a waste of 32 * 2 * 1000 = 64000 cycles.

Reading the pink book (chapter 12 page 14) I found the continues scan mode.
Wouldn't it be much faster to use this for the shaft encoding routines? I
will lose the 64000 cycle wait since the registers can then be expected to
carry the most recent value. The cost is that there are only 4 analog inputs
continuously read but while moving the robot it won't use more anyway. By
carefully arranging the sensors it will not be a problem. Otherwise I might
just write an interrupt-routine to change the scanned registers every so
often and store the results in 8 variables representing the analog ports.

Has anybody experiences with this (continues scanning mode)? Is somebody
good in quickly estimating the amount of cycles needed for one or both
option(s) and say if the idea is crap?

If there is an interest in the ported (or other) code let me know...

Groetjes, Jaron Paludanus



1 Message 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