Show Posts
Pages: 1 [2] 3 4 ... 97
16  Using Arduino / Displays / Re: ST9720 128x64 - slow loop time, what can I do ? Due/u8glib/HWSPI ? on: July 20, 2014, 09:52:10 am
Code:
displayMain();
if(btnOK()==true){
  //menu draw
 displayMenu();
}
This does not make sense, because displayMenu() will overwrite the output of displayMain(). You will never see the output of displayMain(). Maybe use a else clause here?

Code:
  while(!btnBack()){
  u8g.firstPage(); 
  do {
  u8g.setFont(u8g_font_baby);
    u8g.drawStr( 0, 5, "Menu");
    u8g.drawLine(0, 7, 128, 7); 
 } while( u8g.nextPage() );
}
The code of btnBack() is not shown, but the code will force to redraw the screen with constant data. I think you could do something like this:
Code:
  if(!btnBack()){
  u8g.firstPage(); 
  do {
  u8g.setFont(u8g_font_baby);
    u8g.drawStr( 0, 5, "Menu");
    u8g.drawLine(0, 7, 128, 7); 
 } while( u8g.nextPage() );
while(!btnBack())
   ;
}
This would at least improve the reaction time.

Quote
still buttons are misfiring.
I think this is mainly because of the missing debouncing. You should check for a transition from true to false of the btnOk() function.

Quote
from what i understand there is no stopping the picture loop,
At least, you should not jump out of the loop or terminate the loop. Still, you can decide not to execute the complete loop as long as nothing has changed.

Maybe it is worth to study this tutorial: https://code.google.com/p/u8glib/wiki/tmenu. Especially the part about code optimization (the use of the update variable).



Oliver
17  Using Arduino / Displays / Re: ST9720 128x64 - slow loop time, what can I do ? Due/u8glib/HWSPI ? on: July 20, 2014, 06:36:00 am
Hi

HW SPI will not increase speed in all cases. One common cause for slow refresh is using something else than pure u8glib graphics functions inside the picture loop. In general you should place commands like AnalogRead() outside of the picture loop, store the result of AnalogRead in a global variable and draw the value of this global inside the picture loop. Same applies to all kind of calculation, which should also happen outside the picture loop.

Please paste your picure loop for further discussion.

Oliver
18  Using Arduino / Displays / Re: Seeed Studio Custom Defined Libraries and Applications on: July 20, 2014, 01:49:28 am
Hi rsk22

Thanks a lot for writing this library.

Are there installation instructions? Can you provide a link to TFT.h? It is also not clear to my, how to install your library.
Additional question: TFT.h is already part of the Arduino IDE. Is this the same library?

Can you also provide the link to the display itself.

Then: I did not found the code for Arduino-TouchScreen-ZapAMole

Good work and nice C++ Code
Oliver

19  Using Arduino / Displays / Re: Suggestions for easy to use (and cheap) TFT screens? on: July 18, 2014, 11:51:46 pm
Did you look at this thread: http://forum.arduino.cc/index.php?topic=222327.0
My suggestion is to buy a ST7735/160x128 Color TFT. This is also software compatible with the TFT from the Arduino store.


If you search for "ST7735 160x128 Color TFT", you will find devices, starting from $5 with free shipping from far east.

Such a display is also available in Germany:
http://www.exp-tech.de/Displays/1-8-18-bit-color-TFT-LCD-display-with-microSD-card-breakout-ST7735R.html

Oliver
20  Using Arduino / Displays / Re: Report: Inexpensive SPI based TFT Displays (PCF8833, ST7735, ILI9341) on: July 18, 2014, 01:54:47 pm
Thanks for your report on this display.

Oliver
21  Using Arduino / Displays / Re: OLED display with 4-wire SPI mode, but without CS on: July 17, 2014, 11:27:56 pm
Yes, you are right. My calculation was wrong. I also guess it receives 3V only.

Maybe the display can be connected to 5V power source of the Due (3.3V logic level).

Oliver
22  Using Arduino / Programming Questions / Re: Menu for Display on: July 17, 2014, 03:04:21 pm
Sure, let me know if you have further questions.

Oliver
23  Using Arduino / Displays / Re: Problem with SSD1306 LCD and U8glib on: July 17, 2014, 02:37:55 pm
Hi Salvatore

Greetings from South Germany.

Your OLED does not contain the SSD1306 controller, but has the SH1106. In U8glib I added the SH1106 construcor with v1.16. This should fix your problem.

Recently, this has been asked more often here. I guess ebay sellers declare their OLEDs as SSD1306, but actually sell a display with SH1106 controller.

Oliver

24  Using Arduino / Displays / Re: OLED display with 4-wire SPI mode, but without CS on: July 17, 2014, 02:29:54 pm
Both OLEDs have a small 3-pin SMD-IC, which is labeld 662K. Should be a low dropout regulator (LM6202-3.3). What i have understood so far, the voltage drop is less than 0.5V, so i guess, the display receives 3.25V.
From what i have seen, both OLEDs work reliable with 3.3V power supply and 3.3V logic levels. Anything else might lead to problems.

Oliver
25  Using Arduino / Displays / Re: [SOLVED] Using u8glib with East rising ER-OLEDM028/32 (SSD1322) on: July 17, 2014, 02:10:31 pm
Ausgezeichnet...
Good to see that it works.

Oliver
26  Using Arduino / Displays / Re: Problem with SSD1306 LCD and U8glib on: July 17, 2014, 06:26:30 am
Thanks for the feedback. Meanwhile also release 1.16 is officially available for download.

Oliver
27  Using Arduino / Displays / Re: looking for an East rising ER-OLEDM028 (SSD1322) library on: July 17, 2014, 03:18:03 am
you mean the
Code:
R19 and R23 ON
R18 and R20 NC
remark?
yes
 

but while at it, is there any advantage for 4 line SPI over 3 wire? I would prefer to simply my connections (as the screens are on other assemblies would putting "U8G_PIN_NONE" on the DC pin and wiring the screen for 3 pin SPI do the trick?
or should I just stick with 4 pin that is transparently supported?

3-wire SPI requires that the information on the DC pin is transfered along with the 8 databits. That means SPI has to transfer 9 bits per block. First, this is not implemented in U8glib at the moment. Second problem, this is not supported by the ATMega hardware, so there is no easy HW SPI support on AVR systems. More modern architectures (like SAM?) allow 9 bit HW SPI.

All in all, currently this is not supported with U8glib.

Oliver
28  Using Arduino / Displays / Re: looking for an East rising ER-OLEDM028 (SSD1322) library on: July 17, 2014, 01:35:40 am
I just looked at the datasheet again.
You must move the zero Ohm resistor from R19 to R18. So you need to unsolder the resistor from position R19 and resolder it on position R18.

Oliver
29  Using Arduino / Displays / Re: looking for an East rising ER-OLEDM028 (SSD1322) library on: July 17, 2014, 01:17:30 am
Hi

On the interface diagram you see, that BS1 is set differently for parallel and serial mode. If the BS1 line is not available on the header, then usually there is a solder bridge for that. If you post a picture of the back side of the display, we could look have a look together.

For the constructor, it would be good to see, which parameters are used. Also: To switch between HW SPI and SW SPI, usually no rewiring is required.

But actually, i think, the problem is that your display is set to parallel mode and must be forced to serial mode first.

Oliver
30  Using Arduino / Displays / Re: looking for an East rising ER-OLEDM028 (SSD1322) library on: July 16, 2014, 11:25:46 pm
Hi Uri

Can you provide more detailed information?
- Exact U8glib constructor
- Which pins of display and Arduino board are connected
- Optional picture of your setup.
- How did you ensure, that the display is put into serial (SPI) mode?

Especially the last question might be the cause for your problem. I also did not see an information in the datasheet about how to switch to SPI mode (maybe i missed this). Is there a solder bridge, which defines parallel or serial mode? Maybe you can post a picture of the back side of the display.

Oliver


Pages: 1 [2] 3 4 ... 97