2013-01-14 09:00 AM
2013-01-15 04:02 AM
can you be a bit more precise what you expect to get and what you actually get or where in this pile of code we should look?
2013-01-15 04:23 AM
''i am unable to figure out what is the problem''
So what efforts have you made so far to try to figure out what is the problem?
What have you tried? What were the results? Have you used the debugger to see what's happening in the code? Have you used an oscilloscope to see what's happening on the wires?http://www.8052.com/faqs/120313
http://www.eetimes.com/discussion/break-point/4027526/Developing-a-good-bedside-manner?pageNumber=0
2013-01-16 08:50 AM
yes, i hooked up the MISO(PB14) and the MOSI(PB15) pins to and oscilloscope....All i was getting was a high at the MOSI pin.......there is no compilation error, on debugging, the write function gets executed...however while reading, i do not get it back... so i am not sure if data has been actually been written into the memory or not. I tried replacing the functions with the opcodes mentioned in the datasheet, but same problem... i guess the problem is with the flash initialisation or the write process... kindly look into it...
2013-01-16 08:58 AM
I am writing data into the memory (address 0x70000), and then reading back the same afer some time..... i suppose the problem is either with my flash initialisation function or the write function.... kindly have a look at the functions....
2013-01-16 10:23 AM
And what about the clock and slave-select (or ''chip-select'' or whatever) signals...?
2013-01-16 11:20 AM
2013-01-16 12:42 PM
And, with your oscilloscope, have you verified that the clock line is actually clocking, and the chip-select is actually going low.
Have you, with your oscilloscope, verified that all the timings on the lines match the requirements of the slave device?