Transistorman
Member
hi
today is my first time i connect my 877A
to my pickit2 , and now i need some help
on changing the config line the c code
here is the code
the red line is the thing i confused on
please help me !
also ,
is 877A have internal clock ?
because i run out of crystal
today is my first time i connect my 877A
to my pickit2 , and now i need some help
on changing the config line the c code
here is the code
Code:
#include <system.h>
#pragma CLOCK_FREQ 4000000 // config clock to 4mhz.
// Set configuration fuse.
[COLOR="red"]#pragma DATA _CONFIG, _XT_OSC & _WDT_OFF & _CP_OFF & _PWRTE_OFF[/COLOR]
void main()
{
trisb = 0; //configure port B pins as output
while( 1 ) //endless loop
{
portb.0=1; // set portb pin0 to high.
portb.1=0; // set portb pin1 to low.
delay_ms( 500 ); // pause 0.5 seconds
portb=0x02; // shows hex notation for entering data.
delay_ms(500); // you can also write portb=2 in decimal
}
}
please help me !
also ,
is 877A have internal clock ?
because i run out of crystal
Last edited: