Jump to content
Sign in to follow this  
Mitch

Xt Osc On 16f777

Recommended Posts

This code seems to work with OR without the XT on pins 13 and 14. This makes me think that the int osc is activated.

Any clue how I can disable the int osc and use only the external XT?

BTW: I AM programming the config along with the code.

Thanks for you help

 

 

//16F777

#include <system.h>

#pragma DATA _CONFIG, _PWRTE_ON & _WDT_OFF & _XT_OSC & _CP_OFF & _MCLR_OFF & _IESO_OFF

 

void Startup(void) {

osccon = 0b01101110; //Set oscillator to 4MHz

adcon1 = 1111b; //Set all pins to digital

 

trisa = 0b00000000; //Set porta for output

trisb = 0b00000000; //Set portb for output

porta = 0;

portb = 0;

portc = 0;

portd = 0;

 

delay_s(1);

}

 

void main(void) {

while( 1 ) {

delay_s(1); porta = 1;

delay_s(1); porta = 0;

}

}

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...