This can easily be generalized to an entire string:
You can replace the for loop with a static counter if you need to do the sending inside an ISR.Code:uint8_t text[] = "Hello"; uint8_t i; uint8_t *p = &text[0]; /* Transmit the first character. */ for (i = 0; i < 8; ++i) { /* Wait for next edge */ if ((uint8_t)(1 << i) & *p) { OUT_PORT |= 1 << PIN_NUMBER; } else { OUT_PORT &= ~(1 << PIN_NUMBER); } }