Yahoo Groups archive

68300

Index last updated: 2026-04-29 00:01 UTC

Thread

32 bit timer on TPU on 68376

32 bit timer on TPU on 68376

2003-12-03 by aage@powerup.com.au

Hello List,

I am trying to write a 32 bit timer routine in TPU microcode for the TPU 
in a 68376.

I seem to be having a timing problem when a match = $0000 (MRL = 1) and the micro instruction 

p:= ert;
ram p -> @LYD_TIMER_B.

For my application I need a high resolution (200nS) and measurements down to .1Hz.

Has anybody been able to implement a 32 bit timer on the TPU to measure frequency.

I would like to hear from somebody who any knowledge on the subject.

Aage Christoffersen
Lydatronic
Brisbane, QLD
Australia

aage@...

 

This message was sent through MyMail http://www.mymail.com.au

Re: [68300] 32 bit timer on TPU on 68376

2003-12-04 by Rod.Niner@gsescales.spx.com

Eric McRae - Electro-Logic Machines, Inc.
511 Root St.,  Port Townsend WA, 98368
Phone/Fax: 360.379.0969, http://www.elmi.com
 wrote a timer32 that we use.

Rod Niner
GSE Scales
42860 Nine Mile Road
Novi, MI 48375-4122
ph: 248.596.3350
rod.niner@...

The information contained in this electronic mail transmission is intended 
by SPX Corporation for the use of the named individual or entity to which 
it is directed and may contain information that is confidential or 
privileged. If you have received this electronic mail transmission in 
error, please delete it from your system without copying or forwarding it, 
and notify the sender of the error by reply email so that the sender's 
address records can be corrected.



<aage@...> 
12/03/2003 06:40 PM
Please respond to
68300@yahoogroups.com


To
<68300@yahoogroups.com>
cc

Subject
[68300] 32 bit timer on TPU on 68376






Hello List,

I am trying to write a 32 bit timer routine in TPU microcode for the TPU 
in a 68376.

I seem to be having a timing problem when a match = $0000 (MRL = 1) and 
the micro instruction 

p:= ert;
ram p -> @LYD_TIMER_B.

For my application I need a high resolution (200nS) and measurements down 
to .1Hz.

Has anybody been able to implement a 32 bit timer on the TPU to measure 
frequency.

I would like to hear from somebody who any knowledge on the subject.

Aage Christoffersen
Lydatronic
Brisbane, QLD
Australia

aage@...

 

This message was sent through MyMail http://www.mymail.com.au




---------------------------------------------------
To unsubscribe from this group, send an email to:
68300-unsubscribe@yahoogroups.com

To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 





[Non-text portions of this message have been removed]

RE: [68300] 32 bit timer on TPU on 68376

2003-12-04 by Melear Charles-rdph40

Hello everyone,
 
I don't remember the details all that well but we have a function called PPWA that could be used for a 24 bit counter.  One of the problems was that the result had to be held in two parameter RAM locations.  That is, the Parameter RAM is 16-bits wide and the function needed 24 bits.  The TPU microcode had to do two functions.  One was to count incoming pulses and increment the lower word of the result.  This worked OK.  However, there was a possibility that an edge would come in while the TPU microcode was detecting a "roll over" in the lower word.  When the roll over occurred, the microcode would increment the upper byte.  When an incoming edge occurred while the microcode was trying to detect whether or not a roll over occurred, the algorithm got goofed up and really bizarre results would occur.
 
The moral of this storey so far is that in writing your microcode, you have to be careful on how you handle "roll overs" of the lower part of the result with respect to also handling the incoming signal.  You have to account for the case where the incoming signal creates an edge while the microcode is actually handling the roll over condition.
 
 
Here is something that might help you.  Take two PWM channels.  Run one with an internal clock and the other with an external clock.  Use the output of the first channel to drive the external TPU clock.  This results in a 32 bit counter.  The first 16 bits is associated with the first TPU channel and the second TPU channel contains the upper 16 bits.  
 
Anyway, hope that this might give you some ideas on implementing a 32-bit counter.
 
Charlie
Show quoted textHide quoted text
-----Original Message-----
From: Rod.Niner@... [mailto:Rod.Niner@...]
Sent: Thursday, December 04, 2003 8:42 AM
To: 68300@yahoogroups.com
Subject: Re: [68300] 32 bit timer on TPU on 68376


Eric McRae - Electro-Logic Machines, Inc.
511 Root St.,  Port Townsend WA, 98368
Phone/Fax: 360.379.0969, http://www.elmi.com <http://www.elmi.com> 
wrote a timer32 that we use.

Rod Niner
GSE Scales
42860 Nine Mile Road
Novi, MI 48375-4122
ph: 248.596.3350
rod.niner@...

The information contained in this electronic mail transmission is intended 
by SPX Corporation for the use of the named individual or entity to which 
it is directed and may contain information that is confidential or 
privileged. If you have received this electronic mail transmission in 
error, please delete it from your system without copying or forwarding it, 
and notify the sender of the error by reply email so that the sender's 
address records can be corrected.



<aage@...> 
12/03/2003 06:40 PM
Please respond to
68300@yahoogroups.com


To
<68300@yahoogroups.com>
cc

Subject
[68300] 32 bit timer on TPU on 68376






Hello List,

I am trying to write a 32 bit timer routine in TPU microcode for the TPU 
in a 68376.

I seem to be having a timing problem when a match = $0000 (MRL = 1) and 
the micro instruction 

p:= ert;
ram p -> @LYD_TIMER_B.

For my application I need a high resolution (200nS) and measurements down 
to .1Hz.

Has anybody been able to implement a 32 bit timer on the TPU to measure 
frequency.

I would like to hear from somebody who any knowledge on the subject.

Aage Christoffersen
Lydatronic
Brisbane, QLD
Australia

aage@...



This message was sent through MyMail http://www.mymail.com.au <http://www.mymail.com.au> 




---------------------------------------------------
To unsubscribe from this group, send an email to:
68300-unsubscribe@yahoogroups.com

To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu <http://www.motorola.com/mcu> 



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ <http://docs.yahoo.com/info/terms/>  





[Non-text portions of this message have been removed]



Yahoo! Groups Sponsor	

ADVERTISEMENT
 <http://rd.yahoo.com/SIG=12c2fomtq/M=267637.4116732.5333197.1261774/D=egroupweb/S=1706554205:HM/EXP=1070635361/A=1853618/R=0/*http://www.netflix.com/Default?mqso=60178338&partid=4116732> click here	
  <http://us.adserver.yahoo.com/l?M=267637.4116732.5333197.1261774/D=egroupmail/S=:HM/A=1853618/rand=660104781> 	

---------------------------------------------------
To unsubscribe from this group, send an email to:
68300-unsubscribe@yahoogroups.com

To learn more about Motorola Microcontrollers, please visit
http://www.motorola.com/mcu <http://www.motorola.com/mcu> 



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]

Re: [68300] 32 bit timer on TPU on 68376

2003-12-05 by Ray Pimm

I've written several 32-bit timer/counter TPU microcode routines for 
various applications. TPU microcode can get a bit tricky, as Charlie's post 
illustrates.

You need to have a very clear understanding of the TPU operation to get the 
coherent update correct, and to maintain timing accuracy under all conditions.

One approach is to hook together standard TPU functions as Charlie 
suggests. The advantage is that the functions are well documented and 
mature. But you may not be able to get the exact function and performance 
that you want with this approach. And there is always the possibility of 
some undocumented side effect occurring.

Writing your own TPU function is not easy, but you get exactly what you 
need, providing you know what you are doing of course. Unfortunately the 
available TPU microcoding documentation is patchy, and doesn't deal all 
that well with some very low level details of pin timing needed to avoid 
scenarios such as Charlie described. I spent many hours several years ago 
paining over low level timing details such as this when designing a 
particular routine for a client.

Ask Charlie for a copy of the Verilog code if you really want to understand 
the TPU pin timing.

Regards - Ray Pimm

At 11:40 PM 3/12/2003 +0000, you wrote:
Show quoted textHide quoted text
>Hello List,
>
>I am trying to write a 32 bit timer routine in TPU microcode for the TPU
>in a 68376.
>
>I seem to be having a timing problem when a match = $0000 (MRL = 1) and 
>the micro instruction
>
>p:= ert;
>ram p -> @LYD_TIMER_B.
>
>For my application I need a high resolution (200nS) and measurements down 
>to .1Hz.
>
>Has anybody been able to implement a 32 bit timer on the TPU to measure 
>frequency.
>
>I would like to hear from somebody who any knowledge on the subject.
>
>Aage Christoffersen
>Lydatronic
>Brisbane, QLD
>Australia
>
>aage@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.