ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
25 июля
961356 Топик полностью
Троешник (28.11.2019 12:03, просмотров: 93) ответил Aleksey_75 на УВЫ не AVR! но вроде даже там потребуется перекоммутация
>> If SS is configured as an input, it must be held high to ensure Master SPI operation. If the SS pin is driven low by peripheral circuitry when the SPI is configured as a Master with the SS pin defined as an input, the SPI system interprets this as another master selecting the SPI as a slave and starting to send data to it. To avoid bus contention, the SPI system takes the following actions: 1. The MSTR bit in SPCR is cleared and the SPI system becomes a Slave. As a result of the SPI becoming a Slave, the MOSI and SCK pins become inputs. 2. The SPIF Flag in SPSR is set, and if the SPI interrupt is enabled, and the I-bit in SREG is set, the interrupt routine will be executed.