Transmitting current time stamp  along with data to display by using lab view

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Dear all,

   

I am using  CY8CKIT-059lp kit .  I am transmitting data through UART . I want to add current time stamp along with my data in microsecond resolution. So that, at the receiver data end I can save both data and corresponding time in txt or excel format and can plot the graph using LAB View. kindly help to write the code.

   

 

   

Thanks

   

Chandan

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You will need a simple timer with µs resolution which you read out, what is the problem exactly? To get your timing precise enough you will need an xtal time base.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Dear sir,

   

 

   

Please find the attached bundle. In this program, isr_2 is not getting interrupted but isr_1 getting interrupted when it crossing the threshold. In the same way, I have given comparator output to counter to capture event time on rising edge. Please look the code. I am having the problem with capture count. when I am debugging, it is not going to CY_ISR(counterInterrupt) .

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Two things at first glimpse:

   

In your main loop you are constantly re-enabling an already enabled interrupt which results in disabled interrupts most of the time.

   

Your interrupt handler T_crossing_ISR consumes a very long time during which no other interrupt can fire. I would suggest to just set a flag in the handler which is tested in the main-loop and acted on.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Dear sir,

   

Thanks for your kind help. 

0 Likes