All of the above comments are great. It sounds like I need to present a little more detail on what is going on with the entire project.
The existing Mega:
The existing mega is at this point pretty well loaded. It is currently responsible for the following tasks:
It polls the ECU once every second;
It scans, tracks and displays data from several analog inputs;
It scans, and responds to about 15 digital inputs;
It is running a GPS card and polls it every ten (10) second;
The Mega tracks mileage, speed, GPS location and several way points;;
It is running two (2) ST7565 GLCD displays updating the displays once a second;
The Mega is capable of displaying some ten (10) different displays on each of the two (2) displays;
It is running and storing some data on a SD chip;
It stores some data on the on board EEPROM;
The current program running in the Mega consumes about 53k of program space and about 5k of RAM. All of the labels for the displays are kept in ProgMem to conserve on RAM. I do have a Rapid Circuits 512k RAM board for the Mega and it is running on my prototype board but it is not incorporated into the running board system.
As for polling frequency, the existing Mega is doing about it can do to poll the ECU and update the screens once a second.
The ECU:
The ECU does not have a broadcast mode. It only responds when polled. It can be polled for data as fast as 15 times per second.
Once polled, the ECU must be allowed to respond to the current poll before being polled again. This could be critical.
There are about 15 different polling commands that can be issued to the ECU. I am using only one of them (Real Time Data). The Tablet on the other hand is using a large number of them.
The ECU does support CRC checking. I am not using it in the mode I am using for the dash it is not critical. If the data gets corrupted, I just wait for the next polling to update the screens.
There are some 110 different data points that can be polled. The data is transmitted in a string of 212 bytes. Some of the data points consist of one (1) byte others use two (2) and some use three (3).
Tuning of the engine program is performed through the serial port. Once a tuning mode or table is entered, You have to be very careful to insure that the table or tune mode is handled and exited properly before issuing some other type of command. If this is not executed correctly, you could very easily corrupt the existing tune program within the ECU.
The dash board Mega does none of that it only polls for real time data.
The Tablet Software:
The Tablet software package is a third party package.
It can perform the following tasks:
Poll and store data from the ECU at a rate of 15 time second;
Display the data on strip charts and graphs; and
The Tablet software also has the ability to tune or change anything within the ECU.
System Operational Considerations:
1), The Dash is always there and only polls for data once a second.
2), The Tablet may or may not be there.
3), The tablet may be polling for real time data or it could be in some programming mode.
4), The Tablet’s polling frequency is way to fast for the Dash’s Mega to handle.
5), Because of the possibility that the Tablet might be in some kind of programming mode, the router is going to have to monitor what commands are being passed to the ECU. If the ECU is placed in one of the programming modes, the Dash will have to be looked out until it is safe for it to access the ECU.
At this time, I don’t know exactly how the Tablet software works and it does not look like I am going to get any support from the Tablet software’s provider. The ECU on the other hand is an open architecture package and I have documentation on what the commands are how they work.
Moving Forward From Here:
My plans at this point are to setup a system such that I can monitor and store the Tablet’s communications to and from the ECU by the Tablet.
To get this done, I think I am going to use two serial ports on a Mega to monitor the ECU communication. One serial port to monitor the communications to the ECU and the other to monitor communications from the ECU. I will use a third Mega serial port setup to retransmit data going to and from the ECU with an identifying label so I can log and record the data on a separate computer to allow me to study the transactions at a later time.
Once I have a functioning transaction monitoring system to monitor both the Tablet and the ECU’s transmissions, I will run the Tablet through most if not all of its functions and record the transactions. After I collecting the data, I intend to study the data and try to understand what is going on. I don’t need to know everything about what is going on I just need to know how to recognize the entry and exit commands to the programming modes.
Once I understand how the Tablet works with the EDU, I will setup the router such that it locks the Dash out when the Tablet is in some kind of a critical mode.
I sorry this turned into a rather long dissertation but it is turning out to be a rather complex project.
Thanks for all of your thoughts. Any thoughts any of you may have will be greatly appreciated. Although I have been playing with Arduino’s for about a year now, I am no programmer and I am still trying to learn the language. It has been a learning experience to say the least.