I am trying to interface to a AT25DF321 dataflash (later the 64mbit one).
This is also my first attempt at the SPI protocol.
I have used I2C, uart, XMEM before.
My code is here, I know the 2 includes works from other projects.
The chip is Atmega128 running at 16MHz and 5Vdc.
Dataflash gets power from a 3v3 regulator, all lines are pullup to 3v3.
MOSI,SCK and SS has 2k2 from the avr pin to protect dataflash from 5V.
(Basically this circuit http://alturl.com/erp8 )
The debug printf prints 255 on all 5 bytes, probaly because the pullup is the only thing driving the line.
Is there something wrong with my code, or should I look at the hardware ?
I dont have a reliable scope, only a pickit2 clone which is not very good as a scope.
I have a jtag (clone), but havent got it working yet...
Any help or surgestions would be most welcome.