Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] pic18f4520 timer0 interrupt problem

Status
Not open for further replies.
In the ISR, change this:
Code:
LATDbits.LATD0=!LATDbits.LATD0;
to this:
Code:
LATDbits.LATD0=!PORTDbits.RD0;
LATD is only for outputting values to the ports (writing to ports). PORTD is only for inputting from ports (reading from ports).

With a 20MHz clock, the interrupt occurs every ~3.55 seconds.

Hope this helps.
Tahmid.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top