Atmega to 45DB161 Interface
2008-09-20 by Moataz Hussein
I am trying to interface 45DB161D to ATmega 16 using the SPI, I have went through many documentation and material. My problem is that I am not able to get it work, I started by sending $9F to read device ID. I checked the program and started debuging it again on AVR Studio, and noticed that PORTB7 (SCK) is not changing instead it is PINB7, aslo the MOSI. Is there any initilaization missing?? ldi Temp,0b10111111 out DDRB,Temp ; PB - all output except MISO input ldi Temp,0b01011100 out Spcr, temp ; Enable SPI, device master, ldi temp,$9F ; code to get device ID out spdr, temp Wait_Transmit: sbis spsr,spif rjmp Wait_Transmit [Non-text portions of this message have been removed]