- Joined Mar 13, 2009
I am working in a project pretty simple, what it does it is to take analog signal through ADC channel 0 from PIC16F676, and the result to be displayed in a LCD HITACHI44780. However Mikrobasic keeps telling me it is not possible, i get the error, Incompatible types ("complex type" to "simple type"). Any clues what am i doing wrong?
Rich (BB code):
program Fifth_Funct ' Lcd module connections dim LCD_RS as sbit at RC4_bit LCD_EN as sbit at RC5_bit LCD_D4 as sbit at RC0_bit LCD_D5 as sbit at RC1_bit LCD_D6 as sbit at RC2_bit LCD_D7 as sbit at RC3_bit LCD_RS_Direction as sbit at TRISC4_bit LCD_EN_Direction as sbit at TRISC5_bit LCD_D4_Direction as sbit at TRISC0_bit LCD_D5_Direction as sbit at TRISC1_bit LCD_D6_Direction as sbit at TRISC2_bit LCD_D7_Direction as sbit at TRISC3_bit ' End LCD module connections dim adc_rd as word main: CMCON = 7 'Comparators turned off ADCON0= %00000011 'AN0 turned on ADCON1= %00000000 trisa0_bit=1 ADCON0= 0 ADCON1= 0 ANSEL=0 Trisc=0 while (true) adc_rd = ADC_read(0) Lcd_init() Lcd_Out(1,1,adc_rd) wend end.