| поискавой системы для электроныых деталей |
|
ATmega162 датащи(PDF) 160 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
ATmega162 датащи(HTML) 160 Page - ATMEL Corporation |
|
160 / 324 page ![]() 160 2513K–AVR–07/09 ATmega162/V Note: 1. The example code assumes that the part specific header file is included. Assembly Code Example(1) SPI_MasterInit: ; Set MOSI and SCK outpu?, all others input ldi r17,(1<<DD_MOSI)|(1<<DD_SCK) out DDR_SPI,r17 ; Enable SPI, Master, se? clock rate fck/16 ldi r17,(1<<SPE)|(1<<MSTR)|(1<<SPR0) out SPCR,r17 ret SPI_MasterTransmit: ; Start transmission of ?ata (r16) out SPDR,r16 Wait_Transmit: ; Wait for transmission ?omplete sbis SPSR,SPIF rjmp Wait_Transmit ret C Code Example (1) void SPI_MasterInit(void) { /* Set MOSI and SCK outp?t, all others input */ DDR_SPI = (1<<DD_MOSI)|(?<<DD_SCK); /* Enable SPI, Master, s?t clock rate fck/16 */ SPCR = (1<<SPE)|(1<<MSTR?|(1<<SPR0); } void SPI_MasterTransmit(char cData) { /* Start transmission */ SPDR = cData; /* Wait for transmission?complete */ while (!(SPSR & (1<<?PIF))) ; } |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |