Search the web
Sign In
New User? Sign Up
68HC12
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
RE: [68HC12] Problem initialise timer for 1µs cycle   Message List  
Reply | Forward Message #16447 of 16521 |
Hello,

>Because of character problems on the mail I received, I can't see if you
>want
interrupt each micro-second.
>If so, it seems very very fast for that
processor.
I need to increment a variable every micro-sencond. I am implementing an CANopen
stack at the controller. For this I need to increment a variable every
micro-second.
I have written a test programm to test the timer. The timer basically works..
The interrupt works etc. but I do not know how to configure the timer registers
so that I get an interrupt every micro-second.
You can find attached the programm files. Perhaps someone can tell me how to
configure the timer to get an interrupt every micro-second.
Perhaps an additional question. How can I test the Interrupt? I toggle some
LED's every interrupt but I think when using a one micro-second interrupt you
can not see toggling the LED's any more ;).
It is all written in C.
Thank you very much!Best regards


--- folgli@... <folgli@...> schrieb am Fr, 1.5.2009:
I find just this morning your problem about Timer.
Because of character
problems on the mail I received, I can't see if you
want interrupt each
micro-second...
If so, it seems very very fast for that
processor.

With 12 Mhz quartz, no PLL, I use an empty function (in C) to
delay 2.5
micro-seconds :

void Delay_2_5_micro (void)
{ //
nothing to do
}

That means just call and return from this empty
function take 2.5
micro-seconds, measured with oscilloscope.

Hope this
helps.

Joel


Von: folgli@... <folgli@...>
Betreff: [68HC12] Problem initialise timer for 1µs cycle
An: 68hc12@yahoogroups.com
Datum: Freitag, 1. Mai 2009, 13:56

Hello,

I have a problem with using the Timer on a MC9S12DP512. I want to create 1µ
second cycles. Every µs I want to increment a variable, but I do not know how to
initialise the timer, so that I get a timer interrupt every µs.
I hope that someone can help me.
Best regards






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




Mon May 18, 2009 12:38 pm

folgli
Offline Offline
Send Email Send Email

Forward
Message #16447 of 16521 |
Expand Messages Author Sort by Date

Hello, ... interrupt each micro-second. ... processor. I need to increment a variable every micro-sencond. I am implementing an CANopen stack at the...
Sven K
folgli
Offline Send Email
May 18, 2009
12:38 pm

Hi, As I told you in my precedent mail, I think you can't increment a character each micro-second. The reason is this delay is too short for that processor. As...
jpdi
dieseinfo
Offline Send Email
May 18, 2009
3:09 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help