EmbeddedRelated.com
Forums

LPC2378 Doubts - Clock, SSP/SPI, Timer)

Started by DeV January 28, 2012
thanks David...but prescale register isnt the problem...prescale counter
register is wat v ened to c...

On Mon, Jan 30, 2012 at 2:25 AM, David Smead wrote:

> **
> I finally dragged out the manual. The prescale counter increments
> every pclk up to the value set in the prescale register.
> When it reaches that value, the timer/counter is incremented and the
> prescale counter is reset to start over.
>
> So yes, put anything you want in the prescale register. If the
> prescale register is 0, then the timer/counter is incremented every
> pclk.
>
> DaveS
> On Sun, Jan 29, 2012 at 3:35 AM, DeV wrote:
> > But David, Prescale Count register is 32 bit long and v can set it as
> > 12,000,000 or 0x00B71B00 (hexa equivalent of 12,000,000)..y shouldn't
> this
> > work?
> >
> > On Sun, Jan 29, 2012 at 1:13 PM, David Smead
> wrote:
> >
> >> **
>
> >>
> >>
> >> You set the prescaler as a division. Usually those are in powers of
> >> 2. For example. by 2, 4, 8, 16, etc. I you want 1 Hz from a 12 MHz
> >> clock you'd have to set the prescaler to 12,000,000, which is not a
> >> binary number and probably not possible. To get 1 Hz, you need to
> >> select a prescale division and then set the timer to the necessary
> >> reload count.
> >>
> >> DaveS
> >>
> >>
> >> On Sun, Jan 29, 2012 at 12:50 AM, DeV wrote:
> >> > Thanks DaveS..but does that mean that if my pclk is 12Mhz and i set
> the
> >> > prescaler as 12Mhz so my clock reference for the timer shud b
> 1hz...i.e.
> >> 1
> >> > cycle (i.e. 1 rising edge) per sec...
> >> >
> >> > On Sun, Jan 29, 2012 at 12:45 PM, David Smead
> >> wrote:
> >> >
> >> >> **
> >>
> >> >>
> >> >>
> >> >> A prescaler is just a divider ahead to the actual clock.
> >> >>
> >> >> DaveS
> >> >>
> >> >>
> >> >> On Sat, Jan 28, 2012 at 11:50 PM, DeV wrote:
> >> >> > thanks so much Richard...i referred to the keil debug session and
> >> >> > understood that pll is generating 288Mhz which is inturn divided
> for
> >> CPU
> >> >> as
> >> >> > 48Mhz and peripheral clock as 12Mhz...however my doubt for counter
> >> still
> >> >> > remains d same...wat im getin confused is the Prescale counter
> >> >> > Register...is the prescale counter register used to further divide
> the
> >> >> pclk
> >> >> > frequency for the timer?? or is prescale counter is an individual
> >> >> operating
> >> >> > register that keeps on increamenting at every pclk edge and
> increments
> >> >> > timer counter wen it matches prescale register...i.e. prescale
> counter
> >> >> can
> >> >> > only be read and not written!
> >> >> >
> >> >> > On Sat, Jan 28, 2012 at 8:29 PM, rtstofer
> >> wrote:
> >> >> >
> >> >> >> **
> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> --- In l..., "rtstofer" wrote:
> >> >> >> > No, read section 7.4 and table 5.1 of the User Manual
> >> >> >> >
> >> >> >> > Richard
> >> >> >> >
> >> >> >>
> >> >> >> Make that table 51 - typo...
> >> >> >>
> >> >> >> Richard
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> >
> >> >> > Dev Sampat****
> >> >> >
> >> >> > Cell (Oman): (+968) - 9304 8932****
> >> >> >
> >> >> > Email: d...@gmail.com
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> >

An Engineer's Guide to the LPC2100 Series