Can you explain what you are doing in the loop()?
As I see - reading a byte from a serial port and comparing it to a constant 0x5C?
What is the meaning of this and what does it have to do with reading SRAM memory?
HI, thanks for your reply.
my loop has been ignored totally.
i am accessing an empty 23k640 SRAM chip using adafruit feather M0 and the code below
Serial.println(Spi23K640Rd8(545), HEX);
prints out the memory location 545 on the serial monitor which gives an output of 5C in HEX.
what I am trying to achieve is a comparison to the output 5C in such a way that if the output of memory address 545 changes from 5C it recognises it as wrong output.
and I also want 5C so be a constant so that if the location i try to access changes such as to 544 it recognises as well.
the whole concept is to achieve a challenge response pairs for that memory address to create function to mitigate bit flips due to power reset.
yes, I know.
the void setup () reads out the output without the loop.
how do I get the output stored and set up for comparison with the right data type
Sorry, but your code looks nonsense almost in each line...
first line is weird, because value i is indefined
third line is erroneous and useless, because result of operation, val2, not used further
Next piece of code, see the comments:
It looks like you lack basic knowledge about variables and pointers, I would advise you to read something for beginners about the C language for a start.
Hi,
for some reason you think there is a part that addresses my issue somewhere. but i have looked around and this mess is what i keep seeing. i very much understand variable, pointers and array. but it's so much easier to implement if i was creating an array. but for a raw SRAM value. its proving difficult to do. if you have an example i can look at that relates. please a link will help. because everyone keeps criticizing my code without telling what i am doing wrong or what i should do write.
Hi,
thanks for your feedback. let me explain as much as i can.
i am trying to store a printed value from the serial monitor for comparison.
but the output of the serial monitor is the raw data of an SRAM memory address 545.
i want to set a read condition for the memory address because it changes with power reset.
currently the output in DEC on the serial monitor is 92, and it has remained the same through multiple power cycle but what if after the power reset it's no longer 92 on that memory address. how do I save the previous value and create condition because in BIN the change across the raw SRAM usually output a bit flip.