P8X32A and Pervasive Display 2.7" 264 x 176 (117 dpi) - code samples?
Ken Gracey
Posts: 7,392
Hey there!
I've got a display and development kit for this product http://www.pervasivedisplays.com/products/27. I'm looking at it for possible inclusion on a future badge or business card, or maybe for Parallax's product line.
Has anybody coded for this display in Spin? A quick search on our forums didn't find anything, so I know the search tool leaves much to be desired.
Any input on what I might expect in terms of coding complexity, or at least a starting point?
Thanks,
Ken Gracey
I've got a display and development kit for this product http://www.pervasivedisplays.com/products/27. I'm looking at it for possible inclusion on a future badge or business card, or maybe for Parallax's product line.
Has anybody coded for this display in Spin? A quick search on our forums didn't find anything, so I know the search tool leaves much to be desired.
Any input on what I might expect in terms of coding complexity, or at least a starting point?
Thanks,
Ken Gracey
Comments
If so, I'll get you one of their evaluation kits. Their kits are quite nice - simple breakouts for breadboard connections to Propeller.
Ken Gracey
Should be perfect for badges though as should be very low power...
Edit: Actually, I guess the only question I have is which of these are you talking about? They seem to have different manuals and maybe are programmed differently.
Aurora Ma (V230)
Vizplex (V110)
https://www.adafruit.com/products/1346
I'm translating some other C code to Spin at the moment. There are some pitfalls to be avoided.
One is that I have a lot of "if (!someFunctionWithBooleanReturnValue()) {}" which often won't work with direct translation.
Problem is that C is looking for non-zero to be true whereas Spin only recognizes all ones as true...
Ignore above comment, seems I was wrong
@David, do you have a link for the C driver code. I could look at it to see if cspin can convert it.
EDIT: I looked at the driver in epd.cpp and epd.h, which is C++. So cspin would not be able to handle it directly. I think the code could be convert to C without too much effort, and cspin should be able to handle it. The enums would need to be converted to #defines, and there may be a few other issue that would need to be handled manually. I could look into further if you want.
Be nice actually, if there were a list of tips on converting Spin to C by hand.
I think there was something about <= or something like that to look out for...
What I should have used is "if not" instead of "if !"
Today, I found the programming document. What a mess!
What's got me interested is that it has the same connector as the Newhaven displays. So, I could maybe use my existing solder paste stencils to make a little adapter, similar to NH4.
BTW: What's the difference between Aurora Ma and Vizplex? Is Aurora Ma just a newer version? Don't see any difference except the date...
Update: Ok, I think I see the Aurora is newer the only one available on Digikey, so maybe a moot point.
Google found me something saying the new Aurora works in refrigerators.
Also, it doesn't appear to require a PWM input like Vizplex does.
Update2: Looking some more at this, I see Pervasive has their 2.7" Aurora plus adapter board for just $37 on Digikey. The display is $25, so the adapter board is just $12 extra.
This makes me unmotivated to make my own adapter board. Good part, is that you can get this thing working for just $37.
You can't just set a pixel to a new value, like you can with a regular LCD.
First, you have to inverse the original value.
Then, you have to shake the pixel up (appears to be two different ways to do this)
Finally, you can set the new value.
The Pervasive document recommends a 4-stage process, but the Arduino example (based on TI example), uses a different, 3-stage process (maybe you could call it 4 stages, but it's different anyway).
All this is about preventing ghosting (seeing part of the old image in the new image).
I think I see now why the Kindle flashes black and white when you turn the page...
So, one memory complication is that you have to keep two images in memory, the previous one and the new one.
If you keep them in HUB RAM, you need about 12 kB, which is OK for Propeller. Looks like Arduino has to store pictures in external flash memory.
You update the display one line at a time, like you might expect.
But, you first send odd numbered pixels, then you tell it what line you're on, then you send even numbered pixels (very strange).
There's also a setting that depends on the temperature, which is why the board has a temperature sensor.
But, I think we can ignore that for now and assume 25 C.
Wrote the code from scratch instead of translating the other codes so that I could put an MIT license on it.
Also, it was a fun exercise.
This example is a 3 image slideshow. Input files are Windows Bitmaps. I think this makes it easier to work with...
AuroraTest1 - Archive [Date 2014.11.29 Time 15.38].zip
Here's a photo of my setup: