Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
Latest Saved Source Codes!

Source Code 12046 - 90army, Language: PASCAL
Source Code 12045 - football, Language: PASCAL
Source Code 12044 - test, Language: C/C++
Source Code 12043 - calc, Language: C/C++
Source Code 12042 - kl, Language: C/C++
Source Code 12041 - kl, Language: C/C++
Source Code 12040 - Hello World, Language: C/C++
Source Code 12039 - rotate, Language: JAVA
Source Code 12038 - ABC, Language: C/C++
Source Code 12037 - yu, Language: C/C++
Source Code 12036 - #include <stdio.h>, Language: C/C++
Source Code 12035 - AA, Language: BASIC
Source Code 12034 - d, Language: C/C++
Source Code 12033 - d, Language: C/C++
Source Code 12032 - a, Language: C/C++
Source Code 12031 - a, Language: C/C++
Source Code 12030 - hai, Language: C/C++
Source Code 12029 - hai, Language: C/C++
Source Code 12028 - yfvyujf, Language: BASIC
Source Code 12027 - AddYear.java, Language: JAVA
Source Code 12026 - a thing, Language: JAVA
Source Code 12025 - a, Language: C/C++
Source Code 12024 - d, Language: C/C++
Source Code 12023 - sample Prgorm, Language: C/C++
Source Code 12022 - jvfd, Language: C/C++
Source Code 12021 - hq, Language: C/C++
Source Code 12020 - main, Language: C/C++
Source Code 12019 - ййй, Language: C/C++
Source Code 12018 - ййй, Language: C/C++
Source Code 12017 - dd, Language: C/C++
Source Code 12016 - sss, Language: C/C++
Source Code 12015 - kk, Language: C/C++
Source Code 12014 - burn, Language: C/C++
Source Code 12013 - burn, Language: C/C++
Source Code 12012 - / WINAVR GCC // ATmega8 // clock: internal 1Mhz #include <avr/io.h> #include <avr/interrupt.h> #include <avr/signal.h> #include <avr/delay.h> #include <avr/eeprom.h> #include "3310LCD_function.c" #define uchar uint8_t #define uint uint16_t #define SLA_W 0b11000000 #define SLA_R 0b11000001 uchar senddata[5]; uchar readdata[5]; uchar search = 0; uchar search_up = 0; //------------------------------- // ?? void delay_ms(uint ms) { uint i; for(i=0;i<ms;i++) _delay_loop_2(250); } void set5767(void) { uchar i = 0; TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN); // SEND START SIGNAL while (!(TWCR & (1<<TWINT))); // WAIT FOR START SIG //if ((TWSR & 0xF8) != START) ERROR(); TWDR = SLA_W; // send address TWCR = (1<<TWINT) | (1<<TWEN); while (!(TWCR & (1<<TWINT))); //if ((TWSR & 0xF8) !=MT_SLA_ACK) ERROR(); for ( i = 0; i < 5; i++ ) { TWDR = senddata[i]; TWCR = (1<<TWINT) | (1<<TWEN); // send data while (!(TWCR & (1<<TWINT))); // if ((TWSR & 0xF8) != MT_DATA_ACK) ERROR(); } TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWSTO); //SEND STOP SIGNAL //LCD_write_english_string(60,3,"sOK"); } void read5767(void) { uchar i = 0; TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN); // SEND START SIGNAL while (!(TWCR & (1<<TWINT))); // WAIT FOR START SIG //if ((TWSR & 0xF8) != START) ERROR(); TWDR = SLA_R; // send address TWCR = (1<<TWINT) | (1<<TWEN); while (!(TWCR & (1<<TWINT))); //if ((TWSR & 0xF8) !=MT_SLA_ACK) ERROR(); //TWCR = (1<<TWINT) | (1<<TWEN); for ( i = 0; i < 5; i++ ) { TWCR = (1<<TWINT) | (1<<TWEN); // read data while (!(TWCR & (1<<TWINT))); readdata[i] = TWDR ; // if ((TWSR & 0xF8) != MT_DATA_ACK) ERROR(); } TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWSTO); //SEND STOP SIGNAL //LCD_write_english_string(10,3,"rOK"); } void show_frequency(void) { uint32_t nPLL =0; //Dec uint32_t frequency = 0; //Khz uchar display_bit[5]; uchar tbTmp1=readdata[1]; uchar tbTmp2=readdata[0]; tbTmp2&=0x3f; nPLL=tbTmp2*256+tbTmp1; // calculate searched station frequency if(senddata[2]&0x10) frequency =(unsigned long)(nPLL*82/10-225); else frequency =(unsigned long)(nPLL*82/10+225); display_bit[0] = frequency / 100000 ; if ( display_bit[0] == 0 ) display_bit[0] = 0x20; else display_bit[0] += 0x30; display_bit[1] = (frequency / 10000)%10 +0x30; display_bit[2] = (frequency / 1000)%10 +0x30; display_bit[3] = (frequency / 100)%10 +0x30; display_bit[4] = (frequency / 10)%10 +0x30; LCD_write_english_string(0,2," " ); LCD_write_char(display_bit[0]); LCD_write_char(display_bit[1]); LCD_write_char(display_bit[2]); LCD_write_english_string(25,2,"." ); LCD_write_char(display_bit[3]); LCD_write_char(display_bit[4]); LCD_write_english_string(43,2," MHz" ); } void show_rx_power(void) { uchar temp; temp = (readdata[3]>>4); LCD_write_english_string(60,0," "); LCD_write_char((temp/10)%10 + 0x30 ); LCD_write_char(temp%10 + 0x30 ); } void init(void) { DDRB = 0XFF; PORTB = 0XFF; DDRD = 0B11100000; PORTD = 0XFF; DDRC = 0B00000000; PORTC = 0Xff; // IO init delay_nms(100); //TWI TWBR = 12; TWCR = (1<<TWEN); //SEND STOP SIGNAL OSCCAL=0x9d; // 8M???????? //??MCU?I/O? DDRB |= LCD_RST | LCD_DC | LCD_CE | SPI_MOSI | SPI_CLK; SPSR |= (1<<SPI2X); // ??SPI???? SPCR |= (1<<SPE)|(1<<MSTR); // ??SPI??,????,4M?? LCD_init(); //????? } ////////////////////////////////////////////////////////////////// int main(void) { init(); senddata[0] = 0b01101111; //load 100MHz pll senddata[1] = 0b10010011; // away's low side injection senddata[2] = 0b00100000; senddata[3] = 0b10010000; senddata[4] = 0b00000000; readdata[0] = senddata[0]; readdata[1] = senddata[1]; LCD_write_english_string(0,0,"FM STEREO" ); //LCD_write_english_string(0,5," stereo" ); LCD_write_english_string(0,2," 99.1Mhz" ); show_frequency(); LCD_write_inverse_string(0,5," UP "); LCD_write_inverse_string(48,5," DOWN "); while(1) { if ( bit_is_clear( PIND,3)) { delay_nms(20); if ( bit_is_clear( PIND,3)) { loop_until_bit_is_set(PIND, 3); LCD_write_english_string(0,4,"KEY1 press" ); senddata[2] &= 0x7f; // set search down set5767(); LCD_write_english_string(0,4,"searching down" ); search_up = 0; search = 1; } } if ( bit_is_clear( PIND,2)) { delay_nms(20); if ( bit_is_clear( PIND,2)) { loop_until_bit_is_set(PIND, 2); LCD_write_english_string(0,4,"KEY2 press" ); senddata[2] |= 0x80; // set search up set5767(); LCD_write_english_string(0,4,"searching up "); search_up = 1; search = 1; } } if ( search ) { read5767(); if ( readdata[0] & 0x40 ) //reach band end { if ( search_up ) { senddata[0] = 0b01101001; // load 88Mhz pll senddata[1] = 0b11011010; set5767(); } else { senddata[0] = 0b01110011; // load 108Mhz pll senddata[1] = 0b01100100; set5767(); } } if ( readdata[0] & 0x80) //has been found a station { show_frequency(); show_rx_power(); senddata[0] = ((readdata[0] & 0x3f) |0x40); senddata[1] = readdata[1]; //record the pll search = 0; } } } }, Language: C/C++
Source Code 12011 - faruq , Language: JAVA
Source Code 12010 - nice thing, Language: C/C++
Source Code 12009 - nice thing, Language: C/C++
Source Code 12008 - cpp, Language: C/C++
Source Code 12007 - cpp, Language: C/C++
Source Code 12006 - s, Language: C/C++
Source Code 12005 - encriptar, Language: C/C++
Source Code 12004 - 1, Language: JAVA
Source Code 12003 - jogo da velha, Language: C/C++
Source Code 12002 - error in iostream.h, Language: C/C++
Source Code 12001 - hello, Language: C/C++
Source Code 12000 - hello, Language: C/C++
Source Code 11999 - hello, Language: C/C++
Source Code 11998 - test, Language: C/C++
Source Code 11997 - 90, Language: C/C++
Source Code 11996 - nlkl, Language: PASCAL
Source Code 11995 - ddos, Language: C/C++
Source Code 11994 - ok, Language: PASCAL
Source Code 11993 - a, Language: C/C++
Source Code 11992 - sample.c, Language: C/C++
Source Code 11991 - PassObject.java, Language: JAVA
Source Code 11990 - dfdf, Language: JAVA
Source Code 11989 - уы, Language: PASCAL
Source Code 11988 - test.c, Language: C/C++
Source Code 11987 - soni, Language: C/C++
Source Code 11986 - soni, Language: C/C++
Source Code 11985 - soni, Language: C/C++
Source Code 11984 - helloworld.c, Language: C/C++
Source Code 11983 - 55, Language: C/C++
Source Code 11982 - Rect1.java, Language: JAVA
Source Code 11981 - Rect1.java, Language: JAVA
Source Code 11980 - ori, Language: C/C++
Source Code 11979 - pl, Language: C/C++
Source Code 11978 - menu de opc, Language: C/C++
Source Code 11977 - Hello, Language: PASCAL
Source Code 11976 - 1, Language: C/C++
Source Code 11975 - aa, Language: JAVA
Source Code 11974 - Hello world, Language: C/C++
Source Code 11973 - jj.cpp, Language: C/C++
Source Code 11972 - io, Language: C/C++
Source Code 11971 - 1111, Language: C/C++
Source Code 11970 - 1111, Language: C/C++
Source Code 11969 - fgfgf, Language: PASCAL
Source Code 11968 - билет 3, Language: PASCAL
Source Code 11967 - билет 3, Language: PASCAL
Source Code 11966 - билет 3, Language: PASCAL
Source Code 11965 - 1, Language: C/C++
Source Code 11964 - 1, Language: C/C++
Source Code 11963 - 1, Language: C/C++
Source Code 11962 - 1, Language: C/C++
Source Code 11961 - gghg, Language: C/C++
Source Code 11960 - prime, Language: C/C++
Source Code 11959 - prime, Language: C/C++
Source Code 11958 - ads, Language: C/C++
Source Code 11957 - test pow, Language: C/C++
Source Code 11956 - test pow, Language: C/C++
Source Code 11955 - test pow, Language: C/C++
Source Code 11954 - beeping, Language: BASIC
Source Code 11953 - 1111, Language: C/C++
Source Code 11952 - 1111, Language: C/C++
Source Code 11951 - 1111, Language: C/C++
Source Code 11950 - jj, Language: C/C++
Source Code 11949 - flip.c, Language: C/C++
Source Code 11948 - secreat, Language: C/C++
Source Code 11947 - yes!, Language: C/C++
Source Code 11946 - hello1, Language: C/C++
Source Code 11945 - formatspecifier, Language: C/C++
Source Code 11944 - calc, Language: C/C++
Source Code 11943 - 2122, Language: C/C++
Source Code 11942 - 2122, Language: C/C++
Source Code 11941 - 1234, Language: C/C++
Source Code 11940 - aaa, Language: C/C++
Source Code 11939 - Pizza, Language: PASCAL
Source Code 11938 - FibonacciSeries, Language: JAVA
Source Code 11937 - bienvienido, Language: C/C++
Source Code 11936 - dia.f90, Language: FORTRAN
Source Code 11935 - dia, Language: FORTRAN
Source Code 11934 - a, Language: C/C++
Source Code 11933 - dia, Language: FORTRAN
Source Code 11932 - strcmp, Language: C/C++
Source Code 11931 - maria, Language: C/C++
Source Code 11930 - r, Language: C/C++
Source Code 11929 - bubsrt, Language: C/C++
Source Code 11928 - bubsrt, Language: C/C++
Source Code 11927 - astichan, Language: C/C++
Source Code 11926 - 44, Language: C/C++
Source Code 11925 - killer.java, Language: JAVA
Source Code 11924 - killer.java, Language: JAVA
Source Code 11923 - test, Language: C/C++
Source Code 11922 - mv, Language: C/C++
Source Code 11921 - mv, Language: C/C++
Source Code 11920 - PIZZA, Language: PASCAL
Source Code 11919 - PIZZA, Language: PASCAL
Source Code 11918 - pizza, Language: PASCAL
Source Code 11917 - p1.c, Language: C/C++
Source Code 11916 - Hello, Language: BASIC
Source Code 11915 - Hello, Language: BASIC
Source Code 11914 - sag, Language: C/C++
Source Code 11913 - umocnovani, Language: PASCAL
Source Code 11912 - umocnovani, Language: PASCAL
Source Code 11911 - umocnovani, Language: PASCAL
Source Code 11910 - p5.f90, Language: FORTRAN
Source Code 11909 - 2, Language: C/C++
Source Code 11908 - print, Language: JAVA
Source Code 11907 - ButtonPopupSample, Language: JAVA
Source Code 11906 - 123, Language: C/C++
Source Code 11905 - ash, Language: C/C++
Source Code 11904 - HW, Language: C/C++
Source Code 11903 - HW, Language: C/C++
Source Code 11902 - HW, Language: C/C++
Source Code 11901 - 5, Language: C/C++
Source Code 11900 - 1a, Language: C/C++
Source Code 11899 - 1a, Language: C/C++
Source Code 11898 - welcome.c, Language: C/C++
Source Code 11897 - test, Language: C/C++
Source Code 11896 - test, Language: C/C++
Source Code 11895 - teste1, Language: C/C++
Source Code 11894 - teste1, Language: C/C++
Source Code 11893 - teste1, Language: C/C++
Source Code 11892 - hello.c, Language: C/C++
Source Code 11891 - s.c, Language: C/C++
Source Code 11890 - asd, Language: C/C++
Source Code 11889 - Exemplo01, Language: C/C++
Source Code 11888 - myuyy, Language: FORTRAN
Source Code 11887 - frst.c, Language: C/C++
Source Code 11886 - lodifj, Language: JAVA
Source Code 11885 - Md.java, Language: JAVA
Source Code 11884 - N.java, Language: JAVA
Source Code 11883 - virupa, Language: C/C++
Source Code 11882 - 1, Language: C/C++
Source Code 11881 - matchstick game using c compiler, Language: C/C++
Source Code 11880 - ab, Language: JAVA
Source Code 11879 - ממוצע ציונים, Language: PASCAL
Source Code 11878 - ממוצע ציונים, Language: PASCAL
Source Code 11877 - ממוצע ציונים, Language: PASCAL
Source Code 11876 - hhw1, Language: C/C++
Source Code 11875 - hhw1, Language: C/C++
Source Code 11874 - 1ercom, Language: C/C++
Source Code 11873 - 1er, Language: C/C++
Source Code 11872 - s.c, Language: C/C++
Source Code 11871 - fhgf, Language: C/C++
Source Code 11870 - wttwwfz, Language: PASCAL
Source Code 11869 - dryh, Language: PASCAL
Source Code 11868 - dryh, Language: PASCAL
Source Code 11867 - гнг, Language: PASCAL
Source Code 11866 - HelloWorld.java, Language: JAVA
Source Code 11865 - joelson, Language: C/C++
Source Code 11864 - Mass, Language: PASCAL
Source Code 11863 - dd, Language: C/C++
Source Code 11862 - qqq.c, Language: C/C++
Source Code 11861 - lol, Language: PASCAL
Source Code 11860 - lol, Language: PASCAL
Source Code 11859 - PHP-nuke 8.0 exploit , Language: C/C++
Source Code 11858 - cccc, Language: FORTRAN
Source Code 11857 - j, Language: JAVA
Source Code 11856 - aaa.pas, Language: PASCAL
Source Code 11855 - aaa.pas, Language: PASCAL
Source Code 11854 - 12, Language: JAVA
Source Code 11853 - 12, Language: JAVA
Source Code 11852 - 12, Language: JAVA
Source Code 11851 - c , Language: C/C++
Source Code 11850 - c , Language: C/C++
Source Code 11849 - bmi 19, Language: C/C++
Source Code 11848 - bmi 19, Language: C/C++
Source Code 11847 - 5, Language: C/C++