gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Serial Communications Delay

#25751 - Krakken - Sat Aug 28, 2004 2:45 am

I have noticed that you need to delay in-between sending data through the serial port on hardware (more than just waiting for the start bit to clear). I want my transfers to be as fast as possible so i'm wondering, what sort of delay should I be looking at to make transfers (semi)reliable with the shortest time. Or maybe there is a better way to check rather than waiting for the start bit to clear?

Thanks.

#25761 - tepples - Sat Aug 28, 2004 4:15 am

You need to delay long enough for the other machines to pick up and process the interrupts. How long this takes depends on factors such as what other ISRs are running. DMA will prolong this delay a bit too; look at using BIOS CpuFastSet instead.

Are you looking for speed figures for doing a normal mode broadcast or for multiplayer comms?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#25765 - Krakken - Sat Aug 28, 2004 4:45 am

When you mention DMA, do you mean in my main code? I suspect you do seeing as I can't see a need for it for handling Serial Comms.

I'm using Multiplayer Comms at the moment. Would there be another mode I could switch into (such as GP) to check if the slave is ready to accept the next transfer? I just don't want to be delaying when it's not neccesary although I may have to try and make it consistent due to the fact that the speed could fluctuate if I didn't.

#25784 - ProblemBaby - Sat Aug 28, 2004 2:17 pm

When the serial interrupt occur the transmission is totally finished.