This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

timers/counter

i want to use an if statment to start a timer n then i want it to tell me how long it been going for and then i want it to reset when it get to a lower value. where do i start.

Parents
  • Why would you need examples from your lecturer?

    NXP did write the LPC23XX User Manual with the intention that a software developer without knowledge about this chip should be able to use the different features.

    In fact, the majority of LPC23xx chips have been incorporated into real products without any lecturer being involved. The lecturer should be able to help you with common terminology for a microcontroller and for different microcontroller peripherials. But the goal of the project must be for you to spend own time reading through the material available from NXP and Keil.

    Chapter 23 (Timer 0/1/2/3) starts by outlining the registers that needs to be configured, with references to a number of tables. And each register of the timer is then documented broken down into the individual bits.

    The timers requires PCLK_TIMERx to be configured. Chapter 3 (Clocking an power control) describes the different clock options. And the configuration wizard available in the separate tab when you open the startup file allows you to configure the clocking options to get your PCLK_TIMERx to tick at a suitable frequency.

    Since we now finally know that it is a LPC23xx chip - NXP have a large code bundle available for these chips. Have you looked at it?

    And back to an earlier question - have you checked if NXP have any applicable application notes?

Reply
  • Why would you need examples from your lecturer?

    NXP did write the LPC23XX User Manual with the intention that a software developer without knowledge about this chip should be able to use the different features.

    In fact, the majority of LPC23xx chips have been incorporated into real products without any lecturer being involved. The lecturer should be able to help you with common terminology for a microcontroller and for different microcontroller peripherials. But the goal of the project must be for you to spend own time reading through the material available from NXP and Keil.

    Chapter 23 (Timer 0/1/2/3) starts by outlining the registers that needs to be configured, with references to a number of tables. And each register of the timer is then documented broken down into the individual bits.

    The timers requires PCLK_TIMERx to be configured. Chapter 3 (Clocking an power control) describes the different clock options. And the configuration wizard available in the separate tab when you open the startup file allows you to configure the clocking options to get your PCLK_TIMERx to tick at a suitable frequency.

    Since we now finally know that it is a LPC23xx chip - NXP have a large code bundle available for these chips. Have you looked at it?

    And back to an earlier question - have you checked if NXP have any applicable application notes?

Children