SK40C Beginner

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Re: SK40C Beginner

Postby kl84 » Mon Feb 27, 2012 11:33 am

You need to check what causes the build to fail. Look into the Output panel. There may have some diferences between the two microcontroller. Perhaps different Configuration bits, registers naming...anyhow do refer to the datasheet all the time. You can't program a chip without reading it's datasheet.
User avatar
kl84
Amateur
 
Posts: 166
Joined: Thu Jul 08, 2010 12:14 pm

Re: SK40C Beginner

Postby vick5821 » Mon Feb 27, 2012 2:46 pm

Well, what should I refer to the datasheet ?
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby vick5821 » Mon Feb 27, 2012 2:51 pm

ABSF WROTE:I saw that you've modified your own codes. Is it working now? Still Build Failed?

Allen

Ya..build successful now :)
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby ABSF » Mon Feb 27, 2012 4:00 pm

vick5821 WROTE:
ABSF WROTE:I saw that you've modified your own codes. Is it working now? Still Build Failed?

Allen

Ya..build successful now :)


That's what we called DEBUGGING! :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: SK40C Beginner

Postby ABSF » Mon Feb 27, 2012 4:07 pm

vick5821 WROTE:Well, what should I refer to the datasheet ?


Lots of things. E.g. when you ask "DEoes it matter iuf I used PIC16F877A to load the program provided by cytron which used PIC16F887A ?" I have to refer to both datasheets for you. :cry:

Datsheets are just like a dictionary when you want to type a letter or answer a post here. You have to refer to it and not to memorise the details by heart. Just like you dont need to study the whole Dictionary in order to write a letter. :mrgreen:

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: SK40C Beginner

Postby vick5821 » Mon Feb 27, 2012 11:02 pm

ABSF WROTE:I saw that you've modified your own codes. Is it working now? Still Build Failed?

Allen

Afternoon I still can get build successful.But now I try build it/debugg it, this is the error msg I get :(
Image

Help @@@
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby ABSF » Tue Feb 28, 2012 6:48 am

Are you still referring to the pr_11 tutorial program?

_XTAL_FREQ is defined in "system.h". Did you #include the "system.h" in your program?

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: SK40C Beginner

Postby vick5821 » Tue Feb 28, 2012 10:46 am

Ya...but the code I write it myself do not have the system.h header...Cause I thought the system.h is another library built by the cytron's programmer itself to include all the things ?..Mine build failed
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby vick5821 » Sun Mar 04, 2012 11:05 pm

How how ?

Thank you
vick5821
Discoverer
 
Posts: 85
Joined: Tue Jun 28, 2011 10:21 pm

Re: SK40C Beginner

Postby sich » Mon Mar 05, 2012 10:57 am

You need to include "system.h". The comment told us to do so...
CODE: SELECT_ALL_CODE
void delay_ms(unsigned int ui_value)
{
   while (ui_value-- > 0) {
      __delay_ms(1);      // macro from HI-TECH compiler which will generate 1ms delay base on value of _XTAL_FREQ in system.h
   }   
}
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 604
Joined: Tue Apr 21, 2009 2:15 pm

PreviousNext

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 3 guests