本文整理汇总了C++中output_low函数的典型用法代码示例。如果您正苦于以下问题:C++ output_low函数的具体用法?C++ output_low怎么用?C++ output_low使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了output_low函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main(void) {
// initialize the direction of PORTD #6 to be an output
set_output(DDRC, LED1);
set_output(DDRC, LED2);
set_output(DDRC, LED3);
set_output(DDRD, LED4);
while (1) {
output_high(PORTC, LED1);
delay_ms(200);
output_high(PORTC, LED2);
delay_ms(200);
output_high(PORTC, LED3);
delay_ms(200);
output_high(PORTD, LED4);
delay_ms(200);
output_low(PORTC, LED1);
delay_ms(200);
output_low(PORTC, LED2);
delay_ms(200);
output_low(PORTC, LED3);
delay_ms(200);
output_low(PORTD, LED4);
delay_ms(200);
}
}
开发者ID:markbradley27,项目名称:POVbee,代码行数:27,代码来源:BlinkTest.c
示例2: glcd_init
// Purpose: Initialize a graphic LCD. This must be called before any
// other glcd function is used.
// Inputs: The initialization mode
// OFF - Turns the LCD off
// ON - Turns the LCD on
// Date: 5/28/2003
void glcd_init(int1 mode)
{
// Initialze some pins
output_HIGH(GLCD_RST);
output_low(GLCD_E);
output_low(GLCD_CS1);
output_low(GLCD_CS2);
output_low(GLCD_DI); // Set for instruction
glcd_writeByte(GLCD_CS1, 0xC0); // Specify first RAM line at the top
glcd_writeByte(GLCD_CS2, 0xC0); // of the screen
glcd_writeByte(GLCD_CS1, 0x40); // Set the column address to 0
glcd_writeByte(GLCD_CS2, 0x40);
glcd_writeByte(GLCD_CS1, 0xB8); // Set the page address to 0
glcd_writeByte(GLCD_CS2, 0xB8);
if(mode == ON)
{
glcd_writeByte(GLCD_CS1, 0x3F); // Turn the display on
glcd_writeByte(GLCD_CS2, 0x3F);
}
else
{
glcd_writeByte(GLCD_CS1, 0x3E); // Turn the display off
glcd_writeByte(GLCD_CS2, 0x3E);
}
glcd_fillScreen(OFF); // Clear the display
}
开发者ID:castro732,项目名称:X-Weather,代码行数:34,代码来源:GLCD.C
示例3: read_analog
int16 read_analog(int channel)
{
int i;
channel &= 0x1F;
delay_us(2); // 2 usec delay
output_high(MPH_CLK); // activates SCLK
output_high(MPH_SYNC); // activetes SYNC
delay_us(1); // 1 usec delay
output_low(MPH_SYNC); // resets SYNC
for(i=8; i>0; i--)
{
if ((channel & (1<<(i-1)))==0)
output_low(MPH_DIN);
else
output_high(MPH_DIN);
output_low(MPH_CLK); // resets SCLK
output_high(MPH_CLK); // activates SCLK
}
delay_us(50); // 50 usec delay to stabilize the value.
return (read_adc()); // reads the analog channel, waits for end of conversion
// and returns the value.
}
开发者ID:robotology-legacy,项目名称:yarp1,代码行数:26,代码来源:TestMPH.c
示例4: motor_off
void motor_off(){
output_low(PIN_A1);
delay_ms(100);
output_low(PIN_A2);
output_low(PIN_A3);
output_low(PIN_A4);
}
开发者ID:normansaez,项目名称:PIC,代码行数:7,代码来源:CodigoPIC.c
示例5: giro_izquierda50
void giro_izquierda50() {
output_high(PIN_B4);
output_low(PIN_B5);
output_low(PIN_B6);
output_high(PIN_B7);
delay_ms( time );
output_low(PIN_B4);
output_low(PIN_B5);
output_low(PIN_B6);
output_high(PIN_B7);
delay_ms( time );
output_low(PIN_B4);
output_low(PIN_B5);
output_high(PIN_B6);
output_high(PIN_B7);
delay_ms( time );
output_low(PIN_B4);
output_low(PIN_B5);
output_high(PIN_B6);
output_low(PIN_B7);
delay_ms( time );
}
开发者ID:camilonova,项目名称:Brazo-controlado,代码行数:25,代码来源:pacho.c
示例6: glcd_image
void glcd_image(long mempointer /*This is the image location in program memory*/)
{ int j, i;
int page = 0xB8;
char chipsel;
char buffer[1];
output_low(GLCD_DI); // Set for instruction
glcd_writeByte(GLCD_CS1, 0x40); // Set the column address to 0
glcd_writeByte(GLCD_CS2, 0x40);
glcd_writeByte(GLCD_CS1, page); // Set the page address to 0
glcd_writeByte(GLCD_CS2, page);
for (j = 0; j < 8; j++, page+=1)
{ output_low(GLCD_DI);
glcd_writeByte(GLCD_CS1, page);
glcd_writeByte(GLCD_CS2, page);
for (i = 0; i < 128; i++)
{
if ( i < 64)
{
chipsel = GLCD_CS1;
}
else
{
chipsel = GLCD_CS2;
}
read_program_memory(mempointer, buffer, 1);
mempointer++;
output_high(GLCD_DI);
glcd_writeByte(chipsel, *buffer);
}
}
}
开发者ID:castro732,项目名称:X-Weather,代码行数:31,代码来源:show.c
示例7: WriteFSKbyte
void WriteFSKbyte(int8 DATA)
{
int8 RGIT = 0;
int16 temp = 0xB800;
output_float(_SDO);
output_low(_SCK);
temp|= DATA;
Loop: SCK = false;
RF_EN = false;
output_low(_SDA);
SCK = true;
RGIT = (SDO==true); //Polling SDO
SCK = false;
output_high(_SDA);
RF_EN = true;
if (RGIT==0){
goto Loop;
} else {
RGIT=false;
WriteCMD(temp);
}
}
开发者ID:robertctrescott,项目名称:open-source,代码行数:27,代码来源:radio.c
示例8: write_default_param_file
void write_default_param_file() {
/* all LEDs for 1.5 seconds */
#if 0
timers.led_on_a=150;
timers.led_on_b=150;
timers.led_on_c=150;
timers.led_on_d=150;
#else
output_high(LED_A);
output_high(LED_B);
output_high(LED_C);
output_high(LED_D);
delay_ms(1500);
output_low(LED_A);
output_low(LED_B);
output_low(LED_C);
output_low(LED_D);
#endif
set_config();
/* write them so next time we use from EEPROM */
write_param_file();
}
开发者ID:aprsworld,项目名称:tsTSelector,代码行数:25,代码来源:param_tsTselector.c
示例9: set_pot
set_pot (int pot_num, int new_value) {
byte i;
byte cmd[3];
if (pot_num >= NUM_POTS)
return;
pots[pot_num] = new_value;
cmd[0]=pots[0];
cmd[1]=pots[1];
cmd[2]=0;
for(i=1;i<=7;i++)
shift_left(cmd,3,0);
output_high(RST1);
delay_us(2);
for(i=1;i<=17;i++) {
output_bit(DI, shift_left(cmd,3,0));
delay_us(2);
output_high(CLK);
delay_us(2);
if(i==17)
output_low(RST1);
output_low(CLK);
delay_us(2);
}
}
开发者ID:carriercomm,项目名称:robots,代码行数:30,代码来源:DS1868.C
示例10: main
void main()
{
setup_oscillator(OSC_NORMAL);
while (true)
{
output_A(0xff);
output_B(0xff);
output_C(0xff);
output_D(0xff);
output_E(0xff);
output_high(pin_C1);
output_high(pin_C0);
output_high(pin_A4);
Delay_ms(500);
output_A(0x0);
output_B(0x0);
output_C(0x0);
output_D(0x0);
output_E(0x0);
output_low(pin_C1);
output_low(pin_C0);
output_low(pin_A4);
Delay_ms(500);
}
}
开发者ID:yasuravithana,项目名称:PassTune_Hardware,代码行数:32,代码来源:test+with+internal+clock.c
示例11: write_dac
void write_dac(int16 data) {
BYTE cmd[3];
BYTE i;
cmd[0]=data;
cmd[1]=(data>>8);
cmd[2]=0x03;
output_high(DAC_LDAC);
output_low(DAC_CLK);
output_low(DAC_CS);
for(i=0; i<=23; ++i)
{
if(i<4 || (i>7 && i<12))
shift_left(cmd,3,0);
else
{
output_bit(DAC_DI, shift_left(cmd,3,0));
output_high(DAC_CLK);
output_low(DAC_CLK);
}
}
output_high(DAC_CS);
output_low(DAC_LDAC);
delay_us(10);
output_HIGH(DAC_LDAC);
}
开发者ID:Bellspringsteen,项目名称:Hybrid,代码行数:31,代码来源:mcp4921.c
示例12: RTCC_isr
void RTCC_isr() //function interrupción TMR0
{ set_TIMER0(5); //inicializa el timer0 para que cuente 0.2 us
output_toggle(PIN_B2);
set_TIMER0(5); //inicializa el timer0 para que cuente 0.2 us
cont++;
//Giro en un sentido
if(input(PIN_B0)==1){
if ((int16)cont==(int16)10){ cont=0;
output_high(PIN_B3);}
if((int16)comp1==(int16)cont){
output_low(PIN_B3);}
}
if (input(PIN_B0)==0)
output_low(PIN_B3);
//--------------Giro opuesto----------------
if(input(PIN_B1)==1){
if ((int16)cont==(int16)10){ cont=0;
output_high(PIN_B4);}
if((int16)comp1==(int16)cont){
output_low(PIN_B4);}
}
if (input(PIN_B1)==0)
output_low(PIN_B4);
}
开发者ID:JOTAI,项目名称:SistemasEmbebidos2014-I,代码行数:25,代码来源:PWM_Timer.c
示例13: init_ADNS2051
//-----------------------------------------------------------------------
// init_ADNS2051()
//-----------------------------------------------------------------------
//
void init_ADNS2051() {
int i;
// Initialisation
setup_timer_1(T1_INTERNAL | T1_DIV_BY_8);
posX = 0;
posY = 0;
DeltaX = 0;
DeltaY = 0;
teller = 0;
teller1 = 0;
for(i=0;i<DELTA_LOG_SIZE;i++){
lastX[i] = 0;
lastY[i] = 0;
}
// Init ADNS-2051 pins
output_high(SDIO);
output_high(SCLK);
output_low(PD);
delay_ms(2);
// Resync
output_high(PD);
delay_ms(2);
output_low(PD);
}
开发者ID:carriercomm,项目名称:robots,代码行数:35,代码来源:ADNS2051.c
示例14: stop
void stop(void)
{
output_low(PORTB,PB2);
output_low(PORTB,PB1);
output_low(PORTB,PB4);
BUZZER_ON = 0;
}
开发者ID:bugariu-catalin,项目名称:Notification-System,代码行数:7,代码来源:firmware.c
示例15: LEDTest4
void LEDTest4()
{
int I_B, I_B2, value;
for(I_B2 = 0; I_B2 < 2; I_B2++){
value = 1;
for (I_B = 0; I_B < 8; I_B++){
if (I_B % 2 == 0){
Portout(value, 0);
output_low (Ledb_p);
output_high (Ledm_p);
output_high (Ledt_p);
delay_ms (200);
}
else{
Portout(0, value);
output_high (Ledb_p);
output_high (Ledm_p);
output_low (Ledt_p);
delay_ms (200);
}
value = (value*2) + 1;
}
}
}
开发者ID:BlacKRoxX,项目名称:Trinity-Software,代码行数:25,代码来源:PIC18F45K22_V0_6.c
示例16: LCD_Initialization
void LCD_Initialization()
{
output_low(LCD_CE);
output_low(LCD_RS);
output_low(LCD_RW);
output_d(0);
output_d(0x38);
output_high(LCD_CE);
Nop();
Nop();
output_low(LCD_CE);
delay_ms(20);
output_d(0x38);
output_high(LCD_CE);
Nop();
Nop();
output_low(LCD_CE);
delay_ms(5);
LCD_Cmd(DISPLAY_ON); // display on, curse off, blink off
LCD_Cmd(0x01); // display on, curse off, blink off
LCD_Cmd(0x06); // LCD clear, curse home
LCD_Cmd(0x80); // initial DDRAM address
LCD_Cmd(0x01); // LCD clear,curse home
}
开发者ID:eunwho,项目名称:lcdConverter,代码行数:31,代码来源:LCD.C
示例17: LEDTest5
void LEDTest5()
{
int I_B, I_B2, top, bottom;
for(I_B2 = 0; I_B2 < 2; I_B2++){
top = 192;
bottom = 3;
for (I_B = 0; I_B < 6; I_B++){
if (I_B % 2 == 0){
Portout(top, bottom);
output_low (Ledb_p);
output_low (Ledm_p);
output_low (Ledt_p);
delay_ms (200);
}
else{
Portout(bottom, top);
output_high (Ledb_p);
output_high (Ledm_p);
output_high (Ledt_p);
delay_ms (200);
}
top = top/2;
bottom = bottom *2;
}
}
}
开发者ID:BlacKRoxX,项目名称:Trinity-Software,代码行数:26,代码来源:PIC18F45K22_V0_6.c
示例18: motors_init
inline void motors_init (void) {
set_output(MOTOR0_DDR, MOTOR0_STEP_DD);
set_output(MOTOR0_DDR, MOTOR0_DIR_DD);
output_low(MOTOR0_PORT, MOTOR0_STEP);
output_low(MOTOR0_PORT, MOTOR0_DIR);
set_output(MOTOR1_DDR, MOTOR1_STEP_DD);
set_output(MOTOR1_DDR, MOTOR1_DIR_DD);
output_low(MOTOR1_PORT, MOTOR1_STEP);
output_low(MOTOR1_PORT, MOTOR1_DIR);
set_output(MOTOR2_DDR, MOTOR2_STEP_DD);
set_output(MOTOR2_DDR, MOTOR2_DIR_DD);
output_low(MOTOR2_PORT, MOTOR2_STEP);
output_low(MOTOR2_PORT, MOTOR2_DIR);
set_output(MOTOR3_DDR, MOTOR3_STEP_DD);
set_output(MOTOR3_DDR, MOTOR3_DIR_DD);
output_low(MOTOR3_PORT, MOTOR3_STEP);
output_low(MOTOR3_PORT, MOTOR3_DIR);
set_output(MOTOR4_DDR, MOTOR4_STEP_DD);
set_output(MOTOR4_DDR, MOTOR4_DIR_DD);
output_low(MOTOR4_PORT, MOTOR4_STEP);
output_low(MOTOR4_PORT, MOTOR4_DIR);
return;
}
开发者ID:rxdtxd,项目名称:stepper-lights,代码行数:28,代码来源:main.c
示例19: RF12_RDFIFO
int8 RF12_RDFIFO()
{
int8 i,Result;
output_low(_SCK);
output_low(_SDA);
RF_EN = false;
for (i=0; i<16; i++) { //skip status bits
SCK = true;
SCK = true;
SCK = false;
}
Result = 0;
for (i=0; i<8; i++) { //read fifo data byte
Result<<=1;
if (SDO){
Result|=1;
}
SCK = true;
SCK = true;
SCK = false;
}
RF_EN = true;
return(Result);
}
开发者ID:robertctrescott,项目名称:open-source,代码行数:31,代码来源:radio.c
示例20: main
void main()
{
setup_adc_ports(ALL_ANALOG);
setup_adc(ADC_CLOCK_INTERNAL);
setup_psp(PSP_DISABLED);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
// TODO: USER CODE!!
set_adc_channel(0); // set ref valus
delay_ms(100);
ref_0 =read_adc();
delay_ms(100);
set_adc_channel(3); // set ref valus
delay_ms(100);
ref_3 =read_adc();
delay_ms(100);
output_b(0b11111111);
delay_ms(700);
output_b(0);
while(1){
set_adc_channel(0);
delay_ms(20); // take readings
adc_val_0 =read_adc();
delay_ms(20);
if(adc_val_0 > ref_0+cons){
l_0 =1;
output_high(pin_d7);
delay_ms(500);
}
else{
l_0=0;
output_low(pin_d7);
// delay_ms(500);
}
set_adc_channel(3);
delay_ms(20); // take readings
adc_val_3 =read_adc();
delay_ms(20);
if(adc_val_3> ref_3+cons){
l_3 =1;
output_high(pin_d6);
delay_ms(500);
}
else{
l_3=0;
output_low(pin_d6);
}
}
}
开发者ID:isurusanjeewa,项目名称:Line-Following-Robot,代码行数:60,代码来源:2_sen.c
注:本文中的output_low函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论