What is the serial monitor actually doing?

pylon:
You don't explain what you're expecting and you don't explain what you get. Your sketch is a best spitting out 9 bytes to the serial interface, commands are received, there is no code for it. Don't forget: we don't have your context to get anything meaningful out of some very few lines of code with entropy-less function names (dostuff).

Oh Sorry, I am controlling an LED display. I am sending two commands to the display.....err 3 commands to the display: 0x55 is a command as well, it auto-detects and mates master/slave baudrate.

The other 2 commands are strings of bits. The reason I have 2 arrays with strings of bits is because I want my code to do something else later on, so it's a place holder to be rewritten you could say. Ideally, "dostuff" is just supposed to send the bits and collect the handshake responses. I'm not sure why I don't send 0x55 through dostuff.....maybe I'll try that after I get this working.

The display is supposed to handshack with the master, but I'm not sure it's working quite properly. I can't flash my arduino and have the display plugged in at the same time, so that is making troubleshooting difficult. If I leave it plugged in and flash it, I get a synch error. If anyone can help me fix that I'd be hugely appreciative.

When the display reads an error, it replies with a 0x15 command, which is shown in the "serial_response" function. It looks like I had it commented out, because I suspected it was making my program behave improperly. I'm wondering now if I should be using software serial, or just don't use the Serial monitor I suppose, but then troubleshooting is somewhat difficult.

Anyway, what happens is that I run the program. Command 1 and 2 are executed. (not sure 2 is executed quite right. It seems kind of slow. Idk if that's normal or not). Command 3 will not execute until I open the serial monitor. I have no idea what is going on there. Unfortunately I don't have much output I can paste in here to show you. I'm just changing the color of the screen color and then putting a circle on the screen. I see the color change.....slowly, and then the circle instantly shows up some fixed duration of time after I open the serial monitor.

@Pauls I tried that. Didn't fix the problem. The datasheet says you should tie the transmit line high while the display is starting up, to help with the autobaud function the module has. Is there a better way to accomplish that through software? Yeah, these datasheets i am working with are a bit sketchy. I don't recall the SPI libraries I wrote for some TI chips taking this long...