Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Timer troubles (avr)

bloody-orc

New Member
Hi there. i'm trying to control a sonar with my AVR tiny2313. for this i need to mesure a time taken from one given point (after sending out bursts of sound) to echo what is high signal on an input of AVR.
i'm programming in C and i just cant find any tutorials on how to do this. only asm tutorials...

thank you in advance
Rain
 
thats the point. i cant start the timer and stop it. i just dont know the commands :$
 
Look on bastoc.com, there are tutorials there and I think there is a avr timer
sample in RVKBASIC, you can download rvkbasic, type the couple lines of code (timer related), compile it and look at the .ASM for the commands.
 
i dont want neither basic nor asm file cause i cant read them.

i have the manual, but it does not give any examples in C (well actually all the C examples are exactly the same and wrong). i'l go and have a look in the data again to see, wich bits to set 1 and 0 then.
thanks for your help.
 

Latest threads

Back
Top