Re: Help!Try to input an integer to ez430-rf2500 target boar
Hi,
You've got several errors in the code, so writing a concise answer to your problem impossible.
Additionally, you don’t show enough code for us to figure out exactly what is it you're trying to do and find all errors.
I'm guessing you want to setup some sort of serial communication, but it seems you're using the wrong port for that purpose. A quick look in the datasheet shows pins P3.4 / P3.5 as UCA0_TX / RX, respectively, and not P2.0 (which is an analog input).
I won't go into how to configure the pins (you'll find it in the user manual), but the code related to P2.0 is irrelevant and you can remove it.
Anyway, I wanted to point out another error when you write
Code:
P2DIR |= 0x00; // has no meaning: leaves all bits intact. Should be "&="
As a general rule,
AND (
&) with
0 will reset (make something 0), and
OR (
|) with
1 will set (make something 1). Other combinations will leave the bits unchanged.
Arthur