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.

18f452 EEPROM writing

Status
Not open for further replies.

buddhikaneel

Member level 1
Joined
Jul 27, 2011
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,542
Hi.
i wrote this code sample in mikroc pro.

void main() {
ADCON0 = 0;
ADCON1 = 0;
trisb=0;
EEPROM_Write(0x80, 124);
for(i = 0; i < 32; i++) {
portb=EEPROM_Read(0x80+i);
delay_ms(1000);
}


}
it's working well in realtime. But in proteus giving error code. can you help


what can i do for this
 

Hi,

Apparently, there is a bug in Proteus or MikroC EEPROM library. There are several issues similar to you own when using the EEPROM library in Proteus, but perform as expected when implemented in real hardware, posted in several forums. However, custom routines written without the MikroC EEPROM library, seem to perform without error in Proteus, very interesting.

I managed to have the simulation run successfully with your code by change the "Data EEPROM write delay" under Advanced Properties to any value in nanoseconds, however any value in milliseconds or microseconds produces similar errors.

I have attached the Proteus file so that you can see the property setting.

BigDog
 

Attachments

  • buddhikaneel.zip
    5.3 KB · Views: 49

Thanks BigDog. What did you change in diagram..? where can i found Advanced Properties..?
 

if you double click the component in proteus you can open the edit component dialog, you will see an advance properties drop down menu where you can select the "data EEPROM write delay" and change the value or check the edit properties as text checkbox and change the value of "EPR_WRITEDATA_DELAY" property

Alex
 

Here is screenshot of the Edit Properties Dialog Box of a PIC:

ProteusCLKOUT.jpg

Click on the Advanced Properties Drop Down Menu, which has the "Generate Q Clock on CLKOUT Pin?" shown in the screenshot.

And select "Data EEPROM write delay" properties, you will then see I have changed the value to 1000ns.

BigDog
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top