Hello,
I want to use some LCD pin of MSP430, as digital I/O type. I have to add one more digital interface, but other digital I/O is already in use for other purpose. And for price/heritage reason, I can't choose another MSP430 MCU.
So I read datasheet/user guide of MSP430, then found it is available. At that document, LCD PIn can work as digital I/O, by "LCDPx" bit set-up. But there's no more information.
I just tried to do that, with IAR C compiler and MSP430 FET device. Following is brief code for that.
{{{ Test code
LCDCTL &= 0x02;
delay(1000);
char* LCD = LCDMEM;
for (i=0; i<20; i++) { LCD[i] = 0xFF; }
}}}
Build, Program Download to MSP430, and other works was completed fine. But there's no change on LCD pin.
I searched web for days, but can't find any clue of it.
So, what can I do to use LCD pin like a GPIO?
Simon: Hello, I want to use some LCD pin of MSP430, as digital I/O type.
I want to use some LCD pin of MSP430, as digital I/O type.
This is not possible, since the LCD pins output analog signal waveforms. All in all you cannot have a controlled high or low other than a PWM square wave of fixed frequency and duty cycle.
Unfortunately in the MSP430, I/O pins have to be multiplexed with the segment lines to be used one over the other. In your case since you want to use as a General purpose input, you have to see the waveforms coming out of it under static operation. I have looked at the waveform under static mode, it looks like a plain square wave with 50 % duty cycle similar to the one described in the User's Guide (Pg 678)
Regards,Brandon
DCAT - MSP430 ApplicationsTexas Instruments
Which MSP430 chip? There are about 100 different ones!
Thank you for reply.
I'm using MSP430F437, :)
Take a look at MSP430F437 data-sheet pin designation section. There are 48 pins pins named Px.y / .., (where x is 1,2,3,4,5, or 6; y is 0,1,2,3,4,5,6, or 7; the / means "can also be used as"; and ... is some other signal names). There are 6x8=48 such pins. The can all be used as GPIO pins Px.y. Some of these 48 pins with ... include LCD signal names can also be used as LCD pins. Some of these 48 pins can be use for other functions as indicated by other signal names in the ...
These multifunction pins can only be use as one of the function at a time. See data-sheet input/output schematics section for details.
Usually, you set PxSEL.y = 0 to select the corresponding pin as GPIO. (In some cases, there may be additional settings that are required.) You set PxDIR.y = 0 for input through PxIN.y ; or set PxDIR.y =1 for output through PxOUT.y
Brandon: ... This is not possible, since the LCD pins output analog signal waveforms. All in all you cannot have a controlled high or low other than a PWM square wave of fixed frequency and duty cycle....
... This is not possible, since the LCD pins output analog signal waveforms. All in all you cannot have a controlled high or low other than a PWM square wave of fixed frequency and duty cycle....
Brandon,While I agree with you that LCD signals cannot be used as digital I/O signals, I am not sure what LCD pins in the original post mean. For example, is P5.4/COM3 pin one of the LCD pins?If the user is using 4-mux LCD, he must use that pin for LCD COM3 signal and cannot use it as P5.4. But if he is using 3-mux, 2-mux, 1-mux, or no LCD, that pin can be used as P5.4-OCY
old_cow_yellow: Brandon: ... This is not possible, since the LCD pins output analog signal waveforms. All in all you cannot have a controlled high or low other than a PWM square wave of fixed frequency and duty cycle.... Brandon,While I agree with you that LCD signals cannot be used as digital I/O signals, I am not sure what LCD pins in the original post mean. For example, is P5.4/COM3 pin one of the LCD pins?-OCY
Brandon,While I agree with you that LCD signals cannot be used as digital I/O signals, I am not sure what LCD pins in the original post mean. For example, is P5.4/COM3 pin one of the LCD pins?-OCY
OCY: You are correct. I should have clarified that the LCD pins I was referring to are the "dedicated" LCD-only pins. Any pin with a GPIO mulitplexed functionality can certainly be used a GPIO :)
Thank you for your comment, Brandon and OCY.
The LCD pin, which I want to use, is S0~S39. That is pin for LCD only, I think.
So, I have to find another not-used pin, named PX.X.
Thank you.
Some of the S0~S39 pins are dual-propose and can be used for Px.y too. This depends on the package type of F437.
If you LDC pannel does not need all 40 Segment pins, you should use the dedicated LCD Segment pins for LCD and leave some of the dual-propose pins for other propose.
ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". TI AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY TI. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM TI.
Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.