реклама на сайте
подробности

 
 
> LPC22xx SPI, Пытаюсь настроить передачу через SPI. Реакция нулевая...
schaulin
сообщение Aug 24 2006, 13:50
Сообщение #1





Группа: Новичок
Сообщений: 11
Регистрация: 26-01-06
Из: Germany
Пользователь №: 13 649



Пытаюсь настроить передачу через SPI. Реакция нулевая...

void SPI_Init(void)
{
PINSEL1 |= 0x88; // configure SPI1 pins

SPCCR = 0x08; /* Clock Counter = 8 */
SPCR = 0x08A0; /* SPIE and MSTR enable, transfer with 8 bits */

}

int SPI_write (void)
{
unsigned char result;

SPDR = data; // send next SPI channel 0 data
while (!(SPSR & 0x80)) ; // wait for transfer completed

return (0);

}

Сообщение отредактировал schaulin - Aug 24 2006, 13:52


--------------------
spi
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
solidreg
сообщение Aug 24 2006, 14:03
Сообщение #2


Участник
*

Группа: Свой
Сообщений: 74
Регистрация: 24-10-05
Пользователь №: 10 056



From PDF:
"Note: LPC2119/2129/2194/2292/2294 configured to operate as SPI master MUST select
SSEL functionality on an apropriate pin and have HIGH level on this pin in order to act
as a master."

Kak tam y vas dela c SSEL?
Go to the top of the page
 
+Quote Post
schaulin
сообщение Sep 14 2006, 11:14
Сообщение #3





Группа: Новичок
Сообщений: 11
Регистрация: 26-01-06
Из: Germany
Пользователь №: 13 649



Цитата(solidreg @ Aug 24 2006, 16:03) *
From PDF:
"Note: LPC2119/2129/2194/2292/2294 configured to operate as SPI master MUST select
SSEL functionality on an apropriate pin and have HIGH level on this pin in order to act
as a master."

Kak tam y vas dela c SSEL?

Цитата
Unlike earlier Philips ARM devices, LPC2210/2220 configured as a SPI0/1
master does not need an external pull-up on the SSEL0/1 pin in order to perform.
LPC2210/2220 based SPI master can use the pin hosting SSEL0/1 function for a
non-SPI purpose, too. For example, pin providing the SSEL0 function can be
configured as an output digital GPIO pin and used to select one of the SPI0
slaves. This is usually the case with a SPI system is designed around a single
master device


всем привет
я нашёл ошибку
всё дело было в SSEL сигнале несмотря на то что в датешите стоит что его можно непреминять

Сообщение отредактировал schaulin - Sep 14 2006, 11:15


--------------------
spi
Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 29th July 2025 - 08:49
Рейтинг@Mail.ru


Страница сгенерированна за 0.01421 секунд с 7
ELECTRONIX ©2004-2016