Reply by Stuart_Rubin July 21, 20112011-07-21
Did you look at this:
http://focus.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId&tabId02&literatureNumber=slaa274a&docCategoryId=1&familyId4
or this:
http://focus.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId&tabId02&literatureNumber=slaa458&docCategoryId=1&familyId4

I would suggest that you call your local TI representative and ask if you can get one of the demo boards shown in this clip:
http://www.youtube.com/watch?vSUiHYGDMg

Sadly, if this is too hard for a year-long final project, then perhaps the project is too much. I think you can do it, though.

Stuart

--- In m..., julius hasan wrote:
>
> do you have any sample of it?i can't copy it from any friends of mine
> cause this ic is not available here in indonesia, please help me to
> build one.this is for my final project
>
> 2011/7/13, Stuart_Rubin :
> > Do we really need another MSP430-based pulsed oximeter? And aren't there
> > TONS of examples of these out there?
> >
> > If this is a student project, you're just copying someone's work. If it's a
> > business, I think you need to do some more research.
> >
> > Or at least ask for more specific, targeted help.
> >
> > --- In m..., julius hasan wrote:
> >>
> >> any one can help me building pulse oxi with msp 430?
> >>
> >
> >
> >
>

Beginning Microcontrollers with the MSP430

Reply by julius hasan July 21, 20112011-07-21
do you have any sample of it?i can't copy it from any friends of mine
cause this ic is not available here in indonesia, please help me to
build one.this is for my final project

2011/7/13, Stuart_Rubin :
> Do we really need another MSP430-based pulsed oximeter? And aren't there
> TONS of examples of these out there?
>
> If this is a student project, you're just copying someone's work. If it's a
> business, I think you need to do some more research.
>
> Or at least ask for more specific, targeted help.
>
> --- In m..., julius hasan wrote:
>>
>> any one can help me building pulse oxi with msp 430?
>>
Reply by Stephan July 19, 20112011-07-19
--- In m..., Peter Johansson wrote:
>
> On Sat, Jul 9, 2011 at 9:50 AM, Stuart_Rubin wrote:
>> For some strange reason, much, if not all, of the TI example code
>> uses the +, not |.

> Does anyone know why this is? Is there ever a reason to use "+" over
> "|" for setting/manipulating bitfields like this?

if you are putting a new value into a bitfield, where you need to clear some bits, set other bits, and leave the rest of the bits unchanged, one would clear out all the bits to be manipulated with the bitwise AND, the set the required bits with the bitwise OR. At this point one is ORing a 0 with a 1, which is the same operation as adding (no carry). In some microprocessors, adding takes less machine cycles to execute than setting bits.

Reply by Stuart_Rubin July 19, 20112011-07-19
Do we really need another MSP430-based pulsed oximeter? And aren't there TONS of examples of these out there?

If this is a student project, you're just copying someone's work. If it's a business, I think you need to do some more research.

Or at least ask for more specific, targeted help.

--- In m..., julius hasan wrote:
>
> any one can help me building pulse oxi with msp 430?
>

Reply by julius hasan July 12, 20112011-07-12
any one can help me building pulse oxi with msp 430?
2011/7/11, Hans Henry von Tresckow :
> On Sun, Jul 10, 2011 at 8:56 AM, Tony wrote:
>
>> **
>> Using either bitwise_OR or + is OK most of the time.
>>
>> But if the data by mistake includes the same value more than ones.
>> The result will be very different.
>>
>> 2 + 4 + 8 + 16 = 30
>> 2 or4 or8 or16 = 30
>>
>> 2 + 4 + 8 + 8 = 22 (not the same as below)
>> 2 or4 or8 or8 = 14
> Thank you for pointing out this potential pitfall. I just corrected my
> latest project to take care of this.
>
> --
> Henry von Tresckow (hvontres)
>
Reply by Milind Pagdhare July 11, 20112011-07-11
Dear,
Pls. check for the Flag concept.

Regards,
Milind Pagdhare
Embedded Technology Consultant.
On 7/11/11, Harri Haataja wrote:
> On 9 July 2011 19:02, Peter Johansson wrote:
>> On Sat, Jul 9, 2011 at 9:50 AM, Stuart_Rubin
>> wrote:
>>
>>> For some strange reason, much, if not all, of the TI example code uses
>>> the +, not |.
>
> And that example is sadly contaminating a lot of other code, too.
>
>> Does anyone know why this is? Is there ever a reason to use "+" over
>> "|" for setting/manipulating bitfields like this?
>
> No. As for reference, The Book says (any typos are probably mine):
>
> [0, p.48]
>
> The bitwise AND operator & is often used to mask off some set of bits;
> for example,
>
> n = n & 0177;
>
> sets to zero all but the low-order 7 bits of n.
>
> The bitwose OR operator | is used to turn bits on:
>
> x = x | SET_ON;
>
> sets to one in x the bits that are set to one in SET_ON.
> [0, p.149]
>
> Certain idioms appear frequently:
>
> flags |= EXTERNAL | STATIC;
>
> turns on EXTERNAL and STATIC bits in flags, while
>
> flags &= ~(EXTERNAL | STATIC);
>
> turns them off and
>
> if ((flags & (EXTERNAL | STATIC)) == 0) ...
>
> is true if both bits are off.
> It then continues on to bitfields. The Book is, of course, right when
> it comes to C :)
> [0] Brian W. Kernighan, Dennis M. Ritchie. The C Programmin Language.
> Second Edition. Prentice Hall 2009.
>
> --
> I appear to be temporarily using gmail's horrible interface. I
> apologise for any failure in my part in trying to make it do the right
> thing with post formatting.
>
Reply by Harri Haataja July 11, 20112011-07-11
On 9 July 2011 19:02, Peter Johansson wrote:
> On Sat, Jul 9, 2011 at 9:50 AM, Stuart_Rubin wrote:
>
>> For some strange reason, much, if not all, of the TI example code uses the +, not |.

And that example is sadly contaminating a lot of other code, too.

> Does anyone know why this is? Is there ever a reason to use "+" over
> "|" for setting/manipulating bitfields like this?

No. As for reference, The Book says (any typos are probably mine):

[0, p.48]

The bitwise AND operator & is often used to mask off some set of bits;
for example,

n = n & 0177;

sets to zero all but the low-order 7 bits of n.

The bitwose OR operator | is used to turn bits on:

x = x | SET_ON;

sets to one in x the bits that are set to one in SET_ON.
[0, p.149]

Certain idioms appear frequently:

flags |= EXTERNAL | STATIC;

turns on EXTERNAL and STATIC bits in flags, while

flags &= ~(EXTERNAL | STATIC);

turns them off and

if ((flags & (EXTERNAL | STATIC)) == 0) ...

is true if both bits are off.
It then continues on to bitfields. The Book is, of course, right when
it comes to C :)
[0] Brian W. Kernighan, Dennis M. Ritchie. The C Programmin Language.
Second Edition. Prentice Hall 2009.

--
I appear to be temporarily using gmail's horrible interface. I
apologise for any failure in my part in trying to make it do the right
thing with post formatting.
Reply by Hans Henry von Tresckow July 10, 20112011-07-10
On Sun, Jul 10, 2011 at 8:56 AM, Tony wrote:

> **
> Using either bitwise_OR or + is OK most of the time.
>
> But if the data by mistake includes the same value more than ones.
> The result will be very different.
>
> 2 + 4 + 8 + 16 = 30
> 2 or4 or8 or16 = 30
>
> 2 + 4 + 8 + 8 = 22 (not the same as below)
> 2 or4 or8 or8 = 14
Thank you for pointing out this potential pitfall. I just corrected my
latest project to take care of this.

--
Henry von Tresckow (hvontres)


Reply by Tony July 10, 20112011-07-10
Using either bitwise_OR or + is OK most of the time.

But if the data by mistake includes the same value more than ones.
The result will be very different.

2 + 4 + 8 + 16 = 30
2 or4 or8 or16 = 30

2 + 4 + 8 + 8 = 22 (not the same as below)
2 or4 or8 or8 = 14

Reply by old_cow_yellow July 10, 20112011-07-10
I often say: "Add cream and sugar to coffee."
Should I replace that by: "Or cream Or sugar to coffee"?

Wait, I did not mean Logic_OR. I meant Bit-wise-OR.

"coffee Bit-wise-OR update-with cream Bit-wise-OR sugar"

--- In m..., Jon Kirwan wrote:
>
> On Sat, 9 Jul 2011 12:02:08 -0400, you wrote:
>
> >On Sat, Jul 9, 2011 at 9:50 AM, Stuart_Rubin wrote:
> >
> >> For some strange reason, much, if not all, of the TI example code uses the +, not |.
> >
> >Does anyone know why this is? Is there ever a reason to use "+" over
> >"|" for setting/manipulating bitfields like this?
>
> Old habits, perhaps. Some BASIC interpreters (for example,
> HP's 2000F timesharing system) didn't even include a way to
> specify a logical inclusive-OR operation. So you had to use
> addition. Once that gets ingrained from long practice, it
> can be a slight bit of work to undo the old habit.
>
> An argument _could_ be made, I suppose, that if addition is
> used instead of an inclusive-or, one _might_ discover
> inherent problems in some expression more quickly. ;) It
> might cause more obvious problems in operation if some fields
> overflowed into other fields, than if overlapping fields
> merely interfered a little. Okay. I'm stretching the
> argument. But it is fun to do. :P
>
> Jon
>