Jump to content
43oh

KiethEpstein

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Thank you cde, that was a perfectly clear explanation! You have been extremely helpful!
  2. Thanks cde I understood everything perfectly. So when the pin is set to OUTPUT, is the resistor enabled or disabled? Because the way I see it, if the resistor is enabled, having it set to PULL UP and having the output set to LOW would consume a small current that would be a bit unnecessary. It wouldn't change the function of the pin, but it could be a bit wasteful. Here is the drawing I am basing my analisis from, maybe it is wrong: On the drawing on the right, if Vout was set to LOW there would be a current through the pull up resistor that would serve no purpose.
  3. You are a bloody genius. That was exactly the problem. I tried writing: P1OUT = 0x00 + BIT3; And the problem is completely fixed. I know that initializing ports this way is bad practice, but I just wanted to know why. Now I know! I do have a little question about the reason why the error came up in the first place. First, I just though that P1OUT was a registry that determined what the state of each pin would be, should the pin be set to OUTPUT. I though that if the pin was set to INPUT, then the value that that pin had in the P1OUT registry would be asolutely meaningless.
  4. Hi, I am just getting started with the MSP430, turning leds on and off and such, and I seem to have a few problems with bitwise operators. I dont understand why do I have to write: P1OUT |= BIT0; to turn LED 0 on when I initialize the program, but I cant write: P1OUT = BIT0; Shouldn't it be the same? Also I get a lot of problems when transferring the program from CCS to the MSP430 and I wanted to know if this is normal. It seems like a lot of the times I transfer the program to the Launchpad it doesnt work, and I have to try to transfer it several times (without changin
×
×
  • Create New...