Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Information regarding the Implementation of a Logic in a Microcontroller

Status
Not open for further replies.

shom_show

Member level 1
Joined
Feb 28, 2012
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,621
Hi to all,

Myself Sumanta Kumar Show is facing a problem regarding the implementation of a logic which we want to implement in the Micro-controller. It is

as follows -

Suppose I have two ports name PORT1 and PORT2. Now the ports status will change by the following way:-


PORT1 PORT2 COMMENT

5 V or Logic1 5 V or Logic1 Initial condition

0 V or Logic0 5 V or Logic1 Timer Start

0 V or Logic0 0 V or Logic0 Timer Stop


Now the time gap between timer start and timer stop will be in nano-second range. I want to display this time delay on a display device. This will be

done one time. It will not be done in a continuous manner. If need another experiment will perform manually by pressing power on/off switch or pressing

reset button. Please send me your valuable suggestion (any device that makes it easy to attain the objective).

Thanks in advance.


Email Id - (show.sumanta@rediffmail.com / sumanta.show@gmail.com)

Mobile No.- (9932582375)
 

shom_show said:
Now the time gap between timer start and timer stop will be in nano-second range.
Could you please be more specific? 999ns is one thing and 1ns is another. For 1ns we are talking about 1GHz! What MCU are you using and in what frequency?


shom_show said:
I want to display this time delay on a display device. This will be

done one time. It will not be done in a continuous manner. If need another experiment will perform manually by pressing power on/off switch or pressing

reset button.
OK, understood. But what does this have to do with PORT1 and PORT2 mentioned in the beginning of the post? What is your plan on measuring time manually? You have a timer for this purpose. This is what timers are meant to do, that is measure time. :smile:
You set a timer to let's say 1ms and you get 1ms. What more measurement is needed besides that?


Alexandros
 

Could you please be more specific? 999ns is one thing and 1ns is another. For 1ns we are talking about 1GHz! What MCU are you using and in what frequency?

Hi,

Thanks for the response. I like to let you know that we want to measure the time in the range of (1-100) nanoseconds. The MCU I am currently using is ATMEGA32L which

has an operating frequency of (0 - 8)MHz.

OK, understood. But what does this have to do with PORT1 and PORT2 mentioned in the beginning of the post? What is your plan on measuring time manually? You have a timer for this purpose. This is what timers are meant to do, that is measure time. :smile:
You set a timer to let's say 1ms and you get 1ms. What more measurement is needed besides that?


Alexandros

Actually the time should be measured between the occurrence of two events. The two ports are used two connect two 5 volts supply in order to have logic HIGH as the

input in those ports. Now after a certain intervals of time when those two power supplies are disconnected making logic LOW to be available in those ports, the timer should

measure the time in the range (1-100)nanoseconds and it would be able to display that time in a LCD display device.

Please have your suggestions regarding the problem.
 

shom_show said:
measure the time in the range (1-100)nanoseconds
Generally you can use external interrupts and measure the time between input changes with a timer.
But still the question remains. What MCU are you using and in what frequency?
 

Hi,

Thanks for the response. As I have told earlier, the MCU which I am currently using is ATMEGA32L and it can operate in the frequency of (0-8)MHz. Hoping to get your reply.
 

As I have told earlier, the MCU which I am currently using is ATMEGA32L
Yes, you have hidden the information in quoted text.

An ATmega has no means to measure time intervals with ns resolution. PIC24 and some PIC18 processors have an analog CMTU (charge time measurement unit), that converts time intervals to analog voltages. It basically manages the intended time interval range.
 

Do you have any sample programs or documents which I can follow for time measurement in nanoseconds? If it is possible please send it in my Email -(sumanta.show@gmail.com).

Hoping to have your reply.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top