Monitor with Dual Video Inputs -> Ground Pins

Status
Not open for further replies.

awanis

Junior Member level 1
Joined
Sep 15, 2009
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
malaysia
Activity points
1,387
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
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…