I have a bunch of these MSP430F2012 boards lying around and think I
found the perfect application. What's the fastest I can generate a
pulse?
It's been a while since I programmed for the MSP430 but basically all
I want to do is:
pin 1 output
pin 1 low
pin 1 high
pause 4.5us
pin 1 low
return
I need the pulse to be 4.5us +/- .2us.
Can the internal resonator on the MSP430F2012 programmed with IAR
handle this short delay? In assembly, I would just write a short loop
to burn clock cycles.
Thanks for the help!
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
IAR should be able to do this. The internal 16MHz pre-calibrated DCO
frequency is good for +/- 1% across a certain range of temperatures. 4
clocks to change a port pin, so 8 cycles on/off eg 4.5usecs is feasible
but the rest depends on your operating voltage and temperature. from the
specs min max range for 16MHz at 25C is 15.84 to 16.16 at 25C, at 3V and
15.52 to 16.48 from 0 to 85C at 3V, but 15.00 to 16.48 at 3.6V. In
practice you might be better off using the 12Mhz cal fequency since this
ggives exactly 54 clock cycles for 4.5usec pulse. so you can do the
maths around that and find that your worst case error at 3.6V and 0-85C
is 11.7Mhz or 12.3 Mhz which results in a 0.11uS timing error on the
pulse assuming you count your 54 clock ticks correctly.
Cheers
Al
Henry Liu wrote:
> I have a bunch of these MSP430F2012 boards lying around and think I
> found the perfect application. What's the fastest I can generate a
> pulse?
>
> It's been a while since I programmed for the MSP430 but basically all
> I want to do is:
>
> pin 1 output
> pin 1 low
> pin 1 high
> pause 4.5us
> pin 1 low
> return
>
> I need the pulse to be 4.5us +/- .2us.
>
> Can the internal resonator on the MSP430F2012 programmed with IAR
> handle this short delay? In assembly, I would just write a short loop
> to burn clock cycles.
>
> Thanks for the help!
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )