Hi I am working with a BL2120 Rabbit Computer Board using the RCM2300 rabbit 2000 module. I am new to Rabbit. I see that I can address external ports on the board with functions like WrPortE(). However, I do no understand how can I assign or create a shadow register for an external port (say 0x0001 (DOPA)). I know that there are preset shadow registers for the internal ports (e.g. PDDR is got PDDRShadow) which I have used on functions like WrPortI(), but when it comes to external ports, how exactly do I create a shadow register that I can send as a parameter on the WrPortE() function. How is it that the rabbit processor knows that the data written to that port must always be stored at the corresponding Shadow register for that external port?
I usually define the external ports of the BL2100 board as it is presented on the User Manual:
#define DOPA 0x0001 // (OUT00-OUT07)
#define DOPB 0x0003 // (OUT08-OUT15)
How do I create valid DOPAShadow & DOPBShadow register in memory, so that I can read them at any time and get the status of these ports?
I’d appreciate if anybody can help me with this matter. Any example code would be deeply appreciated.