Shop OBEX P1 Docs P2 Docs Learn Events
23LC1024- Very basic memory IO in gcc — Parallax Forums

23LC1024- Very basic memory IO in gcc

Greetings. (mostly out of academic interest) I'm working my way to a simple SRAM driver.
Currently I have the code: SPIMemory.c (see attachment)

Which compiles and runs, but doesn't return the values I'm expecting. From debugging de inputs into the seperate functions, I'm fairly sure I'm sending ( / trying to send) the correct data, but apparently I'm missing something else. I'm using the 'Propeller Proto USB' board. I know the memory bank setup should work, because I have no problems reading and writing it from an arduino.

Does anybody see any obvious glaring errors in the code I'm overlooking?

Comments

  • AribaAriba Posts: 2,690
    The ReadValue function does not return the value to the caller. The last statement in the function should be:
    ...
      return value;
    }
    

    Andy
Sign In or Register to comment.