Am 10 Sep 2003 um 4:22 hat amol shrotri geschrieben:

>Hi,
>    This is Amol working in Mumbai. I just started working on MSP430.
>So may be my problem is of very initial level. But please help me.
>    I m trying implement Voltage memssurement module. for that
>I m configuring Timer_B for 1 sec. And at the same time i m configuring
>comparator with 0.25 v on -ve terminal of comparator and external voltage
>to +ve terminal which i want to calculate. So at the time of starting timer
>I m starting comparator also and when comparator give me interrupt i want to
>get the count of the timer at the same time. But when I tried to read value
>for TBR it is giving me alway the value set in TBCCR0. So is it correct that 
>to read
>timer count I m reading TBR? Please help me.


Hi Amol,

as far as I understood, you are starting the timer together with the comparator 
an after the comparator gave an interrupt you try a manual reading of the 
actual 
value of timer B.
In principle it should work. It seems to me, that youre are runing the timer in 
mode
"Up to TBCCR0" where it stopps after reaching this value. This means, your 
timer runs 
too fast for the time between starting timer and comparator interrupt and you 
have to 
recalculate your time constants.

But there's another way to measure the time from start to Interrupt:
Use the capture feature of the timer. The capture can be initiated from 
comparator

Attached you will find an example (MSP430F449) I used for measuring 
temperatures 
by resistance 
measure of an NTC. But it uses TIMERA. Nevertheless it should show you the way

Kind regards
J. Hübler
GEMAC mbH
Zwickauer Str. 227 
09116 Chemnitz
Tel. +49 371 3377 350
Fax. +49 371 3377 272
mailto: hueb...@gemac-chemnitz.de



--
Bitte beachten Sie, dass diese Email vertrauliche und/oder rechtlich geschuetzte
Informationen enthalten kann. Der Inhalt ist ausschliesslich für den 
bezeichneten
Empfänger bestimmt. 
Falls Sie nicht der richtige Adressat oder dessen Vertreter sind, setzen Sie 
sich bitte
mit dem Absender in Verbindung. 
Jede Form der Vervielfaeltigung oder Weitergabe des Inhaltes fehlgeleiteter
Emails ist unzulaessig.

Please note that this email might contain confidential and / or legally
protected information. The content is exclusively intended for the
designated addressee. If you are not the right addressee or his deputy,
please get in contact with the sender of this email. Every kind of
publication, duplication or transmission of the content of misdirected
emails is inadmissible.

GEMAC Viruscheck: OK
Virus checked by G DATA AntiVirusKit Version: AVK 12.0.573 from 09.09.2003
--

<<attachment: ntc.zip>>

Reply via email to