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.

MPLAB EEPROM writing/reading simulation

Status
Not open for further replies.

neoaspilet11

Full Member level 5
Joined
Sep 29, 2005
Messages
277
Helped
29
Reputation
56
Reaction score
8
Trophy points
1,298
Location
Cebu, Philippines
Activity points
4,048
mplab eeprom

Hello Everybody,

I am having troubles in simulating writing and reading EEPROM using the MPSIM of MPLAB.

I have some questions please help. (I used PIC16f877A)

1.) After I put data on EEADR and EEDATA, then EECON1, EEPGD is CLEAR and EECON1, WREN is SET, then the wite sequence 55h and AAh to EECON2 then I turn SET EECON1, WR to initiate writing.

The DATA does not reflect on the EEPROM address after initiating writing. Is the simulation works this way? Is the eeprom writing simulation being mimic in the actual writing which will take 4 to 8 ms?

2.) My EEPROM write suborutine is preceded by instruction like this

btfsc EECON1, WR
goto $-1
movlw ....

I used a loop in writing an array of data to EEPROM but it seems after one pass of calling my subroutine, the EECON1, WR will never get CLEAR thus the program is stuck in the code above.

How do I force EECON1, WR to CLEAR? (Note in actual operation, EECON1, WR is CLEARed by hardware which means writing to EEPROM is finished. It can only be SET but not CLEARed in software.)

3.) I am having the same problems with reading EEPROM too. it seems the EECON1, RD will not get CLEARed after one pass and worse it will not return any data.

Hoping for you smart ideas.

Jack
 

Hi

I am getting similar kind of problem. But the thing is the WR bit is not getting set
and also the interrupt flag also does not getting set.I have tried in the simulator and the debugger both in both also its not getting set if any body knows the answer please tell me.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top