Author Topic: Need Help Atmega8 timer / Start-Stop on event  (Read 1147 times)

0 Members and 1 Guest are viewing this topic.

Offline mzdenkovTopic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: hr
Need Help Atmega8 timer / Start-Stop on event
« on: July 21, 2016, 07:48:12 pm »
Greetings.

I need help in:

Case:

Micro: Atmega 8
Timer event source: TDC1011

I need to start and timer on Event.
Event is change of state on External Pin.

So:

>---START--- [----------------]
                    [                     ]
from TDC      [  OR  GATE    ]------------AVR PINx------>
                    [                     ]
>---STOP-----[----------------]

<--TRIGGER-------------------------------AVR PINx---------
<--RETART--------------------------------AVR PINx----------
<--ENABLE--------------------------------AVR PINx---------



Im using TDC1011 to measure water level in glass.
TDC sends START bit at the begging of measure(here we start the timer) [it sends the ultrasonic signal], when TDC recieves the ultrasonic signal it sends STOP bit(here we stop the timer).

As im new in Timer capture mode, i need help (this is for my collage diploma project).

Best Regards.
Thanks.

« Last Edit: July 21, 2016, 08:53:58 pm by mzdenkov »
To Solder or not to solder, that is the question!
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Need Help Atmega8 timer / Start-Stop on event
« Reply #1 on: July 21, 2016, 11:00:17 pm »
Have you read the data sheet? There are countless ways of doing it.
================================
https://dannyelectronics.wordpress.com/
 

Offline mzdenkovTopic starter

  • Regular Contributor
  • *
  • Posts: 82
  • Country: hr
Re: Need Help Atmega8 timer / Start-Stop on event
« Reply #2 on: July 22, 2016, 05:57:10 am »
I did. I understand basic operations with timers, but there is a problem because i mix things between TI(collage lessons) and AVR.
I've read all in Datasheet, but that is not clear enough for me.
To Solder or not to solder, that is the question!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf