PR29 programming

LED Blinking, Walking with Cytron Servo, Displaying RFID, Multi-function Mobile Robot......

Re: PR29 programming

Postby Suria » Fri Jan 06, 2012 10:23 pm

tried it and got that result. >.> what now? need help
Suria
Novice
 
Posts: 24
Joined: Sat Dec 31, 2011 11:21 am

Re: PR29 programming

Postby ABSF » Fri Jan 06, 2012 10:38 pm

Suria WROTE:tried it and got that result. >.> what now? need help


Your screen is saying that it can't find the file "uart_io.h" or this file is missing in the "header" folder :roll:

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: PR29 programming

Postby ABSF » Fri Jan 06, 2012 10:57 pm

Why did you change #include "uart_io.h" to #include <uart_io.h>

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: PR29 programming

Postby Suria » Sat Jan 07, 2012 11:03 am

thanks Allen.. now my programming code got many error.

CODE: SELECT_ALL_CODE
while(mode_enter==0 && admin ==1 && usertype_enter==1)
{
   if ((!Button_1))                                     
   {
      while((!Button_1));                              
      if (mode_count<6);                              
      mode_count++;                                    
      else
      mode_count=1;                                    
   }


it's in correct order right?

my errors so far


Build C:\Users\nazirah\Desktop\Test\Test1 for device 16F876A
Using driver C:\Program Files\HI-TECH Software\PICC\9.80\bin\picc.exe

Make: The target "C:\Users\nazirah\Desktop\Test\Test1.p1" is out of date.
Executing: "C:\Program Files\HI-TECH Software\PICC\9.80\bin\picc.exe" --pass1 C:\Users\nazirah\Desktop\Test\Test1.c -q --chip=16F876A -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [194] C:\Users\nazirah\Desktop\Test\Test1.c; 5.11 ")" expected
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 98.1 undefined identifier "SPBRF"
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 104.6 undefined identifier "Button_1"
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 104.20 undefined identifier "Button_2"
Error [194] C:\Users\nazirah\Desktop\Test\Test1.c; 105.1 ")" expected
Error [248] C:\Users\nazirah\Desktop\Test\Test1.c; 161.1 inappropriate "else"
Error [248] C:\Users\nazirah\Desktop\Test\Test1.c; 169.1 inappropriate "else"
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 172.12 undefined identifier "Button_3"
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 174.17 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 229.1 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 235.1 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 241.1 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 247.1 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 253.1 expression syntax
Error [314] C:\Users\nazirah\Desktop\Test\Test1.c; 269.1 ";" expected
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 271.1 undefined identifier "PORT_B"
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 271.8 undefined identifier "data"
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 281.11 expression syntax
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 288.1 undefined identifier "PORT_B"
Error [209] C:\Users\nazirah\Desktop\Test\Test1.c; 305.22 type conflict
Error [312] C:\Users\nazirah\Desktop\Test\Test1.c; 305.22 ";" expected
Advisory[1] too many errors (21)
Make: The target "C:\Users\nazirah\Desktop\Test\uart_io.p1" is up to date.

********** Build failed! **********
Suria
Novice
 
Posts: 24
Joined: Sat Dec 31, 2011 11:21 am

Re: PR29 programming

Postby ABSF » Sat Jan 07, 2012 1:44 pm

Suria WROTE:Error [194] C:\Users\nazirah\Desktop\Test\Test1.c; 5.11 ")" expected
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 98.1 undefined identifier "SPBRF"
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 104.6 undefined identifier "Button_1"
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 104.20 undefined identifier "Button_2"
Error [194] C:\Users\nazirah\Desktop\Test\Test1.c; 105.1 ")" expected
Error [248] C:\Users\nazirah\Desktop\Test\Test1.c; 161.1 inappropriate "else"
Error [248] C:\Users\nazirah\Desktop\Test\Test1.c; 169.1 inappropriate "else"
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 172.12 undefined identifier "Button_3"
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 174.17 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 229.1 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 235.1 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 241.1 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 247.1 expression syntax
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 253.1 expression syntax
Error [314] C:\Users\nazirah\Desktop\Test\Test1.c; 269.1 ";" expected
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 271.1 undefined identifier "PORT_B"
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 271.8 undefined identifier "data"
Error [195] C:\Users\nazirah\Desktop\Test\Test1.c; 281.11 expression syntax
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 288.1 undefined identifier "PORT_B"
Error [209] C:\Users\nazirah\Desktop\Test\Test1.c; 305.22 type conflict
Error [312] C:\Users\nazirah\Desktop\Test\Test1.c; 305.22 ";" expected
Advisory[1] too many errors (21)


Can't help you with all your errors. You have to check through the whole program (hardcopy better) and compare with the original program and see why the error only appears on your program. HTC is very strict on upper and lower case words. If you define "button_1" at the beginning and use "Button_1" in your main(), C will not accept them. 8-)

Take this line :-
Error [192] C:\Users\nazirah\Desktop\Test\Test1.c; 98.1 undefined identifier "SPBRF"


"SPBRF" is a typo, it was defined as "SPBRG" inside the device header file. 98.1 is the " line number, column number" where the mistake is found. :?

Go through the rest of your program and try to fix all the errors one by one. Try to appreciate how difficult other people wrote a nice program and how easily you can screw it up. :lol:

Allen
The next war will determine NOT who is right BUT what is left.
User avatar
ABSF
Professional
 
Posts: 810
Joined: Wed Nov 10, 2010 9:32 am
Location: E Malaysia

Re: PR29 programming

Postby Suria » Sat Jan 07, 2012 2:22 pm

heheh.. i do appreciate them.. and i'm trying as hard as i could to debug their program.. thanking them 1000 bunch! :D thanks Allen for helping me :D
Suria
Novice
 
Posts: 24
Joined: Sat Dec 31, 2011 11:21 am

Previous

Return to DIY Project Set

Who is online

Users browsing this forum: No registered users and 14 guests

cron