Advertisement
Guest User

Untitled

a guest
Apr 18th, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include <avr/io.h>
  2. #include "C:\Users\GAWA\Downloads\rxd\C\lib_dmx_in.h"
  3.  
  4. int main(void)
  5. {
  6.     cli();
  7.     DDRD |= (1<<PD7);                   //red LED pin is output
  8.     init_DMX_RX();
  9.     DmxAddress= 1;
  10.     sei();
  11.    
  12.     for(;;)
  13.     {  
  14.         //get_dips();                       //get start address
  15.         if (DmxRxField[0] >= 127)       //enable LED if 1st DMX val is >127
  16.         {
  17.             PORTD &= ~(1<<PD7);         //LED ON
  18.         }
  19.         else
  20.         {      
  21.             PORTD |= (1<<PD7);          //LED OFF
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement