writing to external memory

04 Mar 2011

Hi,

I'm trying to write data to exteral memory (23K256). Writing to files works oke, , but not to ext. memory.

here's the programm: http://mbed.org/users/marcelvandekamp/programs/Internal_ADC_with_interrupt/lnipwo

can anybody help me out?

04 Mar 2011

A quick glance at main.cpp shows some issues with floats, ints, and chars:

1. The ADC is being read with read_u16, which returns a short; but then that is assigned to a float variable. You probably just want to read it as a float and be done with it.

2. The sram.write routine expects to write chars, but is being fed floats. You'll need to do some conversion first.

3. The sram.read routine returns chars, but the printf is formatted for floats.

4. BTW, line 107 should be buff[i], not just buff.

Hope that helps.