Config word value differs(PIC16f72)

Find out how to setup your programmer's software and how to solve many common problems.

Moderator: phalanx

Config word value differs(PIC16f72)

Postby Md. Shadique » Mon Jan 02, 2017 11:33 pm

Hello everyone,
I am new in pic controllers programming and using mikroc pro compiler.
in my first project i am working on PIC16f72.... m trying to write a software for that and trying it on hardware.
The problem is that according to datasheet of PIC16f72 ,the config word value should be 0x3fb2 in case of use of external osc.
I have tried every option in setting of config word but didn't get that value....it seems me due to this i am not able to even blink a led with controller....
Please suggest me what should i do....??
Md. Shadique
 
Posts: 2
Joined: Mon Jan 02, 2017 11:20 pm

Re: Config word value differs(PIC16f72)

Postby phalanx » Tue Jan 03, 2017 12:19 pm

According to the datasheet, 0x3FB2 should get you: Brown-out Reset disabled, Code protect disabled, Power-up timer enabled, Watchdog Timer disabled, HS oscillator.

What do you mean by "but didn't get that value"? Did you try reading it back from within MPLAB using a debugger of some sort?

How are you trying to set your configuration bits? You can have MPLAB handle them or you can have MPLAB generate source code for them which you then embed in your program.

Have you debugged your circuit to make sure everything works as expected? You should post your circuit here so we can identify any potential issues.

Are you positive your source code is correct the point that it properly sets up the PIC and flashes an LED? Have you run it through the MPLAB simulator to see if it's working correctly? You should post your source code here so we can see what you are attempting to do.

-Bill
User avatar
phalanx
Non-SFE Guru
 
Posts: 1928
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH

Re: Config word value differs(PIC16f72)

Postby Md. Shadique » Fri Jan 06, 2017 4:53 am

Actually i am trying it on hardware...I have a complete circuit of it which also have programmed controller....
I trying to do same.....i am very sure that my code is correct...i have done lot of such types of project based on 8051 microcontroller....
One more thing....when i choose PIC16f722 ,i got same config word value(0x3fb2).
Now i am able to control on 4, 7 seg display, 5 leds..
But in case of switch it is not working properly.....I am using PIC16f72...
Md. Shadique
 
Posts: 2
Joined: Mon Jan 02, 2017 11:20 pm

Re: Config word value differs(PIC16f72)

Postby phalanx » Fri Jan 06, 2017 7:19 am

Not to sound harsh, but if your software was correct, you wouldn't be having a configuration issue right now. I'll reiterate that I need you to provide me with more information in order to help you further. The details I asked for in my previous post are still valid and I don't have the luxury of knowing that everything you have done is correct so far. I'm less concerned about your ultimate task of driving 7-seg displays, but I do need to know everything you have done to properly configure the MCU for operation in your project (and that includes how you did it as well).

Since you haven't told me yet, I can only assume you are using MPLAB and some form of programmer that integrates with it to program your system. MPLAB verifies what type of MCU you are connected to before programming and won't allow you to program mismatched parts so I find your comment about changing settings to a PIC16F722 and everything starts to work a little suspect.

-Bill
User avatar
phalanx
Non-SFE Guru
 
Posts: 1928
Joined: Sun Nov 30, 2003 8:57 am
Location: Candia, NH


Return to PIC Microcontrollers - Software and Hardware

Who is online

Users browsing this forum: Bing [Bot] and 2 guests