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.

I need to measure nanoseconds with a PIC

Status
Not open for further replies.
The total time after say 1000 back/forth cycles will be a total of all the fixed times and 2000 variable transit times
Agreed; but how will you know without detecting each B signal that, after sending 1000 signals, the received B signal is the 1000th one and not, say, the 998th one? I was assuming the signals were simple pulses, so in answer to my own question I think it would be necessary to encode each transmitted signal with an index number to distinguish it from others.
 
Hi Alec, I assume you would send each pulse or packet, then receive the confirmation pulse or packet. Then count +1 and repeat.

I don't think you would need a number on each packet, as the whole process of 1000 send/received takes a few mS and performs as one basic sequential process.
 
Hi Alec, I assume you would send each pulse or packet, then receive the confirmation pulse or packet. Then count +1 and repeat.
In other words you have to detect each B signal (confirmation packet). That's the point I was making.
 
Mods, can you please move shom-show's post #24 to make it a new thread?
 
Myself Sumanta, facing problem in measuring time in (1 -100) nanoseconds. From the data sheets it is obvious that PIC18f has resolution time of 5.2 ns for CAPTURE and

83.3 ns for COMPARE modules. PIC24f has the CTMU facility inbuilt. So which Microcontroller and software will be the best for to implement the measurement of time in

nanoseconds. Please forward me any sample programs or any documents if anyone have to attack the problem. Waiting for all of your response.


Sumanta

Indian Institute Of Technology Kharagpur

India
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top