将主avr中的数据发送到slave avr中的特定引脚 [英] Send data from master avr to specific pin in slave avr

查看:70
本文介绍了将主avr中的数据发送到slave avr中的特定引脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

我想要闪烁三种不同的Led与主和从avr eith spi协议

我用spi协议连接两个avr问题是当我按下三个按钮中的一个按钮时,三个LED指示灯闪烁。因为三个LED的接收条件相同。所以我想让第二个avr知道我在第一个avr中按下了哪个按钮。



我尝试了什么:



我用spi协议连接两个avr问题是当我按下三个按钮中的一个时,三个LED指示灯闪烁。因为三个LED的接收条件相同。所以我想让第二个avr知道我在第一个avr中按下了哪个按钮。

Hello every one .
I want to blink three different Led with master and slave avr eith spi protocol
I have interfaced the two avr with spi protocol the problem is when i press one of the three push buttons the three leds blinks. Because the receive condition is the same for the three leds . So i want to make the 2nd avr knows that which button i have pressed in the first avr.

What I have tried:

I have interfaced the two avr with spi protocol the problem is when i press one of the three push buttons the three leds blinks. Because the receive condition is the same for the three leds . So i want to make the 2nd avr knows that which button i have pressed in the first avr.

推荐答案

如果不知道你到目前为止做了什么,这个还不清楚。



但是你所要做的就是发送数据来指示按下了哪个按钮。这需要定义一个协议来定义通过SPI传输的数据的含义。
This is rather unclear without knowing what you have done so far.

But all you have to do is sending data that indicates which button has been pressed. This requires the definition of a "protocol" that defines the meaning of the data transferred via SPI.


这篇关于将主avr中的数据发送到slave avr中的特定引脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆