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] Problem with ISR and internal EEPROM read/write in PIC16f876A

Status
Not open for further replies.

richardlaishram

Member level 4
Joined
Jan 6, 2013
Messages
77
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,298
Location
Planet Earth
Activity points
1,804
Please bear with me. I've to toggle a pin every 125 milliseconds and every minute I've to update the eeprom with a value after comparing with the previous value. For measuring time I'm using Timer 0 and it's ISR. Every minute I've to display the eeprom value in an LCD. My PROBLEM is that for the 1 second period the toggling is working fine, but during the eeprom_read/eeprom_write there is some delay and the pin toggling is not even.
I won't be able to toggle the pin directly using ISR because at some point I need to toggle every 500 milliseconds also. Please give a solution on this.

In short:
For the first second (toggle pin every 125 or 500 milliseconds) read/write to eeprom, display to LCD and then continue for the next second.
Reading/Writing to EEPROM creates an extra delay which makes the pin toggling uneven. Please give me a possible solution to this.

__ __ __ __........__ __ __ __......__ __ __ __......__ __ __ __ (The way pin is toggling, and the dots are for the time taken in writing eeprom and displaying to LCD)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top