Discussion in "ARM Development" started by    bonois_dailleurs    May 15, 2011.
Sun May 15 2011, 09:53 pm
#1
hi everybody ,

i wanted to know how to put true values into match registers of a timer
for exemple T0MR0 or T0MR1 ,

for exemple i want to generate an interrupt after 20 ms and the period (T0MR0 = 60ms)
what would i put into T0MR0 and T0MR1 ???

thank you in advance
Mon May 16 2011, 08:49 pm
#2
no answer ???
Mon May 16 2011, 11:53 pm
#3
The lpc2378 is not a device used by many here, so you are unlikely to get a detailed reply unless
DavesGarage visits.

I found this thread that seems to cover the question you asked.
It is not for exactly the same device but should be close enough.

http://www.embeddedrelated.com/groups/lpc2000/show/14210.php
Tue May 17 2011, 12:15 am
#4
thank you for the answer


[ Edited Thu May 19 2011, 01:37 pm ]
Tue May 17 2011, 01:42 am
#5
Thanks..
hope it helped.
Wed May 18 2011, 10:15 pm
#6
simplest way is..

TMR0 = TIME_MS * TMRCLOCK/1000 - 1; // this will generate almost exact delay as you want. try it. this applies to all.. timers.

in above equation,
TIME_MS = delay in miliseconds you want e.g. 20 for 20ms
TMRCLOCK = clock in Hz you set during startup for that timer e.g. if 12Mhz then 12000000

Hope this will help you
Thu May 19 2011, 12:55 am
#7


The lpc2378 is not a device used by many here, so you are unlikely to get a detailed reply unless
DavesGarage visits.

ExperimenterUK


Okay.. or Ajay of course
Thu May 19 2011, 08:09 pm
#8
@Phil hehe.... thanks

After ARM7, I moved on to ARM9 now Armada100 Family... Linux is nice, still learning.
Tue Jun 07 2011, 10:39 pm
#9
Ha! You guys crack me up... I too have moved on from my brief experimenting with the LPC2478, and am now deeply into the LPC1788 Cortex M3 processor...

I would recommend downloading the examples from the NXP website. They go over every peripheral the device has to offer, complete with working code examples. You can find them at NXP.COM - check it out.
Sun Jun 12 2011, 11:53 am
#10
I agree with dave they have good examples..

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Richardgar
Sat Apr 20 2024, 11:05 am
AntoniaRoons
Fri Apr 19 2024, 09:59 pm
carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am