Using the EWrite command


+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 23

Thread: Using the EWrite command31 days old

  1. #1
    Junior Member Giuseppe's Avatar
    Join Date
    Jul 2019
    Posts
    61
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    437.99 MB

    0 Not allowed!

    Default Using the EWrite command

    Hello everyone
    Using the EWrite command, is it better to disable the global interrupt first, then write to eeprom and once written, re-enable global interrupt?

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Prolific Poster John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,975
    Thumbs Up
    Received: 96
    Given: 34
    Total Downloaded
    5.17 GB

    0 Not allowed!

    Default Re: Using the EWrite command

    I always do, but it may pay to look at the ASM, it's possible that the compiler does it for you.
    John

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,616
    Thumbs Up
    Received: 82
    Given: 33
    Total Downloaded
    6.82 GB

    0 Not allowed!

    Default Re: Using the EWrite command

    Have a look at this Declare: -

    Code:
    Declare MemWrite_Int_Control = 0    ' Disable interrupt when writing to eeprom
    Declare MemWrite_Int_Control = 1    ' Enable interrupt when writing to eeprom
    Regards

    Joseph

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Member keytapper's Avatar
    Join Date
    Jun 2019
    Posts
    257
    Thumbs Up
    Received: 11
    Given: 6
    Total Downloaded
    496.93 MB

    0 Not allowed!

    Default Re: Using the EWrite command

    I'm used to look into the asm code, and the command does the process correctly as stated on the datasheets. I can't recall whether the GIE will be set back at the original state after the Ewrite, I.E. if it wasn't set it should remain as such.
    Thank Joseph, for the tip,, which I was unaware.
    Last edited by keytapper; 26th September 2020 at 16:08.

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    Junior Member Giuseppe's Avatar
    Join Date
    Jul 2019
    Posts
    61
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    437.99 MB

    0 Not allowed!

    Default Re: Using the EWrite command

    I also thank Joseph for the advice of the declaration to be added

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,616
    Thumbs Up
    Received: 82
    Given: 33
    Total Downloaded
    6.82 GB

    0 Not allowed!

    Default Re: Using the EWrite command

    Glad I was of help.
    Regards

    Joseph

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    Junior Member Giuseppe's Avatar
    Join Date
    Jul 2019
    Posts
    61
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    437.99 MB

    0 Not allowed!

    Default Re: Using the EWrite command

    I'm doing some eeprom reading tests.
    I have a 12f675 powered by capacitive reactance at 230Vac.
    The first time I power the 12f675 the reading in eeprom is not performed correctly.
    The second time when I have the leveling capacitor a little loaded the reading in eeprom is performed correctly.
    How can you solve the problem for you?
    thank you

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #8
    Member keytapper's Avatar
    Join Date
    Jun 2019
    Posts
    257
    Thumbs Up
    Received: 11
    Given: 6
    Total Downloaded
    496.93 MB

    0 Not allowed!

    Default Re: Using the EWrite command

    Well Giuseppe,
    I think you should post your schematics to understand how is the environment the MCU is working. The case that is not able to recover the data from a cold start seems rather strange.

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  17. #9
    Junior Member Giuseppe's Avatar
    Join Date
    Jul 2019
    Posts
    61
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    437.99 MB

    0 Not allowed!

    Default Re: Using the EWrite command

    Click image for larger version

Name:	Immagine555.jpg
Views:	31
Size:	15.1 KB
ID:	4011
    Above you can see the diagram
    Attached Thumbnails Attached Thumbnails Immagine33.jpg‎   Immagine333.jpg‎  
    Last edited by Giuseppe; 29th September 2020 at 22:34.

  18. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  19. #10
    Junior Member Giuseppe's Avatar
    Join Date
    Jul 2019
    Posts
    61
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    437.99 MB

    0 Not allowed!

    Default Re: Using the EWrite command

    From other tests made the Vdd to reach a stable 5Vdc with a 100uF filter capacitor it takes 350ms this the first time the circuit is powered.
    I have enabled both PWRTE_ON and BODEN_ON but it seems that both the first and second power on does not read the eeprom well then everything is fine.
    How do you solve the problem for you?
    Thank you

  20. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  21. #11
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,616
    Thumbs Up
    Received: 82
    Given: 33
    Total Downloaded
    6.82 GB

    0 Not allowed!

    Default Re: Using the EWrite command

    Giuseppe,

    Is it possible to make a delay of say 1000ms after power up and then reset the pic through software so it begins when power supply is stabilized if that is the issue?
    Regards

    Joseph

  22. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  23. #12
    Prolific Poster John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,975
    Thumbs Up
    Received: 96
    Given: 34
    Total Downloaded
    5.17 GB

    0 Not allowed!

    Default Re: Using the EWrite command

    I agree with Joseph about the delay.
    Just put delayms 1000 as the first item in your code. That should fix it. Personally I'd put a 5V regulator in the Vdd and suitably bypassed, they are good at getting rid of power supply glitches and holding voltage steady. A 78L05 would do the trick.
    John

  24. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  25. #13
    Junior Member Giuseppe's Avatar
    Join Date
    Jul 2019
    Posts
    61
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    437.99 MB

    0 Not allowed!

    Default Re: Using the EWrite command

    I have already tried to put a 2 second delay after configuring the variables and symbols but nothing has changed.
    I haven't tried to put the delay right under the device declaration.
    As for the test with the 7805 I have to do the test let's see if it solves I will let you know.

  26. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  27. #14
    Member keytapper's Avatar
    Join Date
    Jun 2019
    Posts
    257
    Thumbs Up
    Received: 11
    Given: 6
    Total Downloaded
    496.93 MB

    0 Not allowed!

    Default Re: Using the EWrite command

    Quote Originally Posted by John Drew View Post
    A 78L05 would do the trick.
    I see the schematics and seems that the implementation is rather frugal. After all it should remain so as the purpose to drive a dimmer, supplied by a capacitance. The TRIAC looks like a snubber-less and logic level. Anyway it may be used rather than 4.7 zener.
    So as Giuseppe explained the data are collected correctly from the EEPROM, but strangely there's some case that they aren't passed to the variable in RAM.

  28. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  29. #15
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,751
    Thumbs Up
    Received: 371
    Given: 177
    Total Downloaded
    2.09 GB

    0 Not allowed!

    Default Re: Using the EWrite command

    Unfortunately, the standard 14-bit core devices had a lot missing when it came to their internal oscillators.

    You would be better using one of the 8-pin enhanced 14-bit core devices, because they have a lot more control over their internal oscillators, and a simple loop can be created until the oscillator is stable by checking a single bit from an SFR. They also have more stable oscillators that work a lot faster. Remember.... The standard 14-bit core devices are now approx 18 years out-of date, and newer, less expensive, devices have overtaken them tremendously. But the compiler makes them look, pretty much, the same.

    Before an Eread or EWrite takes place, disable interrupts, then re-enable them if your program is using interrupts straight after. It is also, very important, to make sure you are running the latest compiler version because changes have been made over the years to various compiler library subroutines.
    Last edited by top204; 5th October 2020 at 21:09.

  30. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Ewrite Doesnt
    By crankshaft in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 13th October 2010, 09:49
  2. Ewrite by interrupt
    By AlbertoFS in forum The Lounge
    Replies: 2
    Last Post: 5th December 2009, 16:44
  3. [SOLVED !] Ewrite
    By iwmoz in forum Proton Plus Compiler v3
    Replies: 30
    Last Post: 26th November 2009, 20:10
  4. Ewrite
    By joesaliba in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 3rd March 2007, 16:09
  5. [SOLVED !] EWrite
    By alex_p in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 20th January 2005, 22:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts