Hi Marquis,

I can understand your confusion, because until a month ago,
I was also new to the MSP430.

P1OUT P2DIR etc. are all explained in the User Guide for the
corresponding processor. These User Guides are available in PDF from 
the TI website. If you read them thoroughly, you will easily understand
all these notations. 

For eg.:
P1 refers to your i/o port Port 1.
P1OUT is the register which maintains the data on this port.
So 
P1OUT |= 0x00
means, OR the P1OUT byte, which is the current state of the
bits on Port 1, with 0x00 (0000 0000) and ASSIGN the result to the P1OUT
register.
OUT means put these bits on the Port, ie. for some one else to read
(some other processor or component). IN would mean, read in the 
value of the bits on the port.

<< is a simple left-shift.
1 << 2 means left shift 0x01 (0000 0001) by 2 bits
to give 0000 0100, and so on.

This document explains all you need to know about bit operations in C:
http://www.cs.cf.ac.uk/Dave/C/node13.html#SECTION001300000000000000000

If you are familiar with c\c++ you will understand these concepts
easily,
provided you have read the user guides and know what P1OUT etc is.
This information specifically is available in the Digital IO Operation 
section of the user guide.

Good luck,
Karan

On Sat, 2004-10-16 at 12:07, Marquis wrote:

> Dear All,
> 
>           I am doing my frist project on using the MSP430 to read data 
> from a parallel ADC. I know C and C++ , however, I found that there is a 
> little bit different with the MSPGCC and GCC. Can you tell me where can 
> I find books / document taking about the MSPGCC?
> 
>           I need the explanation of some strange operators such as, 
> P1OUT  |= 0x00
> 
> or P1OUT = (1<<i) | (0x80>>(o&7));
> 
> 
> Thanks,
> Marquis
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

CM II
Resolution Systems Inc.

Reply via email to