Hello everyone. I'm new to programming with Mikro C and I'm trying to write code for a PIC16F877A that will operate a dog feeder.
This is just the beginning of my code, but I believe from the errors I'm receiving if I solve it the rest of my code will work. Here are the error messages
36 315 Invalid expression dog_feedtest.c
34 402 ; expected, but 'int' found dog_feedtest.c
36 424 '}' expected ';' found dog_feedtest.c
Also I have one more error which I don't understand.
80 371 Specifier needed dog_feedtest.c
What does "Specifier needed" mean? I know this is not the best place to post this question, but I've already posted on mikro C forum and it's taking wayyy too long for a response so I'm trying to get help as quick as possible, from anywhere possible. So your help would be greatly appreciated!
Rich (BB code):
unsigned short kp, cnt, firstdigit = 0, seconddigit = 0;
int secs = 0;
char txt[6];
// Keypad module connections
char keypadPort at PORTD;
// End Keypad module connections
// LCD module connections
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
void main() {
TRISC = 0xFF; //PORT C IS INPUT FROM INFRARED SENSOR
TRISA = 0x00; // PORT A IS OUTPUT TO MOTOR
cnt = 0; // Reset counter
Keypad_Init(); // Initialize Keypad
Lcd_Init(); // Initialize Lcd
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF);; // Cursor off
int hr = 12, min = 0, time_enter = 0, a = 0;
int feed_hour[5], feed_min[5], am_pm[5], clock_ampm[1];
36 315 Invalid expression dog_feedtest.c
34 402 ; expected, but 'int' found dog_feedtest.c
36 424 '}' expected ';' found dog_feedtest.c
Also I have one more error which I don't understand.
80 371 Specifier needed dog_feedtest.c
What does "Specifier needed" mean? I know this is not the best place to post this question, but I've already posted on mikro C forum and it's taking wayyy too long for a response so I'm trying to get help as quick as possible, from anywhere possible. So your help would be greatly appreciated!