| ??? 09/09/11 05:24 Read: times  | 
#183676 - Working (?) Responding to: ???'s previous message  | 
hi,
 I've tried some variations within the posted code. Here are some requested information: Sys_clk = 49MHz ADC_Samplerate = 100kHz EEPROM via SPI: 5GHz clocking -------------------------------- I think this is a solution which is working: First I sample 32 values into an array. Next step: save the array values via a For-Loop to EEPROM. After both loops are done I start with a new page and doing the same again. ...
   
  //ADC sampling loop is done before
   SFRPAGE   = SPI0_PAGE;
   SPIF     = 0;
   NSSMD0   = 0;
//**********FOR loop START*********		
   for (buf=0; buf<32; buf++){                          //value = 32 due to high&low bit split
   measurement[buf]=measurement[buf];
   SPI0DAT  = measurement[buf];				//save low 8 bits   
   while (!SPIF);
   measurement[buf]=measurement[buf] >> 8;
   SPI0DAT  = measurement[buf];				//save high 8 bits
   while (!SPIF);
   Delay_us (1);                                        //safety delay
   }
//**********FOR loop END*********
 
At the moment this seems to work. I'll check the timing with an oscilloscope during the weekend (and of course the data storage ;). I'll write the outcome on Monday. BR, Reinhard  | 
| Topic | Author | Date | 
| 8051F120 SPI EEPROM Page_write | 01/01/70 00:00 | |
| Code | 01/01/70 00:00 | |
| disable printf? | 01/01/70 00:00 | |
| which '51 derivative? | 01/01/70 00:00 | |
| Isn't that obvious? | 01/01/70 00:00 | |
| I keep missing the titles :( | 01/01/70 00:00 | |
| Working (?) | 01/01/70 00:00 | |
| Wow - now that is fast | 01/01/70 00:00 | |
               Mhz        | 01/01/70 00:00 | 



