Writing to ESC (Arduino mega 2560)

Hello there! I am writing a 2000 us pulse to my esc(s) connected to digital pins 33,32,31,30 .I am using following piece of code to drive them.

 PORTC |= B11110000;                                        //Set digital poort 33,32,31 and 30 high.
 delayMicroseconds(2000);                                   //Wait 2000us.
 PORTC &= B00001111;                                       //Set digital poort 33,32,31 and 30 low.

I am unable to write the pulse. My esc(s) continue to beep. can anyone point what is the problem?

EDIT: I figure out the issue DDRC |=B11110000; I have written DDRC |=B00001111; instead

I am unable to write the pulse. My esc(s) continue to beep. can anyone point what is the problem?

I think most hobby ESCs are made to accept RC servo type control pulses. Have you tried using the servo library and servo commands?

The servo library will work fine with hobby ESC's. Remember that hobby ESC's are usually designed with a brake, so "0" on the ESC may actually be around "70" in the servo function, 0 on the servo function would be fullspeed reverse. Also remember that ESC's need to be calibrated to their endpoints, so once you've done that, make sure you delay your code for 5s or so while the ESC boots to make sure you don't accidentally override the endpoint settings.