How can I program multiple RT buffers and RT interrupts using BusTools/1553-API?
This is a basic example program that sets up a simple RT Simulation. It simulates RT1 with two subaddresses, SA1 RECEIVE and SA2 TRANSMIT.
This program adds multiple buffers (2) for each SA and uses INTERRUPT EVENTS to detect when these SAs have sent or received data so we can safely read/write the buffers.
Use a bus analyzer (BusTools/1553) as the bus controller sending messages to RT1 SA1 Receive and RT1 SA2 Transmit. Monitor the data sent by RT1 SA2 Transmit; you should see the upper byte of all data words increment on each message RT1 SA2 sends.
Each time this program receives a message for RT1 SA1 Receive, it prints an asterisk.
Download this example by clicking the attachments link on the right.