Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] I need help when I Using the internal crystal on pic16f722

Status
Not open for further replies.

hindawi-sy

Newbie level 5
Joined
Dec 17, 2010
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Istanbul, Turkey, Turkey
Activity points
1,336
Hello all
I'm trying to write a program to pic16f722
Using the internal crystal frequency 4 Mhz
this program works on Proteus correctly
But when I test it on board it is not work
board
i need any Simple program at this microcontroller for test my microcontroller
Greetings to all of you
 

Just make sure you have these settings:

In the OSCCON register the IRCF bits should be set to 01.
In CONFIG1 register, PPLEN (bit 12) should be 1 and FOSC (bits 2, 1, 0) should be set to either 100 or 101.

Use 100 if you want RA6 and RA7 to be normal I/O pins.
Use 101 if you want RA6 to be a clock output pin and RA7 to be an I/O pin.

Brian.
 
are can you give me small example
it's used internal cristal
example 1 pin on off
for i just where problem
hardwear or my prog
 

What language and compiler/assember are you using?

The attached file should toggle all the PORTB pins about once per second. I do not have any 16F722 here or even a working lab at the moment but the code simulates OK for me.

Brian.
 

Attachments

  • testcode.zip
    536 bytes · Views: 97

what programer you are using ? cheak ur config setting b/c some programer do not retrieve config bits
 

The configuration bits are included in the file I posted in #4 but as Aqildad suggests, check your programmer actually uses them. Inferior programmers ignore the configuration and make you set it yourself.

Brian.
 

I use programmed ( top 2049)
I have tried all the possibilities were not successful
I'll try other programmed like (all 100)
and tell you

I use mikroC PRO 4.15

Greetings to you
 
Last edited by a moderator:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top