Advertisement
Guest User

Untitled

a guest
May 27th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.28 KB | None | 0 0
  1. #include <built_in.h>
  2. unsigned int adc_rd, rd;
  3.  
  4. void main()
  5. {
  6.  DDRB = 0xFF;
  7.  DDRC = 0xFF;
  8.  while (1)
  9. {adc_rd = ADC_Read(2);    
  10.     rd = 65535;            
  11.     adc_rd = (adc_rd>>6);    
  12.     rd = (rd<<adc_rd);  
  13.     PORTB = adc_rd;        
  14.     PORTC = Hi(adc_rd);    
  15.   }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement