Jump to content

tfcroft4

Members
  • Content Count

    9
  • Joined

  • Last visited

  1. Interesting thought - could you expand on that. I am still getting to grips with features of this processor. DS3232 has a 32khz signal Ted
  2. This has been discussed before for example: http://forum.43oh.com/topic/6213-ds3231-rtc-library-for-5529/?p=68658 Not sure if the RTC counter can be accessed sub second. In my case I am planning to use the DS3232 SQW interupt as it has 2 to 3 ppm accuracy and I have used this before on other MCUs. The RTC crystal is self compensating so nothing to worry about there. Ted
  3. Spirilis Thanks. I was moving that way. No pin output is needed. Is there a list of Timers / interrupts used by core and various libraries to see where clashes may occur as I may want to use Analog output for some audio. As an aside I tried editing the TICKS_PER_WDT_OVERFLOW value in wiring.c, I found 8274 was closest to 1000 millis per second but still not perfect. I did look at the arithmetic in wiring.c and could not get my head around how the fractions work in an integer count. Ted
  4. My data shows a consistency rather than a jitter. If I get 989 ticks in 1 second then each tick is 0.001011122 of a second. I can see in wiring.c that the WDT is set to fire on 8192 clock ticks so a naive calculation would suggest that 8102 ticks might be closer to the mark. I assume that there is an allowance for ISR overhead somewhere too, I realise that this may be far too simplistic! Thanks Ted
  5. I am building an accurate clock using and external RTC module. I am using a Launchpad MSP430F5529 25Mz and an external DS3232 RC board. (These boards have 2 or 3 ppm accuracy) With an accurate PPS tick I know the seconds time is accurate. For sub second timing I will need to use an internal counter. I have an ISR that registers the pulse from the DS3232 SQW. This routine sets a flag (PPS) and saves the millis() value to a volatile variable only. In my main loop I wait for the PPS flag, update the time values then Serial.print the recorded millis value and the time. The table below shows the output. The difference column (calculated post hoc) shows a regular millis() count of 989 per second. Hence my question - how accurate is the timer used to generate millis()? Supplementary questions: Can the millis accuracy be improved? AND/OR If I wanted to implement a more accurate millisecond tick what timer(s) are available to me in Energia? Thanks Ted millis diff Time String 45495 07:25:47 46484 989 07:25:48 47473 989 07:25:49 48461 988 07:25:50 49450 989 07:25:51 50439 989 07:25:52 51427 988 07:25:53 52416 989 07:25:54 53404 988 07:25:55 54393 989 07:25:56 55382 989 07:25:57 56371 989 07:25:58 57360 989 07:25:59 58348 988 07:26:00 clock.ino
  6. There are subtle differenced in the tone and toneAC approaches. Energia and arduino tone uses a square wave generated by a pin toggle from the timer interrupt (on an arbitary pin.) ToneAC uses two timer compare pins to produces 2 PWM phase offset signals. This produces a higher averaged signal than the single square wave approach. ToneAC seems to be a neat approach to getting a louder 'beep'.
  7. The answer may be in here: http://www.ti.com/lit/an/slaa513a/slaa513a.pdf "MultipleTimeBaseson a SingleMSP430
  8. Thanks for the reply. Do you have suggestions on the settings I would need. I have not yet got to grips with the low level configurations on this device. In the Arduino code the key settings seem to be: // Set PWM, phase and frequency corrected // Set Inverted/non-inverted mode (AC). Thanks Ted Ted
  9. There is a modified tone library called toneAC http://playground.arduino.cc/Code/ToneAC: "Replacement to the standard Arduino tone library with twice the volume, higher quality and higher frequency."This library works by setting one pin high and a second low. I have seen this referred to as a push-pull method. Is this technique feasible on the MSP430F5529 Launchpad. I think one output would be Set/Reset and the pair Reset/Set mode but as a beginner on the MSP I am not sure and would welcome insight from more experienced users as to how this might be implemented. Thanks Ted
×
×
  • Create New...