Rules | Recent posts | topic RSS | Search | Register  | Log in

MPS430F1121 I/O tips need.

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing
Author Message
ltg



Joined: 24 Feb 2002
Posts: 75


Post11 Dec 2002 19:02   MPS430F1121 I/O tips need.

Hi,

I'm trying to learn me MPS430F1121 with IAR C-compiler. But I'm confused when I declera two pins as output and one as input. I think I don't understand P1DIR, P1SEL, P1IN, P1OUT.

Could some of you please show me how to declera two pins as output and one pin as input. When should I use P1SEL? Thank you very much!

Best Regards,
ltg
Back to top
gorkin



Joined: 27 Feb 2002
Posts: 595
Helped: 8


Post12 Dec 2002 4:22   

Hello brother! I will recommend your read more and more the processor datasheet.
P1DIR: This register is used for pin configurate (Input or Output) mode.
Example:
P1DIR = BIT0 + BIT1 + BIT2; // This pins are Output configurated,
// the rest are configurated Inputs .
P1SEL: Special Function Selection, this register is utilized with the other's processor features Ex: CApture and Compare, etc...
função especial

P1OUT: Configurate the output pin
Ex:
P1OUT = BIT0 // Turn-high P1.0

P1IFG: Congfiguration of the interrupt if desired
P1IE : Interrupt Enable

"And remember: IÂ&R-= is the best development tool"
If you have more dificult's, please ask-me
gorkin(at)bol.com.br
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing
Page 1 of 1 All times are GMT + 2 Hours


Abuse
Administrator
Moderators
topic RSS 
sitemap