03-02-2009 10:38 PM
Hello Ravens Fan,
Thankyou for your quick response . I initialized the string shift register with an empty string and the old data disappeared after a stop and restart on that vi.
I love this forum
Hello All,
Can anyone help me with the problem in the above post where I require to write 40 bytes to the microcontroller in a reverse (little endian) format e.g if I send AA55AA90 the data sent to the microcontroller should be 0955AA55. I need to send the data bit by bit so any suggestion for this will also be appreciated.
Thanks and Regards,
Nick
03-02-2009 10:51 PM - edited 03-02-2009 10:51 PM
So you just want to reverse the bits?
03-03-2009 12:00 AM
Hello Ravens Fan,
Yes. I use the same 1D array for inverting the bits. Please find attached Reverse bits.vi. Can I peroform the same operation with 40 bytes and send the data to the microcontroller?
Thanks and regards,
Nick
03-03-2009 04:26 AM
Your life will be easer when you will use Array of U8.
03-03-2009 05:08 AM - edited 03-03-2009 05:15 AM
If you could use Array. It is easer.
I thing your communication protocol is status machine and it is not depend on time.
I attached my example. I did it by your clock.jpg schema. There missing:
--- Sending more command - I thing you will do it.
--- You must handle error statues.
--- It is good add same waits to loops and between steps
03-03-2009 06:36 AM
Hello JCC,
Thanks for your responses.You are correct my communication protocol is not time dependent.
I must say the vi you attached is impressive.. It is clean and good way of coding. I must learn these ways of coding.
What I do is just write a code without optimising it. From the earlier posts in this thread I have learnt how to combine errors, I will surely
do the same while finalisation of my code.
I too hope I could be able to use Array instead of a string. But as we were using a microcontroller based system with front end having String as an input for Users, I have to keep it the same way. I have attached an vi in which I am able to send multiple bytes using string. I know my code is messy. Still Please have a look.. My only worry is that I have to integrate this vi with my original code.
Thanks and regards,
Nick.
03-03-2009 08:20 AM