DPRG
DPRG List  



[DPRG] DPRG ORG 08 Photos

Subject: [DPRG] DPRG ORG 08 Photos
From: Randy M. Dumse rmd at newmicros.com
Date: Sat May 17 11:01:42 CDT 2008

David said: Thursday, May 15, 2008 10:13 AM
> CPU32 core and the TPU co-processor.  Once it is initialized, 
> reading and resetting the encoder is just a matter of reading 
> and zeroing a memory location.
> 
> One problem with this function is that the encoders on jBot's 
> Pittman motors generate 2000 counts per revolution for each 
> motor, and that rate is too high for the FQD function when 
> jBot is running at top speed.

One of my professional short comings is I was never able to get
into the 68332 TPU. 

I looked up (Googled) FQD (fast quadrature decode) to see what
you were saying here. 

I also found this comment on the web: "When a pair of QDEC
channels are being used and no other TPU channels are active,
the minimum time between count edges on the two channels is 42
CPU clock cycles. This is equivalent to a count rate of
approximately 400,000 counts per second with a system clock
speed of 16.78 MHz, or a count rate of approximately 500,000
counts per second with a system clock speed of 20.97 MHz."

So I'm curious about some of the technical details, and am
comparing how convenient the TPU is compared to the built-in
features on the 56F80x series as I know them on our 'bot, which
is really effortless to use.

You must have to make the switch over from quadrature to two
quadrant somewhere around 1000 rpm? (half the way to too fast?)
How did you sense that? 

How do you measure speed, does that come out of the TPU as well?

When you say you read and reset a counter, is there the
potential to loose a count that comes in during the reseting? Or
is it protected from count loss in hardware?

It looked like all the count registers in the TPU were 16-bits,
is that correct? Did you extend them to 24 or 32 in software
external memory locations?

The 56F805 in the IsoPod(TM) has two 32-bit quadrature built in.
It has a hold register so if you read half a reading, it
captures all the other readings so they have the value you got
when you read the first half. It also has a differencing
register, so your velocity is held in a register as well. And
since it's hardware, it's good up to 40MHz count rate with no
software intervention.

On our Tripod entry, we used a PlugaPod(TM) which is a 56F803,
and has only one hardware quadrature channel, so instead, we
switched and used four identical timers (rather than one quad
channel of hardware and one of timers) configured for quadrature
and 32 bit operation. That gave us most of the same features,
except we had to difference our velocity in software by
subtracting the previous reading from the current one. If anyone
is curious code for initialization and operation of our
quadrature follows:

: INIT_QUAD
  TA0 QUADRATURE 
  TA0 RESET
  TA2 QUADRATURE 
  TA2 RESET     
; EEWORD

: READ_QUAD
  CHL                                    ( CHANNEL LEFT
  CUR_POS 2@ PRV_POS 2!                  ( COPY OLD VALUE
  TA0 POSITION DNEGATE CUR_POS 2!        ( GET NEW VALUE
  CUR_POS 2@ PRV_POS 2@ D- D>S ACT_VEL ! ( ACTUAL VELOCITY

  CHR                                    ( CHANNEL RIGHT 
  CUR_POS 2@ PRV_POS 2!
  TA2 POSITION DNEGATE CUR_POS 2!
  CUR_POS 2@ PRV_POS 2@ D- D>S ACT_VEL !
; EEWORD


Randy


More information about the DPRG mailing list

Copyright © 1984 - 2006 Dallas Personal Robotics Group. All rights reserved.
Website Design by NCC

For the latest robot news visit robots.net