02-27-2018 04:06 AM
I am working on a project wherein I need to communicate 8 boolean outputs to the controller based on the result generated by a program built using LabVIEW on a PC.
I have discussed this with a few colleagues who suggest using a parallel port data-bus and use TTL signals to communicate to a micro-controller which will give maximum transfer speed.
I understand it being a cost effective solution but will it be fastest way to communicate with a micro-controller? Also, considering it being a legacy technology which limits its availability on standard PC's I have to buy an additional PCI-E card with parallel port interface.
Solved! Go to Solution.
02-27-2018 04:15 AM
02-27-2018 04:43 AM
Hi GerdW;
Thanks for your response.
I guess by fastest I'm talking about latency here. To give you a brief of the application, I am inspecting image samples and generating a true or false case for 8 different features on the image. These samples will be generating results at about 250 msec. so I will have new feature data every 250 msec.
Now, I require this info to be passed on to the micro-controller at this rate. Considering the article you suggested "Instrument Bus performance - White paper", it appears that it will be preferable to use register based communication instead of message based. However, the article also suggest that register based communication is usually considered for on-board communication and in my case, I have the controller physically separate on another PCB.
Regards;
Harshit
02-27-2018 05:25 AM - edited 02-27-2018 05:26 AM
02-27-2018 05:33 AM
Hi GerdW
I have I2C, SPI, UART and Digital IO pins on controller for communications.
Regards;
Harshit
02-27-2018 05:49 AM
250ms is an eternity, so I would worry more about ease of use than latency. The DIO would be the simplest and would be really fast. Because you are going between boards, the UART with a high baud rate would be my second choice (only need to send 1 byte for all 8 Booleans).
02-27-2018 05:50 AM
02-27-2018 06:00 AM
Hi GerdW
As i mentioned in my previous reply, i get updated results every 250 msec by which i need to interpret the features, record them, adjust my counters and operate a set of relays.
Is there any other timing constraint you are talking about?
Regards
Harshit
02-27-2018 06:05 AM
@crossrulz wrote:
250ms is an eternity, so I would worry more about ease of use than latency. The DIO would be the simplest and would be really fast. Because you are going between boards, the UART with a high baud rate would be my second choice (only need to send 1 byte for all 8 Booleans).
Hi;
Thanks for your response.
Currently, issue I face is usage of mirco-controller DIO to connect to PC. My PC does not have a built in LPT port. If UART can still be used with that time limits, I would prefer that as PC already has 1 Serial port on board.
Regards;
Harshit
02-27-2018 06:10 AM
@harshitshah wrote:
Currently, issue I face is usage of mirco-controller DIO to connect to PC. My PC does not have a built in LPT port. If UART can still be used with that time limits, I would prefer that as PC already has 1 Serial port on board.
Then go with the serial port. But do be warned that many micro-controllers use TTL UART (UART waveforms using 5V logic) while PCs tend to be RS-232 (-12V to +12V for high and low). You will damage your micro-controller if this is the case. So you may need a converter module/chip.