Problem with PIC code

Status
Not open for further replies.

SumitRanjan

New Member
I have recently burn a pic 16f690. But the chip is not giving desirable output. It is not not for any I/P and giving garbage value like a counter. But it should take I/P and give O/P according to I/P.
I think the problem is in the given part of the code below. I am using 4MHz oscillator and 22pf booster. If anybody can help I will be really thankful to him.

"
#include<pic.h>
#define _XTAL_FREQ 4000000 //4MHz Crystal

__CONFIG (INTIO & WDTDIS & PWRTEN & MCLREN & UNPROTECT & UNPROTECT & BORDIS & IESODIS & FCMDIS); "
 
If you are using an external crystal then your config needs state XT oscillator. However, I doubt that is your problem and, as Ian says, you need to post your code.

Mike.
 
If you are using an external crystal then your config needs state XT oscillator. However, I doubt that is your problem and, as Ian says, you need to post your code.

Mike.

Oh Yeah... Missed that... However that usually causes the pic not to run atall, I've never tried to run a pic like that so it'll be guesswork
 
Thanks guys. Here is my code
 
Last edited:
I am using 4MHz oscillator and 22pf booster.

Yet!!!!

__CONFIG (INTIO & WDTDIS & PWRTEN & MCLREN & UNPROTECT & UNPROTECT & BORDIS & IESODIS & FCMDIS);
 
@Ian Rogers super genious carry on. usually i have no vast knowledge on coding/ programming etc. just i have basic knowledge on it.
Thanks All
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…