rePaper - 2.7" Graphic eInk Dev Board Headers

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mojotexas
 
Posts: 4
Joined: Wed Feb 01, 2012 4:02 pm

rePaper - 2.7" Graphic eInk Dev Board Headers

Post by mojotexas »

I have wired up my new rePaper - 2.7" Graphic eInk Development Board and it works just fine.
I have a couple questions, though.

1.) What are the headers on the underside of the board for?
I've wired this thing up to my MegaADK, and i used the included jumper wires, but there are two header rows on the underside of the board that look like it should sit right on an Arduino. What are these designed for? Is it meant to be a shield? What boards is it compatible with?

2.) I have the 2.7" version, which is tragically incompatible with the GFX library. There is a note in the description to this effect "At this time, neither the Arduino UNO or Mega can use the GFX-library for a display of this size. We'll try to fix PDI's code to support the Mega, but there's no ETA. " How can I be notified when there's a code fix?

3.) Most importantly, I've gone through the tutorial, and I've got the thing running right as rain, but that's as far as the tutorial goes. Now, how am I going to show my own text on this thing? I want to have a function to say -- Print to screen, "This text"

thanks for the help,
m0j0

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by adafruit_support_rick »

1) Those are the same control and data lines that are broken out on the 2x10 header. They don't match up with an arduino - It's not a shield.
2) Unfortunately, that is a misleading statement. The 2.7" will never be compatible with Adafruit_GFX on the Mega. There simply is not enough SRAM on the Mega. There is an Alert box to this effect immediately below the statement you referenced.
3) I'll have to check on this, but I think you're out of luck with the 2.7" display. I believe the only thing you can use is the EPD library, which only supports image display.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by adafruit »

Yes at this time its not possible - there's not enough graphic RAM buffer space. At some point we'd like to show how to connect up some FRAM or SRAM to add a buffer but its a lot of work and we have no ETA

User avatar
mojotexas
 
Posts: 4
Joined: Wed Feb 01, 2012 4:02 pm

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by mojotexas »

OK, thanks for the help and the clarifications.
It's a little BANNED to know that I can only display images, though I can see how I could use it as a weird primitive photo album or something. Maybe find a reason to display a QR code.

I have a mega, I suppose I would be better off with a 2.0" display. Can I trade my 2.7" in for the 2.0" version? It's fantastically more useful to have access to the GFX library.

Happy New year,

m0j0

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by adafruit_support_rick »

If you just got this recently, you can email [email protected] with a link to this thread, and they can arrange an exchange for the 2.0"

User avatar
dzfan
 
Posts: 18
Joined: Fri Jan 06, 2012 3:12 pm

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by dzfan »

Will the Arduino Due run the 2.7" ePaper display? There's plenty of SRAM there. What about Raspberry Pi?

I'd like to be able to display custom text as well.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by adafruit_support_rick »

The sample code won't compile for a Due target. No idea what's involved in porting it.

We have a tutorial for the Raspberry Pi:
http://learn.adafruit.com/repaper-eink- ... bone-black

User avatar
dzfan
 
Posts: 18
Joined: Fri Jan 06, 2012 3:12 pm

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by dzfan »

FYI, I did get the 2.7" display working on my Due.

I got a bunch of compile errors and just modified library files as necessary until it compiled. Wasn't too bad with a little help from google. There are some conditional compile sections that were already there for MSP430, but need to be included for Due as well. You can modify existing "#if defined (__some other device__)" lines with "|| defined(__SAM3X8E__)" for Due, or "#if defined (__arm__)" works too if you know it will work for all 32-bit ARM architectures, including Teensy 3.0 or LeafLabs Maple.

http://forum.arduino.cc/index.php/topic,128520.0.html discusses this topic a little.

User avatar
dzfan
 
Posts: 18
Joined: Fri Jan 06, 2012 3:12 pm

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by dzfan »

To port the ePaper libraries to Arduino Due, make the following changes.

1. Flash.cpp line 82:

Code: Select all

SPI.setClockDivider(SPI_CLOCK_DIV4);
should be changed to the following:

Code: Select all

#if defined(__arm__)
	SPI.setClockDivider(21);
#else
    SPI.setClockDivider(SPI_CLOCK_DIV4);
#endif  
setClockDivider() sets the SPI clock divider relative to the system clock. On AVR based boards, the dividers available are 2, 4, 8, 16, 32, 64 or 128. The default setting is SPI_CLOCK_DIV4, which sets the SPI clock to one-quarter the frequency of the system clock (4 Mhz for the boards at 16 MHz).

On the Due, the system clock can be divided by values from 1 to 255. The default value is 21, which sets the clock to 4MHz like other Arduino boards.
(http://arduino.cc/en/Reference/SPISetClockDivider)

2. EPD.cpp line 599:

Code: Select all

SPI.setClockDivider(SPI_CLOCK_DIV2);
should be changed to the following:

Code: Select all

#if defined(__arm__)
	SPI.setClockDivider(10);
#else
    SPI.setClockDivider(SPI_CLOCK_DIV2);
#endif
84 MHz / 10 = 8.4 MHz, which is approximately 8 MHz.

3. S5813A.cpp line 83:

Before this #else,

Code: Select all

#if defined(__MSP430_CPU__)

... 

#else

Add

Code: Select all

#elif defined(__arm__)
// Arduino Due
// ----------------

// Arduino Due / Atmel SAM3X runs at 3.3V
#define PIN_TEMPERATURE  A0

// The AnalogReference() function is ignored on the Due
#define ANALOG_REFERENCE AR_DEFAULT

// ADC maximum voltage at counts
#define ADC_MAXIMUM_uV   3300000L
#define ADC_COUNTS       1024L
Arduino 2 doesn't permit EXTERNAL reference. You will find this in the SAM library (...sam\cores\arduino\wiring_analog.h ):

Code: Select all

typedef enum _eAnalogReference
{
    AR_DEFAULT,
} eAnalogReference ;
4. EPD_GFX.cpp line 47:

The call to image_sram() in EPD_GFX.cpp will cause a compile error. This function requires at least 8 kB of RAM, which the Due has. To resolve the error, enable extra SRAM by making the following changes in EPD.cpp:

Change EPD.cpp line 28 from

Code: Select all

// if more SRAM available (8 kBytes)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define EPD_ENABLE_EXTRA_SRAM 1
#endif
to

Code: Select all

// if more SRAM available (8 kBytes)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__arm__)
#define EPD_ENABLE_EXTRA_SRAM 1
#endif
This should get your code to compile. Of course, make sure you have the latest Arduino IDE which adds compatibility for the Arduino Due, and make sure you have the Due (Programming Port) selected in Tools -> Board.

User avatar
ishback
 
Posts: 33
Joined: Tue Mar 04, 2014 9:50 pm

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by ishback »

Has anyone successfully ported the ePaper libraries to Teensy 3.0/3.1?

User avatar
shirshatit
 
Posts: 2
Joined: Mon Feb 08, 2016 5:05 am

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by shirshatit »

hello dzfan.

I have changed all the files according to your code. But still no luck.

You got any advice for me?

User avatar
shirshatit
 
Posts: 2
Joined: Mon Feb 08, 2016 5:05 am

Re: rePaper - 2.7" Graphic eInk Dev Board Headers

Post by shirshatit »

dzfan wrote:To port the ePaper libraries to Arduino Due, make the following changes.

1. Flash.cpp line 82:

Code: Select all

SPI.setClockDivider(SPI_CLOCK_DIV4);
should be changed to the following:

Code: Select all

#if defined(__arm__)
	SPI.setClockDivider(21);
#else
    SPI.setClockDivider(SPI_CLOCK_DIV4);
#endif  
setClockDivider() sets the SPI clock divider relative to the system clock. On AVR based boards, the dividers available are 2, 4, 8, 16, 32, 64 or 128. The default setting is SPI_CLOCK_DIV4, which sets the SPI clock to one-quarter the frequency of the system clock (4 Mhz for the boards at 16 MHz).

On the Due, the system clock can be divided by values from 1 to 255. The default value is 21, which sets the clock to 4MHz like other Arduino boards.
(http://arduino.cc/en/Reference/SPISetClockDivider)

2. EPD.cpp line 599:

Code: Select all

SPI.setClockDivider(SPI_CLOCK_DIV2);
should be changed to the following:

Code: Select all

#if defined(__arm__)
	SPI.setClockDivider(10);
#else
    SPI.setClockDivider(SPI_CLOCK_DIV2);
#endif
84 MHz / 10 = 8.4 MHz, which is approximately 8 MHz.

3. S5813A.cpp line 83:

Before this #else,

Code: Select all

#if defined(__MSP430_CPU__)

... 

#else

Add

Code: Select all

#elif defined(__arm__)
// Arduino Due
// ----------------

// Arduino Due / Atmel SAM3X runs at 3.3V
#define PIN_TEMPERATURE  A0

// The AnalogReference() function is ignored on the Due
#define ANALOG_REFERENCE AR_DEFAULT

// ADC maximum voltage at counts
#define ADC_MAXIMUM_uV   3300000L
#define ADC_COUNTS       1024L
Arduino 2 doesn't permit EXTERNAL reference. You will find this in the SAM library (...sam\cores\arduino\wiring_analog.h ):

Code: Select all

typedef enum _eAnalogReference
{
    AR_DEFAULT,
} eAnalogReference ;
4. EPD_GFX.cpp line 47:

The call to image_sram() in EPD_GFX.cpp will cause a compile error. This function requires at least 8 kB of RAM, which the Due has. To resolve the error, enable extra SRAM by making the following changes in EPD.cpp:

Change EPD.cpp line 28 from

Code: Select all

// if more SRAM available (8 kBytes)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
#define EPD_ENABLE_EXTRA_SRAM 1
#endif
to

Code: Select all

// if more SRAM available (8 kBytes)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__arm__)
#define EPD_ENABLE_EXTRA_SRAM 1
#endif
This should get your code to compile. Of course, make sure you have the latest Arduino IDE which adds compatibility for the Arduino Due, and make sure you have the Due (Programming Port) selected in Tools -> Board.
Done all of this. Still not having any luck. Please help

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

Return to “Other Arduino products from Adafruit”