[SOLVED !] 16F688 Eread/Ewrite problem


Closed Thread
Results 1 to 2 of 2

Thread: 16F688 Eread/Ewrite problem871 days old

  1. #1
    Mike Pink
    Guest Mike Pink's Avatar

    0 Not allowed!

    Default 16F688 Eread/Ewrite problem

    Having problem with Eread/Ewrite where eread returns maximum number. Any thoughts?



    'compiler 3.6.0.2
    'programmer melabs 4.63


    Device 16F688

    'DECLARES
    Declare Xtal 4

    Declare RsIn_Pin PORTC.3
    Declare RsIn_Mode inverted
    Declare Serial_Baud 2400
    Declare RsIn_Timeout 1000

    Declare RsOut_Pin PORTA.2
    Declare RsOut_Mode inverted
    Declare RsOut_Pace 10000

    Dim window As Word
    Dim window2 As Word
    Dim gain As Byte
    Dim gain2 As Byte

    start:
    PORTA=0
    PORTC=0
    TRISA = %111010
    TRISC = %001011
    ANSEL = %00000000
    CMCON0 = %00000111

    GoTo jumpstart


    jumpstart:
    window = 125
    window2 = 0
    gain = 6
    gain2 = 0

    RsOut "Before EWrite: ","Win= ",Dec window," Win2= ",Dec window2," Gain= ",Dec gain," Gain2= ",Dec gain2, 13, 10
    DelayMS 100
    EWrite 0, [window]
    DelayMS 100
    EWrite 6, [gain]
    DelayMS 100
    window2 = ERead 0
    DelayMS 100
    RsOut "After ERead 0: ","Win= ",Dec window," Win2= ",Dec window2," Gain= ",Dec gain," Gain2= ",Dec gain2," ", 13, 10
    DelayMS 100
    gain2 = ERead 6
    DelayMS 100
    RsOut "After ERead 6: ","Win= ",Dec window," Win2= ",Dec window2," Gain= ",Dec gain," Gain2= ",Dec gain2," ", 13, 10
    End

  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
    Mike Pink
    Guest Mike Pink's Avatar

    0 Not allowed!

    Default Re: 16F688 Eread/Ewrite problem

    Immediate Problem (time) resolved using EEPROM instruction set. Lot easier than expected.

    Thanks

  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.

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Proton ERead & EWrite problem when using CData, remmber this
    By Alee in forum Proton Plus Compiler v3
    Replies: 5
    Last Post: 1st February 2012, 20:32
  2. EWrite/ERead
    By t0pP8uZz in forum Proton Plus Compiler v3
    Replies: 7
    Last Post: 11th December 2009, 15:47
  3. Eread Ewrite 18f2320
    By andyb in forum Proton Plus Compiler v3
    Replies: 3
    Last Post: 24th January 2007, 14:08
  4. ewrite/eread clarification
    By Latex in forum Proton Plus Compiler v3
    Replies: 4
    Last Post: 21st September 2005, 10:09
  5. EREAD & EWRITE syntax
    By John Lawton in forum Wish List / Product Feedback
    Replies: 0
    Last Post: 22nd June 2004, 11:40

Tags for this Thread

Posting Permissions

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