参考 MSP430FR4133 LaunchPad™ Development Kit (MSP‑EXP430FR4133),可以获得 MSP430FR4133 驱动4路复用(四条COM)程序,但修改为8路复用的时候,总是不能正常显示,能否帮忙分析问题在哪里或者给个8路复用的案例? 代码如下:
// L0~L25 pins selected
LCD_E_setPinAsLCDFunctionEx(LCD_E_BASE, LCD_E_SEGMENT_LINE_0, LCD_E_SEGMENT_LINE_25);
LCD_E_initParam initParams = LCD_E_INIT_PARAM;
initParams.clockDivider = LCD_E_CLOCKDIVIDER_3;
initParams.muxRate = LCD_E_8_MUX;
initParams.segments = LCD_E_SEGMENTS_ENABLED;
// Init LCD as 8-mux mode
LCD_E_init(LCD_E_BASE, &initParams);
// LCD Operation - Mode 3, internal 3.02v, charge pump 256Hz
LCD_E_setVLCDSource(LCD_E_BASE, LCD_E_INTERNAL_REFERENCE_VOLTAGE, LCD_E_EXTERNAL_SUPPLY_VOLTAGE);
LCD_E_setVLCDVoltage(LCD_E_BASE, LCD_E_REFERENCE_VOLTAGE_2_96V);
LCD_E_enableChargePump(LCD_E_BASE);
LCD_E_setChargePumpFreq(LCD_E_BASE, LCD_E_CHARGEPUMP_FREQ_16);
// Clear LCD memory
LCD_E_clearAllMemory(LCD_E_BASE);
// Configure COMs and SEGs
// L0 = COM0, L1 = COM1, L2 = COM2, L3 = COM3
LCD_E_setPinAsCOM(LCD_E_BASE, LCD_E_SEGMENT_LINE_25, LCD_E_MEMORY_COM0);
LCD_E_setPinAsCOM(LCD_E_BASE, LCD_E_SEGMENT_LINE_24, LCD_E_MEMORY_COM1);
LCD_E_setPinAsCOM(LCD_E_BASE, LCD_E_SEGMENT_LINE_23, LCD_E_MEMORY_COM2);
LCD_E_setPinAsCOM(LCD_E_BASE, LCD_E_SEGMENT_LINE_22, LCD_E_MEMORY_COM3);
LCD_E_setPinAsCOM(LCD_E_BASE, LCD_E_SEGMENT_LINE_21, LCD_E_MEMORY_COM4);
LCD_E_setPinAsCOM(LCD_E_BASE, LCD_E_SEGMENT_LINE_20, LCD_E_MEMORY_COM5);
LCD_E_setPinAsCOM(LCD_E_BASE, LCD_E_SEGMENT_LINE_19, LCD_E_MEMORY_COM6);
LCD_E_setPinAsCOM(LCD_E_BASE, LCD_E_SEGMENT_LINE_18, LCD_E_MEMORY_COM7);
// Select to display main LCD memory
LCD_E_selectDisplayMemory(LCD_E_BASE, LCD_E_DISPLAYSOURCE_MEMORY);
// Turn on LCD
LCD_E_on(LCD_E_BASE);
原理图如下:
显示用的程序如下:
LCDMEM[LCD_E_SEGMENT_LINE_0] = 0xFF;
本文来自论坛,点击查看完整帖子内容。