asdf2as144 0 Posted February 21, 2015 Share Posted February 21, 2015 .............................. Quote Link to post Share on other sites
igor 163 Posted February 22, 2015 Share Posted February 22, 2015 Have you checked the LCD print routines (e.g. if you set data = 5, does it write 5?). What is the data type of "data"? (does it match what flash.read expects)? Does the flash.write change the values in flash? (e.g. if you do a print loop before the flash write, and one afterwards, do you get different values). Have you checked the address math? (To be sure that (unsigned char*)potvalue + offsat gives you what you want.) (e.g. print the list of addresses to the serial port, and be sure they go up by one byte each time). Quote Link to post Share on other sites
StupidPig 10 Posted March 5, 2015 Share Posted March 5, 2015 I forgot the flash write routine will clear the flash first or not, but I kind of remember it didn't. If not, you will have to clean the flash before write, as write only able to set 0 to 1, but not the other way. Quote Link to post Share on other sites
roadrunner84 466 Posted March 5, 2015 Share Posted March 5, 2015 I forgot the flash write routine will clear the flash first or not, but I kind of remember it didn't. If not, you will have to clean the flash before write, as write only able to set 0 to 1, but not the other way. Are you sure it's not the other way around (so, erasing will set all bits to 1, writing can only set them to 0)? Quote Link to post Share on other sites
StupidPig 10 Posted March 5, 2015 Share Posted March 5, 2015 Are you sure it's not the other way around (so, erasing will set all bits to 1, writing can only set them to 0)? Yup, my bad, erasing will get the bit as 1 rather than 0, and write will only able to get a bit become 0. When I type I just assuming "erase" means 0. Anyway, the whole point is about erase is needed before write. roadrunner84 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.