#26859 - ProblemBaby - Mon Sep 27, 2004 9:09 pm
Hi
Ive some problems to get SIO Normal Mode to work.
My code works if I put 4 calls to VBlankIntrWait after the transmission code=) but not with one or any!
When I look at the flow slowly I see that data is transmitted faster then recieved from the the slave.
I check if SI is high before I send in the master code is it anything else I should do???
Here is the code:
Plz Help!
Ive some problems to get SIO Normal Mode to work.
My code works if I put 4 calls to VBlankIntrWait after the transmission code=) but not with one or any!
When I look at the flow slowly I see that data is transmitted faster then recieved from the the slave.
I check if SI is high before I send in the master code is it anything else I should do???
Here is the code:
Code: |
void Transfer(u32 Data) { REG_SIODATA32 = Data; if (g_MultiPlayer.Identifier) // Slave! { REG_SIOCNT |= SIOCNT_ACTIVE; // Activate REG_SIOCNT &= 0xFFF7; // Clear SO while (REG_SIOCNT & SIOCNT_ACTIVE); REG_SIOCNT |= BIT(3); // Set SO } else // Master { while (REG_SIOCNT & BIT(2)); // check for SI low // I think something should be done here! REG_SIOCNT |= SIOCNT_ACTIVE; while (REG_SIOCNT & SIOCNT_ACTIVE); } // If I wait four times for VBlankIntr here it works! } |
Plz Help!