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