Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem with spi in atmega32

Status
Not open for further replies.

maia31

Member level 1
Joined
Jul 10, 2011
Messages
38
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
earth
Activity points
1,519
hi
i work with
atmega32
and spi
why my slave micro send same data as input data ?
i dont want send any data i want recive only.
 

maia31 said:
i dont want send any data i want recive only.

You can't, because of the SPI nature.
During each SPI clock cycle, a full duplex data transmission occurs: the master sends a bit on the MOSI line; the slave reads it from that same line; the slave sends a bit on the MISO line; the master reads it from that same line. Not all transmissions require all four of these operations to be meaningful but they do happen.

Serial Peripheral Interface Bus - Wikipedia, the free encyclopedia

If you need the MISO line (since the MCU is slave) to stay at a steady state (0 or 1), keep updating the data register (SPDR) with 0 or 0xFF. Or just leave it unconnected.

Hope that helped.
 
  • Like
Reactions: maia31

    maia31

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top