02-25-2014 08:09 AM
Dear forum peeps,
Im running a test for testing a few LCDs. These LCDs can be toggled into various colours (Red, Green, Blue etc..) Im also attaching the datasheet for this in this post.
Now, I can turn the LCDs ON and off and also change colours, its the next part of driving the pixels on the the LCD thats hammering me.
I tried looking into the datasheet to find out how it is done but still cnt get it sorted.
Im attaching my code here FYI.
Please can you guys have a look at the code and help me out here.
Thanks,
LABMAT
02-26-2014 02:40 AM
Hi guys,
any ideas on this?
Thanks,
Labmat
02-26-2014 02:52 AM
Hi LabMat,
there are inconsistencies in your VI:
The first DAQmxWrite is outputting 4 boolean values, so the "MYDAQ_LCD_ADD" seems to be configured to use 4 DOs. The DAQmxWrite in the loop is outputting just two boolean values, so seems to use only two DOs. Please clean up your code here!
Instead of the case structure (in the loop) I would use a simple SELECT function.
Or you may have your input data array doubled (all values twice in the array) to allow simple autoindexing of the loop…
02-26-2014 03:58 AM
Yes you are right. the first DAQ is outputting 4 values. to for different channels on the MYDAQ. These set the address for the LCDs in the circuit.
the second Daq write outputs the clock and LCD data to the corresponding pins.
what is this inconsistency that you are mentioning about? I cant see what you were talking about.
Sorry abt that..
with regards to using the Case structure, this vi will be a sub vi to another main VI. hence I want to control the LCDs from the main VI. hence I put the case structure as there are quite a few cases.
The while loop will be removed after the vi is working. that is there only for testing purposes.
mmm.. with regards to auto indexing, I didnt think of that tbh. Ill look into it.
thanks for your help
02-28-2014 09:09 AM
Hi,
I tried using auto indexing, but still getting the same problem.
any ideas?
thanks
Labmat