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

 
 
> Frequency counter, на LPC2214
Shedon
сообщение Nov 17 2005, 09:52
Сообщение #1


Частый гость
**

Группа: Свой
Сообщений: 110
Регистрация: 30-11-04
Из: Nizhny Novgorod
Пользователь №: 1 262



Есть желание зделать на capture LPC2214 подсчёт импульсов, вопрос до какой максимальной частоты я смогу считать импульсы и с какой точностью ? Fosc = 10MHz(с кварцевого генератора "СОНАТА" класса А), pll будет множить на 6, т.е. частота cclk=60MHz.
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
moonrock
сообщение Nov 21 2005, 06:46
Сообщение #2


Частый гость
**

Группа: Свой
Сообщений: 166
Регистрация: 24-03-05
Из: Санкт-Петербург
Пользователь №: 3 661



Shedon:
ninja.gif Похоже мы вас в заблуждение ввели. В мануале четко написано, что вход Capture можно использовать как счетный, если выставить нужные биты в TxCTCR.

Count Control Register (CTCR: TIMER0 - T0CTCR: 0xE0004070; TIMER1 - T1TCR: 0xE0008070)
The Count Control Register (CTCR) is used to select between Timer and Counter mode, and in Counter mode to select the pin
and edge(s) for counting.
When Counter Mode is chosen as a mode of operation, the CAP input (selected by the CTCR bits 3:2) is sampled on every rising
edge of the pclk clock. After comparing two consecutive samples of this CAP input, one of the following four events is recognized:
rising edge, falling edge, either of edges or no changes in the level of the selected CAP input. Only if the identified event
corresponds to the one selected by bits 1:0 in the CTCR register, the Timer Counter register will be incremented.
Effective processing of the externaly supplied clock to the counter has some limitations. Since two successive rising edges of the
pclk clock are used to identify only one edge on the CAP selected input, the frequency of the CAP input can not exceed one half
of the pclk clock. Consequently, duration of the high/low levels on the same CAP input in this case can not be shorter than 1/fpclk.

Это значит что максимальная частота счета на практике будет чуть меньше PCLK/2, в вашем случае - примерно 28 МГц, и вы можете сделать нормальный частотомер. w00t.gif
Так что заботиться о прерываниях не стоит.
Go to the top of the page
 
+Quote Post
KRS
сообщение Nov 21 2005, 08:28
Сообщение #3


Профессионал
*****

Группа: Модераторы
Сообщений: 1 951
Регистрация: 27-08-04
Из: Санкт-Петербург
Пользователь №: 555



Цитата(moonrock @ Nov 21 2005, 09:46) *
Shedon:
ninja.gif Похоже мы вас в заблуждение ввели. В мануале четко написано, что вход Capture можно использовать как счетный, если выставить нужные биты в TxCTCR.

Count Control Register (CTCR: TIMER0 - T0CTCR: 0xE0004070; TIMER1 - T1TCR: 0xE0008070)
The Count Control Register (CTCR) is used to select between Timer and Counter mode, and in Counter mode to select the pin
and edge(s) for counting.
When Counter Mode is chosen as a mode of operation, the CAP input (selected by the CTCR bits 3:2) is sampled on every rising
edge of the pclk clock. After comparing two consecutive samples of this CAP input, one of the following four events is recognized:
rising edge, falling edge, either of edges or no changes in the level of the selected CAP input. Only if the identified event
corresponds to the one selected by bits 1:0 in the CTCR register, the Timer Counter register will be incremented.
Effective processing of the externaly supplied clock to the counter has some limitations. Since two successive rising edges of the
pclk clock are used to identify only one edge on the CAP selected input, the frequency of the CAP input can not exceed one half
of the pclk clock. Consequently, duration of the high/low levels on the same CAP input in this case can not be shorter than 1/fpclk.

Это значит что максимальная частота счета на практике будет чуть меньше PCLK/2, в вашем случае - примерно 28 МГц, и вы можете сделать нормальный частотомер. w00t.gif
Так что заботиться о прерываниях не стоит.


А где вы нашли эту информацию?
регистра CTCR у 2214 я не нашел
Go to the top of the page
 
+Quote Post

Сообщений в этой теме
- Shedon   Frequency counter   Nov 17 2005, 09:52
- - Serjio   Если имульсы подавать на счетчик - то только его б...   Nov 18 2005, 09:04
|- - KRS   Цитата(Shedon @ Nov 17 2005, 12:52) Есть ...   Nov 18 2005, 09:23
- - Shedon   Цитатаесли настроить таймер с минимальным прескале...   Nov 18 2005, 11:41
|- - KRS   Цитата(Shedon @ Nov 18 2005, 14:41) Цитат...   Nov 18 2005, 11:53
- - Shedon   ЦитатаВот если надо померять частоту это другой во...   Nov 18 2005, 11:55
|- - KRS   Цитата(Shedon @ Nov 18 2005, 14:55) Цитат...   Nov 18 2005, 12:12
- - Shedon   ЦитатаЗесечь время можно довольно точно на LPC про...   Nov 18 2005, 12:19
- - bombastic   2Shedon Не парься, возми 51, его таймер умеет счит...   Nov 18 2005, 12:38
- - Shedon   ЦитатаНе парься, возми 51, его таймер умеет считат...   Nov 18 2005, 12:43
- - rezident   Есть два способа реализации частотомера. Метод ...   Nov 18 2005, 13:18
- - Shedon   Наверное придётся делить частоту, и мерить период.   Nov 18 2005, 13:28
- - moonrock   Даа, касяк.. Не думал что у LPC нету счетного вход...   Nov 18 2005, 14:11
- - Shedon   ну я здесь не вижу преимуществ перед capture, т.е....   Nov 18 2005, 14:17
- - moonrock   Ну да..тоже должно получиться. Вам ведь 4 МГц надо...   Nov 18 2005, 14:21
- - Shedon   ЦитатаВообще надо подсчитать сколько тактов на все...   Nov 18 2005, 14:37
- - zltigo   Цитата(Shedon @ Nov 17 2005, 12:52) Есть ...   Nov 18 2005, 15:16
|- - Perepic   Цитата(zltigo @ Nov 18 2005, 19:16) Качес...   May 31 2007, 07:44
|- - zltigo   Цитата(Perepic @ May 31 2007, 10:44) Ну э...   May 31 2007, 21:11
- - rezident   Про Interrupt latency ARMов недавно в пустыне обсу...   Nov 18 2005, 15:19
- - moonrock   Стреляйте! Я на другой проц даташит открыл. Де...   Nov 21 2005, 08:39
- - Make_Pic   Цитата(moonrock @ Nov 21 2005, 11:39) Ст...   Jun 1 2007, 08:23
- - viael   Цитата(Make_Pic @ Jun 1 2007, 12:23) Став...   Jun 4 2007, 07:06


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

 


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


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