Jump to content
43oh

Recommended Posts

Thank you for your help.

 

Do you have jumpers on the 2x2 header (horizontal)?

No, I removed the jumpers for P1.0 and P1.6.

 

Can you do capture during readIDs()? You should see LCD response on MISO.

The MISO line is empty.

 

Try increasing delay before communicating with LCD to ~1s.

__delay_cycles(16000000); // wait before reading IDs

 

Could you please post the compiled .hex file so I can upload it with mspdebug and check my screen is fine?

mspdebug rf2500 --force-reset prog colourLCD_main.hex

 

I opened the issue :arrow: Color LCD Booster Pack Library on Energia at the Energia GitHub repository.

Link to post
Share on other sites
Thank you for your help.

No, I removed the jumpers for P1.0 and P1.6.

I was referring to J3 on the LCD board, see the picture on github

 

Could you please post the compiled .hex file so I can upload it with mspdebug and check my screen is fine?
mspdebug rf2500 --force-reset prog colourLCD_main.hex

I am not using mspdebug or Energia, but I can test your code and report.

Link to post
Share on other sites
Thank you for your help.

No, I removed the jumpers for P1.0 and P1.6.

I was referring to J3 on the LCD board, see the picture on github

I didn't place the jumpers J3 correctly :oops: .

 

They are now horizontal and the screen works fine as expected!

 

The USI / USCI is rather confusing. I've faced the same mistake with the RX / TX jumpers.

 

Thank you so much for your help! :thumbup:

Link to post
Share on other sites

Nice! It's always the small things :)

 

USCI - output is on P1.7, input on P1.6

USI - output on P1.6, input on P1.7

 

On my next board, I will have USCI shorted by default.

 

Here's working readChar function that can be used to read RDID1, RDID2, and RDID3 for example.

char readChar(char command) {
 char a = 0;
 char c = 0;
 LCD_SELECT;
 P1OUT &= ~LCD_DC_PIN;
 while (c < 8) {
   (command & BIT7) ? (P1OUT |= LCD_SD_PIN) : (P1OUT &= ~LCD_SD_PIN);
   LCD_CLOCK;
   command <<= 1;
   c++;
 }
 P1DIR &= ~LCD_SD_PIN;

 while (c < 16) {
   a <<= 1;
   P1OUT |= LCD_SCLK_PIN;
   if (P1IN & LCD_SD_PIN)
     a |= BIT0;
   P1OUT &= ~LCD_SCLK_PIN;
   c++;
 }

 LCD_DESELECT;
 P1DIR |= LCD_SD_PIN;
 return a;
}

Link to post
Share on other sites

Please find the working library for Energia attached.

colourLCD_main.zip

 

post-22262-135135561722_thumb.jpg

 

One caveat however: nothing is displayed when Serial is used.

Just uncomment the lines to do the test.

// Serial.begin(9600);
// Serial.println("colorLCD");

I'm reporting it to :arrow: Color LCD Booster Pack Library on Energia on GitHub.

Link to post
Share on other sites

I think you are encountering a pin conflict. Serial uses P1.1 and P1.2. It looks like the color lcd code uses P1.2.

 

#define LCD_SCE_PIN BIT2

#define LCD_SELECT P1OUT &= ~LCD_SCE_PIN
#define LCD_DESELECT P1OUT |= LCD_SCE_PIN

 

You might try changing LCD_SCE_PIN to a different unused pin.

 

-rick

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...