Dear Ian, Dear Mark,
many thanks for your advice.
After looking at the pors and cons I think that I will go with the I²c interface.
The interface consumes 2 pis only and is pretty fast.
So far I have no experience with I²c.
I was searching the web for some code examples that I may adapt to my requirements.
Declaring CPU as the master and sending data is logical to me.
How to receive a set of bytes with CPU B is not clear to me.
In the samples I could not find hints dealing with a CPU.
I am still free to use the hardware TWI on both CPUs.
Not clear to me is :
Is it necessary to declare CPU B to be a slave ?
How can I declare CPU B as a slave ?
What is the configuration of the receive buffer ? Array of bytes ?
The solution i am thinking about is to use an array of bytes, a index counter and an ISR.
The ISR executed when a byte is tranferred modifies the index in which the value is written to and increments the counter.
I the data transfer protocol I need to send a byte that indicates how the data has to be interpreted e.g. word, integer, single ...
or
I send a whole set of data ( appr. 20 bytes in my application) in a fixed frame and excerpt the data using the overlay feature.
If there are better or already in Bascom integrated solutions please let me know.
best regards
Christian
↧