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.

ISP communication between 2 atmega HELP PLEASE!!

Status
Not open for further replies.

lucian1996

Newbie level 1
Joined
Mar 29, 2017
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
10
ISP comunication between 2 atmega HELP PLS!!

Hy! I'm working on a project that contain 2 atmega uC, first atmega collect some information from the sensors, and send a data to the second atmega. The hardware connection is made by ISP(MOSI, MISO SCK, SS PINS, hope i get it right). I am not very friendly with comunication between 2 uC so please help me how to do it.

Thank you!
 


Re: ISP comunication between 2 atmega HELP PLS!!

You did not specify which ATmega device you're working with, but some of them have several UARTs available. If it is the case I would consider using that instead, particularly because it is more suited to work with different boards - obviously interfacing with RS232 levels ( I'm assuming both the 2 ATmega's you are referring are not at the same PCB ).
 

Re: ISP comunication between 2 atmega HELP PLS!!

If you do use SPI, remember that it is an exchange protocol where one device (often termed the master) controls the exchange process with the other device (normally termed the slave).
SPI exchanges are very useful when you have two devices that are fairly close together (often on the same circuit board) and there is information going both ways. One example would be a microcontroller and an EEPROM where the microcontroller is sending command to save or read information to and from the EEPROM.
SPI exchanges also require the slave to be ready to send a valuer to the master whenever the master initiates the exchange. Of course it is always possibel for whatever is exchanged to be thrown away by the other device, but if that happens all the time, it could be an indicaiton that SPI is not the best way to go.
If the information flow is really one way (as it would seem from your initial description) then a UART (as suggested above) is probably a better choice for a couple of reasons: firstly it is simpler in that the sender just sends whenever it likes and the receiver can sit there and read in the data as it comes in. Secondly (again as have been mentioned above) if there is any distance between the sender and receiver, then there are a number of common standard protocols (RS232 having been mentioned) that let you send the signals for considerable distances.
Susan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top