0

I have a MSP chip and a LCD screen - throughout my code I output messages to my LCD screen. 80% of the time it works but if I do a power cycle the screen will get stuck on "UART Baud: 9600". I am not sure if there is something I am missing in the initialisation of the LCD Screen:

  P3SEL = 0x30;                             // P3.4,5 = USCI_A0 TXD/RXD
  UCA0CTL1 |= UCSWRST;                      // **Put state machine in reset**
  UCA0CTL1 |= UCSSEL_1;                     // CLK = ACLK
  UCA0BR0 = 0x03;                           // 32kHz/9600=3.41 (see User's Guide)
  UCA0BR1 = 0x00;                           //
  UCA0MCTL = UCBRS_3+UCBRF_0;               // Modulation UCBRSx=3, UCBRFx=0
  UCA0CTL1 &= ~UCSWRST;                     // **Initialize USCI state machine**
  UCA0IE |= UCRXIE;
  
  Digole_setLCDColRow(20,4);
  Digole_disableCursor();
  __delay_cycles(1000);
  Digole_clearScreen();
  __delay_cycles(1000);
  Digole_setPrintPos(0,0,0);
  Digole_printStr("PFA Error Messages");
  __delay_cycles(1000);

Any help would be appreciated...

I am using IAR embedded workbench, code is in C, MSP chip, Digole 2004A display using the RXD/TXD mode.

Gerhard
  • 6,850
  • 8
  • 51
  • 81
Georgem
  • 3
  • 2
  • What makes you think the problem is in the display initialisation? – Gerhard Oct 24 '22 at 15:42
  • 2
    Please take some time to read the [the Stack Overflow question checklist](http://meta.stackexchange.com/q/156810/204922). You might also want to learn about [Minimal, Complete, and Verifiable Examples](http://stackoverflow.com/help/mcve). As your question stands now there is insufficient information to be able to help you. – Gerhard Oct 24 '22 at 15:44
  • @Gerhard I am not sure what else could it be - maybe a memory issue? – Georgem Oct 24 '22 at 15:55
  • @Georgem please read Gerhard's links. – Weather Vane Oct 24 '22 at 16:38
  • @Georgem: Hardware? – Gerhard Oct 25 '22 at 08:02
  • Tried three LCD screens all the same make and brand etc, chip has been replaced on the board so shouldn't be any of them. – Georgem Oct 25 '22 at 08:34

0 Answers0