12-15-2008 02:27 AM
Hello,
My requirement is to have Communication between tester(PC) and microcontroller via synchronous, serial interface. The tester(PC)
should receive one Byte from the microcontroller, with each Byte transmitted by the tester as a continues loop. Only the message(data)
should be able to change and the micocontroller should respond accordingly. I plan to do this via UART communication.
I have ordered USB 6509 DIO hardware for the above requirement. I have Labview 8.5 Full Development SW.
Please suggest how can I implement the communication part for the above?
Readily available Vi's are also appreciated.
Thanks and regards,
Nick
12-15-2008 04:38 AM
12-15-2008 06:29 AM
The 6509 is not capable of performing RS-232 communication rates. Better cancel your order.
As mentioned, you can use the serial functions in LabVIEW. You would just need an inexpensive USB-RS232 adapter and possibly a level shifter, depending on the voltage inputs of the micro.
12-15-2008 03:59 PM
The 6509 will work for synchronous serial communications at 0-5V, but it lacks the built-in timing and control functions required to decode a serial stream. With built-in timing, a burst of serial data can be recorded and decoded by the PC. With an external clock function, the uC could strobe the data into the dio buffer.
You might be able to overcome these limitations by using a slow bit rate and a clock line. I suggest utilizing the "change detection" function of the 6509 to acquire data on one edge of the clock. Implement a start and stop bit for syncronization and combine the bits into a byte.
Look at the reference design for I2C communications to get started:
http://zone.ni.com/devzone/cda/epd/p/id/6080
12-15-2008 10:30 PM
Hello Everyone,
Thanks for the reply. Just for some additional Information I am using V850ES/Fx3 series microcontroller.
My requirement for byte sending & receiving is as follows.
I have installed the examples from the reference design and now am trying to implement them.
Thanks and regards,
Nick
12-16-2008 04:44 AM
Hello All,
I also would like to add that the microcontroller ports i am using are IO ports.
Thanks and regards,
Nick
12-16-2008 05:21 AM
12-16-2008 10:51 PM
Hello,
You are correct I have to write my own communication protocol. The protocol is present on the microcontroller side (C Code), I have to implement in a similar way in Labview (Tester). As you can see from the attached waveforms the tester has to do the following:-
1) Send a Clock, 2) receive an clock echo, 3) send tester data out, 4) receive microcontroller data out.
As I have never implemented a serial comunication protocol, I am using this forum for all the help I can get. Earlier I was not sure of which protocol is to be implemented. But now I am sure I have to use SPI through USB 6509.
Please correct me if anything is wrong.
Thanks and regards,
Nick
12-17-2008 04:19 AM
12-18-2008 06:19 AM
Hello t06afre,
Thanks for the suggestion, but we do not have a free UART port on our CPU & also we should be able to test the CPU in an industrial enviornment. So we had selected the NI USB 6509.
Thanks for all the support to all, I will update once I have completed with the software.
Regards,
Nick