PROGRAM ROBOT - TopicsExpress



          

PROGRAM ROBOT MIKROCONTROLLER /***************************************************** Chip type : ATmega16 Program type : Application Clock frequency : 11.059200 MHz Memory model : Small External SRAM size : 0 Data Stack size : 256 *****************************************************/ #include #include #include #define t1 PINB.0 #define t2 PINB.1 #define t3 PINB.2 #define t4 PINB.3 #define t5 PINB.4 #define t6 PINB.7 #define pwmka OCR1A #define pwmki OCR1B // Alphanumeric LCD Module functions #asm .equ __lcd_port=0x15 ;PORTB #endasm #include #define ADC_VREF_TYPE 0x60 // Read the 8 most significant bits // of the AD conversion result unsigned char read_adc(unsigned char adc_input) { ADMUX=adc_input | (ADC_VREF_TYPE & 0xff); // Start the AD conversion ADCSRA|=0x40; // Wait for the AD conversion to complete while ((ADCSRA & 0x10)==0); ADCSRA|=0x10; return ADCH; } // Declare your global variables here char buff[33]; int i,j; unsigned char kecepatanki,kecepatanka; eeprom int garis[10],back[10],tengah[10]; unsigned char sen[10],sensor; void lcd_kedip(int ulangi) { for(i=0;i
Posted on: Wed, 26 Nov 2014 05:03:15 +0000

Trending Topics



Recently Viewed Topics




© 2015