I'm having some trouble communicating between a 16F877 and an Atmel = AT45DB021 Dataflash using the CCS C compiler and wonder if anyone has = seen the same problem. If I bit-bang the SI, SO and SCLK lines, no problem -- but if I try to = use the CCS compiler's hardware SPI commands they don't seem to work. = Specifically, I'm able to use the CCS commands to spi_read() and = spi_write() using the DataFlash's two internal buffers. Reading = Dataflash main memory is another story. Also, I've experimented and it = doesn't appear to be a power problem. Furthermore, I've experimented = using maximum delays and polling the SPI register for data, with no = success. What has worked is sending and extra don't care byte to the = DataFlash, but the Dataflash's datasheet doesn't request this, and I'm = not sure why it works (clock-edge?). If any Piclisters have faced this problem, any help would be = appreciated. Thanks, Shawn -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics