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.

Connect two microcontroller together spi port at AVR

Status
Not open for further replies.

amrismail

Junior Member level 1
Joined
Oct 12, 2004
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
137
avr spi

i want to comanicat two avr with spi both kind is (AVR AT90S8515)
is there any software i should but at each one
which HardWare sitable for that that conniction
i want any document speak at this field
i serch all atmel avrfreaks didn't find any nice one
 

spi avr

I don't think you will find many documents on this subject ..
To connect two AT90S8515s via their serial ports, if they sit next to each other, you can connect directly Rxd1 with Txd2 and Rxd2 with Txd1, or if they are at 1m + distance you will have to use driver circuits: RS-232 or RS-422..
Obviously both UARTs have to be set up to the same baud rate, bits, parities et cetera.
Usually in applications like this you will use so called "command-response" protocol with active serial interrupts set to the highest priority ..
As far as software is concerned, I don't know what do you want these two microcontrollers to "talk about" .. Tell more and maybe we will be able to address this issue ..
 

avr spi slave

If you want to use the SPI for comunication you have to link the SPI lines of the 2 micro's as:
micro1 <-> micro2
MOSI MISO
MISO MOSI
SCK SCK
regarding the SS line, it depends how you want to comunicate between the 2 microcontrollers. The simplest way is to consider one micro the "Master" and the other one "Slave" and tied the SS lines according this to VCC and ground.
For the software part you have to program the SPI registers first (check the datasheet to see how) and then just use them. After you put the data in Master SPI register, it will be shift out to the Slave at the speed that you had set. At the same time the content of Slave SPI register will be shift in Master's SPI register.
Good luck
 

connect two avr

Look to the "AVR151: Setup and use of the SPI"
Application note from atmel site :
**broken link removed**
**broken link removed**

Also there is interresting site 'Procyon AVRlib' where extensive library of AVR functions are listed . It contains SPI interface modules as well :
**broken link removed**
 

avr spi library

i make a kind of smart card and it's reader

i want to devolope my own software with my own algorithm the conniction betwen the master avr at reader and the slave one at card through this lines reset,Xtal,MISO,MOSI,SCK

i want the algorithm or simble assimble to make master starts process any time ,and take the lead to pass the data betwen him and the slave one
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top