Lcd_Chr(2,9,48+ch) // Write result in ASCII formatĬh = (tlong / 100) % 10 // Extract hundreds of millivolts Tlong = (long)adc_rd * 5000 // Convert the result in millivolts Lcd_Out(2,1,text) // Write result in the second line Text = "voltage:" // Define the third messageĪdc_rd = ADC_Read(2) // A/D conversion. TRISA = 0xFF // All port A pins are configured as inputs Lcd_Out(2,1,text) // Define the first messageĪDCON1 = 0x82 // A/D voltage reference is VCC Text = "LCD example" // Define the second message Lcd_Out(1,1,text) // Write the first message in the first line Text = "mikroElektronika" // Define the first message Lcd_Cmd(_LCD_CLEAR) // LCD command (clear LCD) Lcd_Cmd(_LCD_CURSOR_OFF) // LCD command (cursor off) Unsigned int adc_rd // Declare variablesĪNSEL = 0x04 // Pin RA2 is configured as an analog inputĪNSELH = 0 // Rest of pins are configured as digital Make: *** Error 1īUILD FAILED (exit value 2, total time: 22s) Lcdpic16.c:55: warning: function declared implicit int Lcdpic16.c:54: warning: function declared implicit int Lcdpic16.c:48: warning: function declared implicit int Lcdpic16.c:45: warning: illegal conversion between pointer types Lcdpic16.c:43: warning: function declared implicit int Lcdpic16.c:38: warning: illegal conversion between pointer types Lcdpic16.c:37: warning: function declared implicit int Pointer to const unsigned char -> pointer to unsigned char Lcdpic16.c:36: warning: illegal conversion between pointer types Lcdpic16.c:34: error: undefined identifier "_LCD_CLEAR" Lcdpic16.c:33: error: undefined identifier "_LCD_CURSOR_OFF" Lcdpic16.c:33: warning: function declared implicit int I'm trying to understand this LCD example on Pic16F887 īut the compiler keeps showing me errors: lcdpic16.c:32: warning: function declared implicit int
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |