400x240 Sharp Display - Can't Use Full Screen

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
fredb_394
 
Posts: 2
Joined: Tue May 16, 2023 11:19 am

400x240 Sharp Display - Can't Use Full Screen

Post by fredb_394 »

Hello,

I have recently purchased the Adafruit Sharp Memory display of size 400x240 pixels (2,7"). I am using an Arduino Mega to control it. I have tried to load the example code, changing only the size (to match my screen). I used the wiring shown here (https://learn.adafruit.com/adafruit-sha ... out/wiring ). Here is another code I tried for the display:

Code: Select all

#include <Adafruit_GFX.h>
#include <Adafruit_SharpMem.h>


#define SHARP_SCK  13
#define SHARP_MOSI 11
#define SHARP_SS   10

Adafruit_SharpMem display(SHARP_SCK, SHARP_MOSI, SHARP_SS, 400,240);


#define BLACK 0
#define WHITE 1

int minorHalfSize; // 1/2 of lesser of display width or height

void setup(void)
{
  Serial.begin(9600);
  Serial.println("Hello!");


  display.begin();
  display.clearDisplay();

  minorHalfSize = min(display.width(), display.height())/2;

  
  display.clearDisplay();
}

void loop(void) 
{
  
    // text display tests
    //display.setRotation(1);
    display.setTextSize(16);
    display.setTextColor(BLACK);
    display.setCursor(0,0);
    display.print(44);
    display.refresh();

    
}
Here is what shows up on the display:
Image

Does anyone know how to fix this problem?

The screen is not broken, I bought another one and ran into the same issue.

Thank you!
Attachments
Problem.jpg
Problem.jpg (643.46 KiB) Viewed 73 times

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: 400x240 Sharp Display - Can't Use Full Screen

Post by adafruit_support_bill »

Sharp Memory display of size 400x240 pixels (2,7"). I am using an Arduino Mega to control it.
This display requires > 12K of RAM just for the frame buffer. The Mega only has 8K of RAM to work with. You will need a processor with more RAM like the ATSAMD21 (M0), ATSAMD51 (M4) or ESP8266.

User avatar
fredb_394
 
Posts: 2
Joined: Tue May 16, 2023 11:19 am

Re: 400x240 Sharp Display - Can't Use Full Screen

Post by fredb_394 »

Thank you for your quick answer. I will look into these.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”