hi,
I want to run my controller QB8 using external crystal 4.9152MHz
and not using internal
i have used the following code as atest but after removing thr crystal also i get the pulses on PTB0 .
please check my code and guide me how to use the external cystal as clock
source
this program just makes on/off PTB0
#include <hidef.h> /* for EnableInterrupts macro */
#include <MC68HC908QB8.h> /* include peripheral declarations */
//macro defination for BIT wise manupulation
#define setbit(A,B) A|=(1<<B)
#define clrbit(A,B) A&=~(1<<B)
void main(void)
{
unsigned char a=0,i=0;
OSCSC=0xC4;
CONFIG1=0x01;//Disable COP
DDRA=0x10;
DDRB=0xFF;
while(1)
{
PTB=0x01;
for(i=0;i<100;i++);
PTB=0x00;
for(i=0;i<100;i++);
}
}