这篇教程C++ Delay10KTCYx函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中Delay10KTCYx函数的典型用法代码示例。如果您正苦于以下问题:C++ Delay10KTCYx函数的具体用法?C++ Delay10KTCYx怎么用?C++ Delay10KTCYx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了Delay10KTCYx函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: mainvoid main(){ Initial(); //Initialize all settings required for general QwikFlash and LCD operation DisplayC(Clear1); //Clear the LCD one time at the beginning of your program DisplayC(Clear2); long retTen; // initialize variable for 10K ohm potentiometer long retPot; // initialize variable for Potentiometer 1 on circuit board SSPSTAT = 0b11000000; // SMP and CKE SSPCON1 = 0b00100000; // Enable SPI serial port //Your personal PORT/TRIS/ADCON/etc settings or configurations can go here //Or make your own function and call it while(1) { Delay10KTCYx(25); retTen = tenK(); // Store value from 10K ohm potentiometer Delay10KTCYx(25); retPot = pot1(); // Store value from Potentiometer 1 on circuit board displayAnalog(retTen, retPot); }}
开发者ID:Eddie-Molina,项目名称:Embedded-Systems,代码行数:25,
示例2: interruptions_leftvoid interruptions_left(void) //for interruptions appearing on the left to the track{ straight_fwd(); // Go forward Delay10KTCYx(130); check_sensors(); if (SeeLine.b.Left&&!SeeLine.b.CntLeft&&SeeLine.b.Center&&!SeeLine.b.CntRight&&!SeeLine.b.Right) //10100 { while(SeeLine.b.Left&&!SeeLine.b.CntLeft&&SeeLine.b.Center&&!SeeLine.b.CntRight&&!SeeLine.b.Right)//00000 sees nothing { //spin right spin_right(); check_sensors(); } } else if (!SeeLine.b.Left&&!SeeLine.b.CntLeft&&SeeLine.b.Center&&!SeeLine.b.CntRight&&SeeLine.b.Right) //00101 { straight_fwd(); // Go forward Delay10KTCYx(130); check_sensors(); if (!SeeLine.b.Left&&!SeeLine.b.CntLeft&&!SeeLine.b.Center&&!SeeLine.b.CntRight&&!SeeLine.b.Right) //00000 { while(!SeeLine.b.Left&&!SeeLine.b.CntLeft&&!SeeLine.b.Center&&!SeeLine.b.CntRight&&!SeeLine.b.Right) //00000 { spin_right(); check_sensors(); } } } *}
开发者ID:pointnotfoe,项目名称:LineFolllowingRobot,代码行数:35,
示例3: pirIndicate// LED indication for PIR true void pirIndicate(void){ LED = 1; Delay10KTCYx(20); LED = 0; Delay10KTCYx(20);}
开发者ID:ajitjadhav28,项目名称:StudyTable,代码行数:8,
示例4: initializevoid initialize() ///Works with current delays{ int result; result = enterCommandMode(); sendString(GET_WLAN_STRING, 6); Delay10KTCYx(0); sendString(SET_SSID, 18); Delay10KTCYx(0); sendString(SET_PASSPHRASE, 29); Delay10KTCYx(0); sendString(SET_CHANNEL, 10); Delay10KTCYx(0); sendString(SET_AUTH, 10); Delay10KTCYx(0); sendString(SET_JOIN, 10); Delay10KTCYx(0); sendString(SET_DHCP, 10); Delay10KTCYx(0); sendString(SET_COMM_OPEN, 10); Delay10KTCYx(0); sendString(SET_COMM_REMOTE, 10); Delay10KTCYx(0); autoConnect(); sendString(SAVE, 5); Delay10KTCYx(0); result = rebootModule(); longDelay();}
开发者ID:brianhrowe,项目名称:Digital_Foos,代码行数:28,
示例5: botaoint botao(){ if (botao1==0) { Delay10KTCYx(10); if (botao1==0) return 1; } else if (botao2==0) { Delay10KTCYx(10); if (botao2==0) return 2; } else if (botao3==0) { Delay10KTCYx(10); if (botao1==0) return 3; } else if (botao4==0) { Delay10KTCYx(10); if (botao4==0) return 4; } else return 0;}
开发者ID:NSEE,项目名称:BLDC-Embarcado-C,代码行数:29,
示例6: mainvoid main(void) { ConfigureOscillator(); TRISB0 = 0; TRISB1 = 0; TRISB4 = 1; TRISA1 = 1; //unsigned char channel = 0x00, config1 = 0x00, config2 = 0x00, config3 = 0x00, portconfig = 0x00, i = 0; //CloseADC(); //config1 = ADC_FOSC_2 | ADC_RIGHT_JUST | ADC_2_TAD; //config2 = ADC_CH0 | ADC_INT_OFF | ADC_REF_VDD_VSS; //portconfig = ADC_4ANA; //OpenADC(config1, config2, portconfig); /* ADCON0bits.ADON = 0b1; ADCON0bits.CHS = 0b00; ADCON1bits.VCFG0 = 0b0; ADCON1bits.PCFG0 = 0b1; ADCON2bits.ADFM = 0b1; ADCON2bits.ADCS = 0b000; */ //ADC_INT_ENABLE(); while(1){ //ConvertADC(); //while (BusyADC()); //ADCResult = PORTAbits.RA1;//(unsigned int) ReadADC(); // if(ADCResult==1){ LATB0 = 1; // RB-0 to High LATB1 = 1; // RB-1 to High Delay10KTCYx(30); // }else{ LATB0 = 0; // RB-0 to High LATB1 = 0; // RB-1 to High //} Delay10KTCYx(30); } /* while (1) { //PORTBbits.RB1=0b1 //if(PORTBbits.RB4==0){ LATBbits.LATB0 = 1; // RB-0 to High LATBbits.LATB1 = 0; // RB-1 to High //delays(1); Delay10KTCYx(30); // } // if(PORTBbits.RB4==1){ LATBbits.LATB0 = 0; // RB-0 to LOW LATBbits.LATB1 = 1; // RB-1 to LOW //delays(1); Delay10KTCYx(30); // } }*/ }
开发者ID:nishu0f0,项目名称:PICProjects,代码行数:59,
示例7: delay_1Sxvoid delay_1Sx(int n){ for(int i =0; i<n; i++){ Delay10KTCYx(250); // Delay 2,500,000 Cycles = 0.25 seconds Delay10KTCYx(250); // Delay 2,500,000 Cycles = 0.25 seconds Delay10KTCYx(250); // Delay 2,500,000 Cycles = 0.25 seconds Delay10KTCYx(250); // Delay 2,500,000 Cycles = 0.25 seconds }}
开发者ID:NGenetzky,项目名称:pic18_c,代码行数:8,
示例8: mainvoid main(void) { unsigned char slave7bitAddr = 0x2A; //7-bit address of Slave. MSB=Don't care. unsigned char slaveAddrWrite = (slave7bitAddr << 1); //LSB=0, Master Write request. signed char writeStat; unsigned char message[11] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'}; OSCCONbits.IRCF = 0b111; //Set internal oscillator to 16mHz //Must set SCL(pin RC3)and SDA(pin RC4) as inputs and enable digital buffers. TRISCbits.TRISC3 = 1; //set input TRISCbits.TRISC4 = 1; ANSELCbits.ANSC3 = 0; //enable digital buffer ANSELCbits.ANSC4 = 0; OpenI2C1(MASTER, SLEW_OFF); //If you switch to 400kHz (see below) set SLEW_ON /* You can ignore all I2C "unable to resolve identifier" errors assuming you didn't make any typos. Don't forget the "1"'s. */ /* Now set the I2C clock speed. I2C Master always controls clock. For 400kHz use 1k pullup resistors and for 100kHz use 2.2k ohms */ SSP1ADD = 0x27; //100Khz = FOSC/(4 * (SSPADD + 1)) = 16E6/((39 + 1) * 4)note:39=0x27 //SSP1ADD = 0x09; //400Khz = FOSC/(4 * (SSPADD + 1)) = 16E6/((9 + 1) * 4) while (1) { IdleI2C1(); //Wait for bus to become idle. StartI2C1(); //Begin I2C communication IdleI2C1(); //send slave address (w/write request bit) and wait for slave to reply. do { writeStat = WriteI2C1(slaveAddrWrite); //Send address with LSB=Write if (writeStat == -1) { //Detected bus collision - More than one master? unsigned char data = SSP1BUF; //clear the buffer by reading it. SSPCON1bits.WCOL = 0; //clear the bus collision status bit } else if (writeStat == -2) { //NACK (no acknowledge rx'd) //Is the slave on and ready? Did we send the correct address? } } while (writeStat != 0); //Keep repeating until slave acknowledges. //Slave has Ack'd so we can send our Hello World message now. for (int x = 0; x <= 10; x++) { do { writeStat = (WriteI2C1(message[x])); if (writeStat == -2) { //NACK (no acknowledge rx'd) //Is the slave on and ready? Using the correct pullups? } } while (writeStat != 0); //Keep repeating until slave acknowledges. } IdleI2C1(); StopI2C1(); //Delay about 1 sec and then repeat. 1sec = ((10K*200*2)/(16E6/4) Delay10KTCYx(200); Delay10KTCYx(200); }}
开发者ID:VinnieM-3,项目名称:PIC_Controller_MPLABX_XC8,代码行数:58,
示例9: main/* * MAIN */int main(int argc, char** argv) { // RA1 as DO LATA = 0; ADCON1 = 0x06; TRISA1 = 0; LATA1 = 1; // I2C configuration i2c_setup(); unsigned char w; for(w=0;w<20;w++) I2C_Recv[w]=0; unsigned int temps = 25; unsigned char temp, length=0; while(1){ LATA1 = ~LATA1; Delay10KTCYx(temps); check_interruptions(); if (DataRdyI2C()==1) { temps += 25; temp = ReadI2C(); //********************* Data reception from master by slave ********************* do { while(DataRdyI2C()==0); // WAIT UNTILL THE DATA IS TRANSMITTED FROM master I2C_Recv[length++]=getcI2C(); // save byte received } while(length!=20); } } //******************** write sequence from slave ******************************* while(SSPSTATbits.S!=1); //wait untill STOP CONDITION //********************* Read the address sent by master from buffer ************** while(DataRdyI2C()==0); //WAIT UNTILL THE DATA IS TRANSMITTED FROM master temp = ReadI2C(); //********************* Slave transmission ************************************ if(SSPSTAT & 0x04) //check if master is ready for reception while(putsI2C(I2C_Send)); // send the data to master //-------------TERMINATE COMMUNICATION FROM MASTER SIDE--------------- CloseI2C(); //close I2C module while(1) { LATA1 = ~LATA1; Delay10KTCYx(100); }; //End of program return (EXIT_SUCCESS);}
开发者ID:gntoni,项目名称:projectM,代码行数:58,
示例10: msg_inicialvoid msg_inicial(){ printf("Kit de Desenvolvimento ACEPIC 28/r/n"); Delay10KTCYx(1); //Gera um delay de 5ms printf("Microcontrolador: PIC 18F2550/r/n"); Delay10KTCYx(1); //Gera um delay de 5ms printf("/r/n-Envie AD0 para retornar Conversao A/D do Canal 0./r/n"); Delay10KTCYx(1); //Gera um delay de 5ms printf("-Envie TMP para retornar Conversao A/D do Canal 3. (Temperatura)/r/n/r/n");}
开发者ID:coneggo,项目名称:microchip,代码行数:11,
示例11: eventL// LED indicator void eventL(void){ LED = 1; Delay10KTCYx(10); LED = 0; Delay10KTCYx(10); LED = 1; Delay10KTCYx(10); LED = 0; Delay10KTCYx(10);}
开发者ID:ajitjadhav28,项目名称:StudyTable,代码行数:12,
示例12: DelaySvoid DelayS(unsigned long seconds){ unsigned long count; for(count = 0; count < seconds; count++) { Delay10KTCYx(250); Delay10KTCYx(250); Delay10KTCYx(250); Delay10KTCYx(250); }}
开发者ID:sfinucane,项目名称:Introduction-to-Microprocessors,代码行数:12,
示例13: mainvoid main(void){ int count = 0; char buffer[20]; OSCCON = OSCCON_VALUE; // Sets 16MHz modemSetup(); aprsMakeCallsignPgm(&(s_packet.to), APRS_ADDRESS_TEST, APRS_DESTINATION_SSID_NONE); aprsMakeCallsignPgm(&(s_packet.from), "M0RJC", 9); aprsSetLastAddress(&(s_packet.from)); while(1) { modemTxMode(); modemStartTone(0); Delay10KTCYx(0); // 2,560,000 cycles * 4MHz modemStartTone(1); Delay10KTCYx(0); // 2,560,000 cycles * 4MHz strcpypgm2ram(s_packet.message, ">Test Message from M0RJC tracker project"); aprsSendPacket(&s_packet); Delay10KTCYx(0); // 2,560,000 cycles * 4MHz Delay10KTCYx(0); // 2,560,000 cycles * 4MHz Delay10KTCYx(0); // 2,560,000 cycles * 4MHz strcpypgm2ram(s_packet.message, ":M0RJC :If you can read this it works. "); itoa(count++, buffer); strcat(s_packet.message, buffer); aprsSendPacket(&s_packet); Delay10KTCYx(0); // 2,560,000 cycles * 4MHz Delay10KTCYx(0); // 2,560,000 cycles * 4MHz Delay10KTCYx(0); // 2,560,000 cycles * 4MHz strcpypgm2ram(s_packet.message, ":M0RJC :Message Again. "); itoa(count++, buffer); strcat(s_packet.message, buffer); aprsSendPacket(&s_packet); modemRxMode(); Delay10KTCYx(0); // 2,560,000 cycles * 4MHz Delay10KTCYx(0); // 2,560,000 cycles * 4MHz } }
开发者ID:m0rjc,项目名称:M0RJCTracker,代码行数:52,
示例14: tracking_profondeurvoid tracking_profondeur(int vitesse) { int i = 0 ; Sens_Profondeur = !sens_rotation_profondeur ; Enable_Profondeur = 1 ; for(i=0;i<nb_pas_profondeur;i++) { Clock_Profondeur = 0; Delay10KTCYx(vitesse); Clock_Profondeur = 1; Delay10KTCYx(vitesse); if (sens_rotation_profondeur==SENS_HOR) position_moteur_profondeur ++ ; else if (sens_rotation_profondeur==SENS_TRIGO) position_moteur_profondeur -- ; }}
开发者ID:elfekih,项目名称:insa-projet-drone,代码行数:13,
示例15: tracking_azimutvoid tracking_azimut(int vitesse) { int i = 0 ; Sens_Azimut = sens_rotation_azimut ; Enable_Azimut = 1 ; for(i=0;i<nb_pas_azimut;i++) { Clock_Azimut = 0; Delay10KTCYx(vitesse); Clock_Azimut = 1; Delay10KTCYx(vitesse); if (sens_rotation_azimut==SENS_HOR) position_moteur_azimut ++ ; else if (sens_rotation_azimut==SENS_TRIGO) position_moteur_azimut -- ; }}
开发者ID:elfekih,项目名称:insa-projet-drone,代码行数:13,
示例16: mainvoid main(void){ ADCON1 = 7; TRISAbits.TRISA0 = 0; while (1) { led = 1; Delay10KTCYx(50); led = 0; Delay10KTCYx(50); }}
开发者ID:dbortolini,项目名称:vscp_firmware,代码行数:13,
示例17: rtcInitvoid rtcInit(void){ StartI2C(); WriteI2C(0xD0); WriteI2C(0x00); WriteI2C(0x80); //CH = 1 Stop oscillator WriteI2C(0x48); //Minute WriteI2C(0x16); //Hour WriteI2C(0x03); //Tuesday WriteI2C(0x14); //14 WriteI2C(0x03); //March WriteI2C(0x17); //2017 StopI2C(); //Stop the I2C Protocol Delay10KTCYx(250); Delay10KTCYx(250); Delay10KTCYx(250); Delay10KTCYx(250); //Have to start the Clock again StartI2C(); WriteI2C(0xD0); WriteI2C(0x00); WriteI2C(0x00); //start Clock and set the second hand to Zero StopI2C(); Delay10KTCYx(250); Delay10KTCYx(250); Delay10KTCYx(250); Delay10KTCYx(250);}
开发者ID:bigodeg3,项目名称:Firmware,代码行数:28,
示例18: delaysvoid delays(int x){ if (MNML){ for(x;x>0;x--){ Delay10KTCYx(100); Delay10KTCYx(100); Delay10KTCYx(50); } } else{ for(x;x>0;x--){ Delay10KTCYx(100); } }}
开发者ID:House-of-Faintree,项目名称:jousting-tournament,代码行数:14,
示例19: mainvoid main(void){ unsigned int a; char *ptr; char str[3] = "LCD"; char str2[] = "MPLAB C18"; TRISD = 0x00; while(1) { Lcd_Clear(); Lcd_Set_Cursor(1,1); ptr = &str[0]; Lcd_Write_String(ptr); Lcd_Set_Cursor(2,1); ptr = &str2[0]; Lcd_Write_String(ptr); Delay10KTCYx(200); Lcd_Clear(); Lcd_Set_Cursor(1,1); Lcd_Write_String("Developed By"); Lcd_Set_Cursor(2,1); Lcd_Write_String("Faintree"); Delay10KTCYx(200); Lcd_Clear(); Lcd_Set_Cursor(1,1); Lcd_Write_String("something"); for(a=0; a<15; a++) { Delay10KTCYx(30); Lcd_Shift_Left(); } for(a=0; a<15; a++) { Delay10KTCYx(30); Lcd_Shift_Right(); } Lcd_Clear(); Lcd_Set_Cursor(2,1); Lcd_Write_Char('e'); Lcd_Write_Char('S'); Delay10KTCYx(300); }}
开发者ID:House-of-Faintree,项目名称:jousting-tournament,代码行数:48,
示例20: menuchar menu(void){ static unsigned char position = 0; unsigned char item = 0; unsigned char i; while (1) { if (position == MENU_LENGTH) position = 0; for (i = 0; i < LCD_LINES; i++) { lcd_goto(i + 1, 1); item = (position + i > MENU_LENGTH - 1) ? 0 : position + i; if (i == 0) lcd_write_pgm("/002"); else lcd_write_pgm(" "); lcd_write_pgm(menu_items[item]); } position++; while (PORTEbits.RE2 == 1); Delay10KTCYx(255); } return 0;}
开发者ID:armandas,项目名称:Small-Scale-Biofuel-Production,代码行数:30,
示例21: DelayMSvoid DelayMS(unsigned long milliseconds){ unsigned long count; for(count = 0; count < milliseconds; count++) Delay10KTCYx(1);}
开发者ID:sfinucane,项目名称:Introduction-to-Microprocessors,代码行数:7,
示例22: blink// Blink mode for testingvoid blink(void){ LEDA = 0; LEDB = 1; LEDC = 0; LEDD = 1; RA =0; RB =1; RC =0; RD =1; RE =0; RF =1; while(1){ LEDA ^= 1; LEDB ^= 1; LEDC ^= 1; LEDD ^= 1; RA ^= 1; RB ^= 1; RC ^= 1; RD ^= 1; RE ^= 1; RF ^= 1; Delay10KTCYx(100); } // End added loop}
开发者ID:sjstolze,项目名称:LunaBot,代码行数:28,
示例23: mainvoid main(){ADCON1 = 0xFF; //Faz todos os canais ADTRISA = 0x01; //Faz somente o pino RA0 como entrada e o restante como saída TRISB = 0x00; //Faz toda a porta B como saídaTRISC = 0x00; //Faz toda a porta A como saídaPORTB = 0x00; //Zera toda a porta BT0CON = 0b11000100; /*Configura o Registrador T0CON TMR0ON = 1 -> Habilita o TIMER 0 T08BIT = 1 -> TIMER 0 no modo 8 bits T0CS = 0 -> Incremento pelo ciclo de máquina ...0,5us para o cristal de 8MHz. T0SE = 0 -> Incremento na orda de subida. PSA = 0 -> Prescale aplicado ao Timer 0 PS2 = 1, PS1 = 0 e PS0 = 0 -> Prescale = 1:32*/INTCON = 0b10100000; /*Configura o registrador INTCON GIE = 1 (bit7) -> Habilita a interrup C++ Delay1KTCYx函数代码示例 C++ DelObject函数代码示例
|