LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait with microsecond resolution

Solved!
Go to solution

Hi,

 

I am currently using the LabVIEW Embedded Module for ARM Microcontroller to implement a custom bit-banging protocol so that my LM3S8962 board can communicate with an audio module. However, I have run into a part of the protocol where the program must pause for 100 microseconds (100 us, or 0.1 ms) before continuing. Is there any function that will allow my program to wait for this amount of time? I don't think waiting for 1 ms, the minimum time possible with the normal Wait function, will work.

 

Thanks in advance,

Dylan 

0 Kudos
Message 1 of 4
(8,808 Views)
Solution
Accepted by topic author dylpkls91

Dylan,

 

          There is a 12 MHz clock on the ARM evaluation board but we only have access to the millisecond timer. I have seen some really hacky attempts to get microsecond timing but it is unreliable. We are looking at making it available in the future. After discussing your application with you, I think that trying the millisecond timer instead might work. Let us know if we can help get your C application running with your Audio Module. Thanks! 

Message 2 of 4
(8,791 Views)

Hi Dylan,

 

Use the C-Node and implement in this node one of the following statements directly in "C":

1. Look for a delay() function that is offered by the underlying KEIL toolchain library. We did this with the

    blackfin, meaning, we directly called a kernel function offering resolution in "Ticks".

2. Use the more "experimental" approach and place a "C" for-loop (maybe 10'000 times) doing

    "nothing" into the C-Node. This approach requires an oscilloscope to measure this timing and

     you modify the number of times the loop executes until you get to the desired 100 micros.

 

Hope this helps
Marco

0 Kudos
Message 3 of 4
(7,893 Views)

I make a microsecond Wait code with the ARM tickcount VI. You can place a while loop under the loop who will wait. In the inside loop you place the ARM tickcount and in the outside loop you place a Shift- Register to feedback the tickcount value. If the actual tickcount minus the anterior tickcount is greater then a constant (the time to wait), you finish the inside loop.

 

I didn't do the code for the "Wait the next ms multiple", but I think it is simple too.

 

I think the initial question is because in earlier version of LV for ARM there aren't the ARM tickcount VI.

0 Kudos
Message 4 of 4
(7,815 Views)