Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <targets/AT91SAM7.h>
- #include "pcf8833u8_lcd.h"
- int main(void){
- char z[4];
- char x[4];
- int a, r_a=0;
- InitLCD();
- SetContrast(5);
- Backlight(BL_ON);
- LCDClearScreen();
- ADC_CR=1<<0;
- ADC_CHER=1<<6;
- ADC_MR=(23<<ADC_MR_PRESCAL_BIT)|(1<<ADC_MR_PRESCAL_BIT)|(2<<ADC_MR_STARTUP_BIT);
- ADC_CR=1<<1;//START KONWERSJI
- while((ADC_SR&(1<<6))==0){}
- r_a = ADC_CDR6;
- itoa(r_a,x,10);
- LCDPutStr(x, 40, 20, LARGE, WHITE, BLACK);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement