how to convert...
hai.... can i know how to cnvert program to another IC. at i has using p18f4580. this is my program..
#include <p18f4580.h>
#pragma config OSC = HS
#pragma config WDT = OFF
#pragma config LVP = OFF
unsigned char x;
void read()
{
ADCON0bits.GO = 1;
while (ADCON0bits.GO == 1)
x = ADRESH;
}
void main (void)
{
ADCON1 = 0x00;
ADCON2 = 0x05;
TRISD = 0x00;
read();
CCP1CON=0;
PR2=250;
TRISCbits.TRISC2=0;
T2CON=0x01;
CCP1CON=0x3C;
TMR2=0;
T2CONbits.TMR2ON=1;
while(1)
{
ADCON0 = 0b00000101;
read();
CCPR1L = ~x;
PIR1bits.TMR2IF=1;
while(PIR1bits.TMR2IF==0);
PORTD = 0x01;
}
}
i want to build Automatic controlled speed car..
how to convert this program using ic p16f84A