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.

i can't understand SPI well

Status
Not open for further replies.

mostafa_wahba

Newbie level 5
Joined
Nov 28, 2011
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
hey all
i have a little problem in understanding the SPI
i want to send data from slave to a master and i don't know the wright connections and the wright code and also i want to know how will i transfer the data
should i send the data to specific port or i can use any port for the output
i'm using atmega16
thanks in advance :)
 

For slave operation with some speed, you're effectively tied to the ATmega hardware SPI unit and the respective dedicated pins. In addition, you need to organize your software in a way, that it services the SPI interface in time, particularly when using multiple byte transfers. Specific interrupts are available for this purpose.
 

is there any problem from making master ic receive data and the slave send data?
because someone told me that master only send data
 

No, there's no principle limitation. For slave read, one data byte has to be hold available before the transfer by writing it to the respective communication register. Review the ATmega datasheet for details.
 

i know that in the pic spi has 4 pins CS , SDI , SDO , CLk and in atmega they are SS , MOSI , MISO , SCK
and in mazidi avr reference the spi explained with SDI ,SDO and i don't know what's the pins in the avr that like pic ones
for example
is MOSI is like SDI?
is MISO is like SDO?
is SS is like CS?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top