Society of Robots - Robot Forum

Software => Software => Topic started by: dannytemmerman on April 25, 2009, 08:01:03 AM

Title: timer commands ATmega8
Post by: dannytemmerman on April 25, 2009, 08:01:03 AM
Can somebody say me what the commands are o the timers on the 50$ robot?
I already have read the file timer.h, but I still don't understand how it works.
I ave already red the tutorial on timers on the site. But I don't now what I need to write down as code in a program for the timers to start, stop and read.
I think that this blog will be good for newbies and beginners who has the same problem.
So please can someone give a good answer  that anyone can understand.


Thanks
Title: Re: timer commands ATmega8
Post by: HDL_CinC_Dragon on April 25, 2009, 10:52:04 AM
This is what you need:
http://members.shaw.ca/climber/avrinterrupts.html (http://members.shaw.ca/climber/avrinterrupts.html)

Read it. Its not as long as it looks.
Title: Re: timer commands ATmega8
Post by: dannytemmerman on April 25, 2009, 11:53:52 AM
This is what you need:
http://members.shaw.ca/climber/avrinterrupts.html (http://members.shaw.ca/climber/avrinterrupts.html)

Read it. Its not as long as it looks.

This is about interrups.
I need code that explains how to set a timer on ATmega8 and how it read the value after a period of time.
By example if you want to now how long a signal is you use a timer and read it when the signal is done.
Title: Re: timer commands ATmega8
Post by: HDL_CinC_Dragon on April 27, 2009, 01:30:16 PM
If you read that page you would know that it is exactly what you need to read.