Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC 12F675 TO PIC 16F676 CODE CONVERSION

Status
Not open for further replies.
No,

You have used a pull down resistor. Use a pull-up resistor, or no resistor.

IR receiver output goes to PICkit2 pin 6, not pin 4
 
Perfect.... Exactly right.. :)


You can use pin 2 Vdd to supply the +5V if you prefer. Remember to turn on 5V supply in PICkit2 software first
 
Perfect.... Exactly right.. :)


You can use pin 2 Vdd to supply the +5V if you prefer. Remember to turn on 5V supply in PICkit2 software first
pl can explain its command value ?
sw 1.PNG
sw 2.PNG
 
any body can help for conversion above code in CCS C ?
bcoz my hi-tech compiler has been expired .
 
any body can help for conversion above code in CCS C ?
bcoz my hi-tech compiler has been expired .
Use the lite version!!! or download the newer XC8 from microchip... Its free to use..
 
Yon cannot clear the interrupt on change flag... You need to read the port to clear it.. Create a line that reads the port..

something like this...
if(GPIO);

And the IOC should be clear.... Whats happening here is the IOC is firing and the LED is flashing very fast and appears on...
 
Yon cannot clear the interrupt on change flag... You need to read the port to clear it.. Create a line that reads the port..
something like this...
if(GPIO);
that is here all ready have here
Code:
void interrupt t0intr(void)
{
    if(INTCONbits.T0IF)  // check the timer0 over flow interrupt flag
    {
    timerInterruptIsr();// timer0 overflow interrupt has been occur call the isr
    INTCONbits.T0IF =0; // clear the timer0 interrupt flag
    }
    else if (INTCONbits.GPIF)  // check the interrupt on change flag
    {   
        LED=1;    // to blink the LED when IR signal is received
        interruptOnChangeIsr();                    // interrupt on change has been detected call the isr   
        INTCONbits.GPIF =0;                        // clear the interrupt on chage flag
        LED=0;                                    // to blink the LED when IR signal is received
    }

}

And the IOC should be clear.... Whats happening here is the IOC is firing and the LED is flashing very fast and appears on...
no no its continuous on
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top