Jump to content

comp_A+ + timer polling magneto resistive sensor (SM351LT)

Recommended Posts

I'm trying to understand the comparator A+ and Timer capture mode for using honeywell SM351LT sensor.
Can't quite seem to bind it together.


Sensor is currenlty hooked up with permanent power supply. 

Comparator output on P1.7 is tied to an led and works pretty much as expected.


Furthermore hardware pwm is running on P1.6 with ACLK at 32.768Khz crystal to stay in LPM3.

If I put an led on this pin it light up briefly as expected.


If I understand correctly the sensor should be powered on CCR0;

Read Comparator at CCR1 after minimum 10us.

printf reveals indeed 50 cycles between CCR0 and CCR1.


If I use P1.6 to power sensor, it's not giving any reading at CCR1.

Are the timer(s) (TIMER0_A0/TIMER0_A1) misconfigured perhaps?


Then there are some options/settings to bind comparator to compare timer.

TA0CCTL1 |= CCIS_1;                       //Capture CCI1B
TA0CCTL1 |= SCS;                            //Capture sychronize
TA0CCTL1 |= CAP;                            //Capture mode

Cannot seem to figure out how to implement these?


Wondering if this is the right approach at all? Any help/hints appreciated.

There's some links in the attached file I found on the subject.



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...