Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 8452 able to measure SPI clock on another DIO line?

This was for troubleshooting, and now just want to see it implemented.  The SPI clock is fed back into DIO7

 

The goal = counting clocks in some VI.  Have a vi with read from port channel, then trying to digitize and display something.  sits at zero.  Has anyone set something like this up?   Either display the clocks or count them.  part of it is learning  the 8452

 

Thanks

0 Kudos
Message 1 of 6
(245 Views)

8452 is not capable of hardware-timed digital input to enable you to measure the clock rate, you can use the DIO to read a static digital level or set a static digital level.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 6
(230 Views)

hi,

All I need is to count how many times the DIO line goes high then low to count pulses, thats all it has to do.  was trying to see about a threshold vi that when it crosses 2v, say from high to low?  then pulse += 1

 

Can this 8452 drive the SPI and also one of the i2c channels and not cause it to conflict or lock up or?

 

Bought this NI8452 and overestimated its ability, this is a disappointment.  

0 Kudos
Message 3 of 6
(207 Views)

If you're good with very slow counting, you can repeatedly do a DIO read in the software (no timing guarantee) but limited to a few ms per read call.

 

I believe it can do SPI and I2C simultaneously, so I recommend giving it a try.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 4 of 6
(202 Views)

Ok so then this NI 8452 DIO pin we will have to sample at least 4-5 x the clock,   

 

how would you put the read into a vi?  to just read as fast as possible?  

 

should it be in a code loop?  while (1) am not envisioning how to code it to count this way

 

if x = 1

  if x = 1

    if x = 0 {count++}

next

 

so we measure 2 reads at high, then 1 at low, count++

 

OR!  

Can this 8452 assign an interrupt to a DIO pin? 

 

or say read read read read and when its gone from high and switches LOW? then have some timer VI for some precise time then set another bit high?    if I calculate the clock timing, 10 clocks = 367.3234ms catch the transition and instead of count clocks, just enable some timer and then set the other DIO bit?  

0 Kudos
Message 5 of 6
(195 Views)

Yes, read as fast as possible, keep track of time, and count the number of transitions against the time elapsed or the time period.

I would not expect any performance higher than 500 reads/s, that puts you in the best case to measure 250Hz or lower for better reliability.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 6
(182 Views)