Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Atmega to 45DB161 Interface

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]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.