CCS C Archives - electroSome https://electrosome.com/topic-tag/ccs-c-3/ You Inspire.....We Create..... Tue, 09 Dec 2014 07:00:24 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 PIC C Compiler and HC-SR04 Ultrasonic Sensor https://electrosome.com/topic/picc-compilier-ultrasonic-sensor/ Mon, 08 Dec 2014 14:09:32 +0000 https://electrosome.com/topic/picc-compilier-ultrasonic-sensor/ What is wrong. The below code. Please help me. #include "C:\Users\enhee\Documents\lcd16f873a.h" #define use_portb_lcd TRUE #include <LCD.C> #byte timer1=0x10 #bit  trigger=0x07.2 #bit  echo=0x07.1 #bit on_off=0x10.0 unsigned char zai=12; void main() { float a; set_tris_c(0x02); timer1=0x10; setup_adc_ports(NO_ANALOGS); setup_adc(ADC_OFF); 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); lcd_init(); lcd_gotoxy(1,1); printf(lcd_putc,"zai medregch"); for(;;) { set_timer1(0x0000); trigger=1; delay_us(10); trigger=0; while(!echo);      […]

The post PIC C Compiler and HC-SR04 Ultrasonic Sensor appeared first on electroSome.

]]>