This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
E2E Community,
I've recently been trying to get the LCD_A Control Module working on the F4132 and have run into some trouble getting the pins to interact with my LCD. From my understanding, the updating the bits in the LCDMEM register should automatically configure the LCD_A controller to update the pins based on its configuration. When I measure the pins on an oscilloscope, the values on the COM ports are not varying from the internal voltage levels for V5-V1. They simply maintain their voltage at around 0mv +- some noise. I have, however, had some luck manually toggling the port pins using them as standard GPIO pins but I'd rather not re-invent the wheel... Code Posted below, any help would be great.
// Include the MSP430F4312 files
#ifndef MSP430F4132
#define MSP430F4132
#include "MSP430F4132.h"
#endif
// Include the standard library files
#ifndef STDIO_H
#define STDIO_H
#include <stdio.h>
#endif
// Include the Math Library files
#ifndef MATH_H
#define MATH_H
#include "math.h"
#endif
// Main Function
int main( void )
{
// Configure the COM Ports to Special Functionality
P5SEL = BIT4 + BIT5 + BIT6 + BIT7; // Configure COM0-COM3
P1DIR = BIT6; // Set ACLK
P1SEL = BIT6; // Enable the ACLK
LCDACTL = LCDFREQ_64 + LCD4MUX + LCDON; // Set Frequency divider to 64, 4bit mux (LCDSON included), and turn on LCD_A module
LCDAPCTL0 = 0xFF; // Enable LCD Pin functions for segments 0-31
LCDAPCTL1 = LCDS32 + LCDS36; // Enable LCD Pin functions for segments 32-39
LCDAVCTL0 = LCDCPEN; // Enable Charge Pump
LCDAVCTL1 = VLCD_3_02; // Set Charge Pump to 3.02V
// Clear the LCD Segment Memory
for(int i = 0; i <20; i++){
*(i+LCDMEM) = 0x00;
}
LCDM1 = 0x02;
LCDM2 = 0x04;
LCDM3 = 0x08;
LCDM4 = 0x10;
LCDM5 = 0x20;
LCDM6 = 0x40;
LCDM7 = 0x80;
LCDM8 = 0x00;
LCDM9 = 0x02;
LCDM10 = 0x04;
LCDM11 = 0x08;
LCDM12 = 0x10;
LCDM13 = 0x20;
LCDM14 = 0x30;
LCDM15 = 0x80;
LCDM16 = 0x00;
while(1);
return 0;
}
Thanks,
Mitchell Gallaher
Desert Currents Consulting
You use the charge pump. Did you add the >=4.7µF capacitor between LCDCAP and GND? Else the charge pump won't work and your output voltage is 0. Or maybe worse - the unfiltered charge pump may have damaged the MSP.
Reset VLCDPEN if you want to use AVcc instead. Also, use of the charge pump or the internal bias generation require an ACLK of 32768Hz +-10%.
ACLK, however, is set to external 32kHz crystal by default, with a fallback to the VLO. The VLO, however, isn't suitable forcharge pump operation (~10kHz).
Even if you have a crystal assigned, it will take a long time before it comes up. If it starts to oscillate at all (you don't configure any capacitance, so I hope you added external capacitors too then).
Then you don't set the LCDSON bit. I'm not sure, but I guess it will disable the output of the COM pins too (it makes no sense to have them oscillating when the there are no signals on the segment pins - it would result in some unwanted display)
**Attention** This is a public forum