mizu saw

SPI problem - MC9S08AW60

Discussion created by mizu saw on Jul 20, 2008
Latest reply on Jul 28, 2008 by mizu saw
hi everybody,
i am now trying to commnicate the microcontroller, MC9S08Aw60, with the external flash memory chip, M25PE16 using SPI interface. I am getting so desperate with it. I can transmit data but no receive at all. My SPI_SRF never gets set. My code is like this:
bye SendReceive_data(byte data)
  while (!SPIS_SPRF);
  return data;
Pls fix my program and any suggestion is much appreciated. pls reply me ASAP. I attached my program.
Do I need to put some delays and the way I use to reset the chip is correct or not?
Added p/n to subject.

Message Edited by NLFSJ on 2008-07-24 07:25 AM