Germany
Offline
Newbie
Karma: 0
Posts: 43
just sun
|
 |
« Reply #30 on: April 13, 2012, 07:00:45 am » |
Hi Oliver, is there some pitfall in get your lib running on an Arduino Mega 2560 with an EA DOGXL-160 ? ;-) if tried it yesterday and it did not work. i looked at the signals of the pins (with an oscilloscope) and the clock pin was a little bit confusing. in Hardware SPI Mode the signal was realy destroyed. in Software SPI Mode the u8g.setContrast(127); worked. but the 'hello World' not. It looked like something is setting the clock pin manually some times.. the signal of the clock was at ~3.3V level out of the arduino and the odd spikes were at 5V level... i used the Hardware SPI Pins on the Arduino Mega - see constructor.. i used the example hello world sketch and added the contrast command in setup. my constructors that i tried were the following: //U8GLIB_DOGXL160_2X_BW u8g(52, 51, 53, 49); // Software SPI ARDUINO MEGA SPI Com: SCK = 52, MOSI = 51, CS = SS = 53, A0 = 49 //there is something wrong... U8GLIB_DOGXL160_2X_BW u8g(53, 49); // Hardware SPI ARDUINO MEGA SPI Com: SCK = 52, MOSI = 51, CS = SS = 53, A0 = 49 // here is something wrong too have you got an idea? know i will try it with an arduino Duemilanove. we will see :-) sunny greetings Stefan
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Online
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #31 on: April 13, 2012, 07:14:18 am » |
Hi
I recently added the 2X driver. Can you please check the single buffer constructor (without 2X). I also do not own a Mega Board, so i have to rely on whatever the Arduino.h file has defined for the Hardware Pins. If these hardware pins require some special settings, than these settings are not known to me.
But in any case, the SW SPI should work.
Your observation might also be caused by the connected hardware. How do you do the level transition? Is it a HC4050 level translator for the signals? Resistor networks might work, but you might observe other voltage ranges.
Oliver
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Online
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #32 on: April 13, 2012, 05:14:34 pm » |
I checked v1.03 with my DOGXL160 display. HW SPI and SW SPI are fine. I do not see any issues here.
Oliver
|
|
|
|
|
Logged
|
|
|
|
|
Sydney
Offline
Newbie
Karma: 0
Posts: 1
|
 |
« Reply #33 on: April 14, 2012, 12:04:09 am » |
Hi
I have been using the u8g Library to complete a university project. I have been playing around with it and must say that it is fantastic. The one problem I am having is that I want to display a line of ASCII print for a certain period of time, clear the entree screen and then write another set of ASCII text. I am using an ST7920 screen as it was the only one locally available as all shops have sold out of the KS0108. The screen i attached to a DFRobot mega clone...
Please if anyone can help me I have tried so many ways to get this to work but with no success
thanks in advance
Chris
|
|
|
|
« Last Edit: April 14, 2012, 12:24:37 am by Bigtoff »
|
Logged
|
|
|
|
|
Germany
Online
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #34 on: April 14, 2012, 01:13:02 am » |
Hi Chris I am not sure what you mean by "ASCII print". A chart of ASCII glyphs can be produced in this way: void u8g_ascii_1() { char s[2] = " "; uint8_t x, y; u8g.drawStr( 0, 0, "ASCII page 1"); for( y = 0; y < 6; y++ ) { for( x = 0; x < 16; x++ ) { s[0] = y*16 + x + 32; u8g.drawStr(x*7, y*10+10, s); } } }
As shown in the second tutorial ( http://code.google.com/p/u8glib/wiki/thelloworld) there is no clear screen command. Instead, as soon as you enter the picture loop, the screen gets cleared. See also the background article here: http://code.google.com/p/u8glib/wiki/tpictureloopIn order to display a screen, wait some time and than display another screen, you may use the code and ideas from "GraphicsText.pde" (attached to this post, but also part of the Arduino examples). Oliver
|
|
|
|
|
Logged
|
|
|
|
|
india
Offline
Newbie
Karma: 0
Posts: 42
|
 |
« Reply #35 on: April 14, 2012, 01:15:36 am » |
hi is it possible to display hindi (indian language) using this library. what i need to do
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Online
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #36 on: April 14, 2012, 01:31:58 am » |
Hi cnavnath This is possible. You need a font which contains hindi glyphs. U8glib can use the glyphs from unifont ( http://unifoundry.com/unifont.html). The font u8g_font_unifont_18_19 ( http://code.google.com/p/u8glib/wiki/fontgroupunifont) already contains some Sanskrit glyphs from unicode page 09xx. You just provide this hindi font to u8glib with the setFont command: u8g.setFont(u8g_font_unifont_18_19);
After this, you can use u8g.DrawStr(x,y, "abc") to draw the Sanskrit glyphs. If you need glyphs from another uncode page, you may use bdf2u8g ( http://code.google.com/p/u8glib/source/browse/#hg%2Ftools%2Ffont%2Fbdf2u8g) to construct your own selecton of glyps. You can also tell me which glyphs you need from unifont and I can construct one or more fonts for you. Oliver Edit: Fontname
|
|
|
|
« Last Edit: April 14, 2012, 01:36:44 am by olikraus »
|
Logged
|
|
|
|
|
india
Offline
Newbie
Karma: 0
Posts: 42
|
 |
« Reply #37 on: April 19, 2012, 06:36:52 am » |
hii i used this library it very nice. i am from india and it also supporting my regional language hindi. but there is one issue that in that language i need to OVERSTRIKE two characters some time. means if i send "K" and "a" then result on lcd should be as shown in image please help me for this
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Online
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #38 on: April 19, 2012, 07:34:58 am » |
Hi Overstrike of two chars is no problam. Simply draw the char at the same location u8g.drawChar(10,10, "K"); u8g.drawChar(10,10, "a"); Of course you need to use a font with latin "a" and "K" glyphs. Oliver
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX USA
Offline
Edison Member
Karma: 25
Posts: 1617
|
 |
« Reply #39 on: April 19, 2012, 01:56:26 pm » |
Oliver, Is there drawChar() api function  That aside, I also played around with overstrike on a modified glcd lib and the resulting characters are not very legible for a 5x7 font. The other tricky thing is that the font either needs to be a fixed width or the variable width characters need to be rendered centered within a fixed width. --- bill
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Online
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #40 on: April 19, 2012, 02:30:30 pm » |
Hi Bill Is there drawChar() api function smiley-wink
Good point. It does not exist on the Arduino C++ interface, but it is there on the C-level interface. It should be added. The other tricky thing is that the font either needs to be a fixed width or the variable width characters need to be rendered centered within a fixed width. Additionally the are two different "a" out there. Reference to Wikipedia ( http://en.wikipedia.org/wiki/A):  I am not sure, why there is a need to overstrike two glyphs. I would expect, that all common glyphs are inside unifont. Oliver
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX USA
Offline
Edison Member
Karma: 25
Posts: 1617
|
 |
« Reply #41 on: April 19, 2012, 02:54:25 pm » |
I'm wondering if this really is a request/need for digraph support vs overstrike. The two are very different. I had to deal with using digraph support in the early 80's when writing C code on IBM machines and printers. EBCDIC does not have curly braces in its font. (Makes C programming really tough)
So the digraph (< is { and >) is }
When the device can render a curly brace it all happens under the hood and is hidden, however it can make writing code on devices/terminals or reading printouts when the digraph is displayed rather than the actual curly brace characters a bit challenging/confusing sometimes.
--- bill
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Online
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #42 on: April 19, 2012, 03:19:13 pm » |
Also a good question. For sure, u8glib does not support any digraphs. Oliver
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #43 on: May 01, 2012, 08:57:13 am » |
Hi,
u8glib is working great with a st7920 lcd over SPI on my Arduino Nano, but it does not compile for the atmega 32u4 (arduino leonardo) on Arduino 1.0. Using a earlier version of u8glib on arduino 1.0-RC2 works fine.
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Online
God Member
Karma: 69
Posts: 802
If you believe something is right, you won't see what's wrong (David Straker).
|
 |
« Reply #44 on: May 01, 2012, 11:29:27 am » |
Hi What is the u8glib version? What are the exact compiler errors?
Thanks, Oliver
|
|
|
|
|
Logged
|
|
|
|
|
|