Skip to content

Instantly share code, notes, and snippets.

@mikepea
Created October 20, 2010 22:01
Show Gist options
  • Save mikepea/637418 to your computer and use it in GitHub Desktop.
Save mikepea/637418 to your computer and use it in GitHub Desktop.
beginnings of NEC IR code
void send_38khz_pulse(void) {
PORTB ^= irOut;
PORTB ^= redMask;
delay_x_us(26); // 17 works
}
void send_38khz_space(void) {
PORTB ^= bogusMask;
PORTB ^= bogusMask;
delay_x_us(26); // 17 works
}
void send_nec_header() {
for (int i = 0; i < 21; i++) {
send_38khz_pulse();
}
for (int i = 0; i < 105; i++) {
send_38khz_space();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment