How to create a 21 bit address and separate into three bytes for Atmel serial eeprom?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    Hi,
    That's weird.... I don't think it matters (or should matter) where you put the variable declaration. What if you put the declaration at the top but assign a value to it right before the HSEROUT (or SHIFTOUT) statement?

    Are you using any aliases or any Arrays? There are no boundary checks on arrays in PBP so if you are using an array and accidently write "outside of it" you will write to variable(s) adjacent to the array.

    To me it sounds as if there's something in your code that write 16 to the third byte of your LONG, is it allways 16 by the way?

    /Henrik.

  2. #2
    Join Date
    Jul 2010
    Posts
    10


    Did you find this post helpful? Yes | No

    Default

    No, don't have any arrays at all. That is what I was thinking that somehow I was over writing memory somewhere. I gave it a few days of rest as I had other jobs at work to perform. So, probably I won't get back to it till Monday or Tuesday next week. I do have a lot of variables I use in the program which I'm trying to thin down as much as I can. Actually you know what maybe it is this string storage thing I'm doing that is causing the problem. It's posted here.
    Written by Darrel Taylor

    http://www.pbpgroup.com/modules/wfse...p?articleid=10

    I haven't looked at it in any great detail.

    I am also using an interrupt handler also written by Darrel Taylor

    http://darreltaylor.com/DT_INTS-18/home.html

    These could be affecting the Pic's memory somehow. Like I said I have not looked into all the code of his I use to see how it may be affecting memory. I hope not because I really need those routines. Especially the interrupt routines.
    Last edited by BryanSw; - 11th September 2010 at 00:37.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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