I have a couple of 128x64 ST7920 based LCD displays. Using u8glib, I have the "Hello World!" example running perfectly (along with the other examples). As I have been working more and more with the xmega (to try and bring myself up speed), I thought this would be a great project to port to the xmega...
To port it, I created a new basic project (no ASF) for the atxmega128A3U and copied the relevant files from the working atmega code to the new project. The edits to make it speak xmega was fairly straight forward, especially since I was hard coding in SPIE on PORTE (this was a test, not a library creation project). Everything compiles and I do get output. But nothing ever displays.
At this point, I have hooked up my little logic analyzer and verified that both boards are outputting identical initialization commands bit-for-bit and byte-for-byte. Both are outputting the draw commands as well, but I have not verified them bit for bit (yet. next step I think). I have also verified the timings on both boards. Per the datasheet (http://www.digole.com/images/fil...) on page 37, it shows that the clock cycle time for SPI is 400ns at 4.5V and only 600ns at 2.7V (Vmin). In addition, I have also verified that chip select is working correctly (The ST7920 is backwards from most and is active high. The u8g library takes this into account and the logic analyzer shows it is doing what it should).
What I found interesting is the working atmega328 board is actually running faster than spec at 300ns clock cycle time. I have tried assorted different speeds on the atxmega from the same speed at the atmega328 (300ns) all the way down to 2500ns. The same results occur ever time, nothing is displayed.
I have two of these displays and they both work exactly the same: Will work on the atmega328, won't work on the atxmega. I SUSPECT the problem is with the voltage, but at this point, I'm asking for any suggestions on what to check or ideas on what might be the problem.
If anyone has a working library for this display, I would be very grateful to take a look at it if possible. I know the problem is probably pretty simple and probably right in front of my face as well!
Thanks!