Hi everyone. I've had a really hard time trying to find someone that is familiar with something specific I've been trying to accomplish and was hoping someone here wouldn't mind giving me some guidance. I'm currently using an STN2120 on a custom slave PCB that will be plugged into the OBD-2 port of a vehicle. The STN will be interpreting the CAN protocols, and passing engine sensor information to a master PCB via UART. The ATMEGA2560 MCU on the master board will then be monitoring OBD-2 engine sensor values it receives from the STN2120, and the master board will activate digital output circuits based on certain conditions being met based off the CAN sensor data I'm monitoring. I need the MCU on the master board to be able to read the data at the same speed that the CAN bus produces it (ie: up to 500 kbps, I believe).
The person that is designing my boards came to the realization that using the master PCB's ATMEGA MCU to request the data from the STN, and to then receive that data, will likely result in a refresh rate of over 1 second, per sensor data I'm looking to read on the master board. While I don't need absolute instantaneous data from the CAN bus, it needs to refresh at a rate of several times per second for my purposes.
Based off what I'm describing, is there a better way of collecting this data on the master board that will result in a much faster refresh rate when looking at say 15 sensors' data on the CAN BUS? Could some libraries perhaps be loaded on the ATMEGA, that allow it do exactly what the STN2120 does? Sorry for the ignorance here... I'm just a car guy with a concept, and very little microcontroller knowledge Thanks a bunch to anyone who is willing to help!!