Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

read digital input(s) on a falling/rising edge of a digital line using usb 6008

I have a project involving a microcontroller and an LCD display in 4 bit mode.

 

what I want is this: take 4 data lines and 2 control lines (enable and rs) and using usb 6008, to display the same message that appears on the LCD display. the enable line is active for about 5 ms, but the writing to the LCD display is not made at a constant period of time, so basically I don't know when data is written to the LCD.

 

how I thought it should work: on a rising/falling edge of the enable line, read rs and 4 data line and get the high nibble, then on the next rising/falling edge of the enable line read again rs and 4 data lines to get the low nibble.

 

is there a way to achieve this with the usb 6008? if possible, how?

 

thank you in advance!

 

0 Kudos
Message 1 of 2
(2,830 Views)

Hi tqf,

 

It sounds like what you would like to do is more along the lines of a hardware timed acquisition.  Unfortunately, the USB-6008 does not offer hardware timed Digital IO.  This is noted in the Specifications tab of the USB 6008 product page.  With that said, you will only have timing resolution in the millisecond range. However, you could configure a hardware-timed analog input, with a digital start trigger, and get much better timing resolution with a 10kS/s.  You could then build in logic to analyze the analog waveform.

 

Is it possible to use serial communication to achieve this result?  You could then decide to read in a set amount of bits (4) at a time.  You could poll the serial port for the number of bits available to be read, and then read that much data as well.  Does this help?

 

Best,

Adam
Academic Product Manager
National Intruments
0 Kudos
Message 2 of 2
(2,794 Views)