Difference between RIT and Timer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Difference between RIT and Timer

1,412件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karanmehta93 on Sun Oct 14 04:18:43 MST 2012
1. What is the basic difference between RIT and timer in LPC1769 ?
If I want a code to generate a delay of n microseconds how can I do it?
2.How to use the index pin provided with QEI?
3. If i use one encoder with one capture and I want to record it's velocity how many timers will be needed??


Thanks in advance
0 件の賞賛
返信
8 返答(返信)

1,187件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.widyanto on Wed Oct 24 21:15:05 MST 2012
Oh, sorry. I think you're right, there should be 'Basic Configuration' section for it. I'll inform the developer for update.

Thanks for let us know
0 件の賞賛
返信

1,187件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pax on Wed Oct 24 06:38:57 MST 2012

Quote: daniel.widyanto
...The QEI is configured using the following registers:...


Yes, for the QEI the section is there, but for the RIT it is not.

Thanks,
0 件の賞賛
返信

1,187件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.widyanto on Tue Oct 23 19:14:18 MST 2012
Hi Pax,

The 'Basic Configuration' section is there (Section 26.1, UM10360 - LPC17xx User Manual, Rev 2 - 19 Aug 2010, page 543 of 840).

[B]26.1 Basic configuration[/B]
The QEI is configured using the following registers:
[LIST]
1. Power: In the PCONP register (Table 46), set bit PCQEI. Remark: On reset, the QEI is disabled (PCQEI = 0).
2. Peripheral clock: In the PCLKSEL0 register (Table 40), select PCLK_QEI.
3. Pins: Select QEI pins through the PINSEL registers. Select pin modes for port pins with QEI functions through the PINMODE registers (Section 8.5).
4. Interrupts: See Section 26.6.4. The QEI interrupt is enabled in the NVIC using the appropriate Interrupt Set Enable register.
[/LIST]

May I know which part that is missing ?

Thanks for your input
0 件の賞賛
返信

1,187件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pax on Tue Oct 23 11:43:19 MST 2012
Hello Daniel,

If you could also update the RIT section in the LPC17xx User manual to include a "Basic Configuration" section that would be good. It must be some accidental omission that section is not there?

I have version "Rev. 2 — 19 August 2010" of the UM - that is the latest I presume?
0 件の賞賛
返信

1,187件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karanmehta93 on Tue Oct 16 04:56:29 MST 2012
In velocity capture in QEI, Does the timer count from QEILoad value to timer overflow value or it starts from 0 and ends at QEILoad value and then generate an interrupt. Acc to formula to RPM it is the second one but in the user maunal on Pg no 546 it is given the opposite....
Help me out!!!
0 件の賞賛
返信

1,187件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.widyanto on Mon Oct 15 20:40:45 MST 2012
[I][B]Quote: How will the index pin know that a full revolution is completed when we are not providing by any means the ppr i.e. pulses per revolution???[/B][/I]
That's the whole point of index pin use for.

There should be some mechanical/physical 'bump' or additional hole on the rotary encoder. So when the encoder finishes 1 round, that hole / physical bump / dent will trigger some electrical signal to indicate that the encoder has run for 1 round.

Check with the mechanical drawing of your encoder. They should have this or you can drill 1 hole (assuming it's a disk-kind of encoder), and put opto-coupler. So when the encoder finish 1 round, the opto-coupler will trigger the index pin.

[I][B]Quote:How can you use only one timer for both capture and timer?
One timer will be used for capture of input. Suppose the T0TC stores the no of edges of encoder and one timer T1TC can give me time with the help of match register.[/B][/I]

Are you talking about normal Timer ? If you want to measure the velocity, just use the QEI, without using other timer (either normal Timer or RIT). The index pin is used to count how many rotation passed. The QEI also have internal timer. Combined both, you can measure rotation / sec very easy (and automatically). Read QEI chapter for the details

[I][B]Quote: Also explain me the THRE interrupt.[/B][/I]

Read the user manual. It's already explained clearly.
0 件の賞賛
返信

1,187件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by karanmehta93 on Mon Oct 15 07:03:44 MST 2012
How will the index pin know that a full revolution is completed when we are not providing by any means the ppr i.e. pulses per revolution???

How can you use only one timer for both capture and timer?
One timer will be used for capture of input. Suppose the T0TC stores the no of edges of encoder and one timer T1TC can give me time with the help of match register.

Also explain me the THRE interrupt.
0 件の賞賛
返信

1,187件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.widyanto on Sun Oct 14 20:38:29 MST 2012
Hi,

[I]Quote: What is the basic difference between RIT and timer in LPC1769 ?[/I]
A lot. Of the of the thing is that the normal Timer has few Match registers. You can generate several delay or interrupt with different time interval just by using single Timer (eg. Timer0 has 4 Match registers, and can be used to create 4-different interrupt with different intervals). For RIT, you can only have single interrupt interval.

To use RIT, configure the clock source for RIT (PCLKSEL1), set RICOMPVAL to the time interval, set RITEN in RICTRL. Then wait for RITINT (in RICTRL) to active.

[I]Quote:.How to use the index pin provided with QEI?[/I]
Connect your encoder to analog circuit (usually op-amp) that can generate 3.3V and 0V, then connect that analog circuit to the QEI pins (PhA, PhB, and Index)

The index pin is used to indicate 1 full rotation of the encoder. I don't know how your encoder mechanical form looks like, but make sure that the index pin signal is only triggered when 1 full rotation of the encoder has reached.

[I]Quote: If i use one encoder with one capture and I want to record it's velocity how many timers will be needed??[/I]
1-Timer
0 件の賞賛
返信