Show Posts
Pages: 1 [2] 3 4 ... 99
16  Using Arduino / Displays / Re: Ucglib: A new Color OLED and TFT Library... on: August 11, 2014, 11:50:42 am
Hi

Looks odd. What is the constructor call you use? Do you have a datasheet of this device?
Will UTFT work with your TFT?

Oliver
17  Using Arduino / Displays / Re: YL24064-27 (T6963) Graphic Display, need help at wireing on: August 10, 2014, 02:56:43 pm
Maybe i missed this, but how did you actually add your -12 V?
+ of the battery must be connected to GND
- to the one and of the variable pot.

I have not really seen this on your picture.

Oliver
18  Using Arduino / Displays / Re: 128x64 Parallel/Serial GLCD using ST7920 Controller - Sketch & Mega2560 Pinout on: August 10, 2014, 10:05:12 am
Hi

GPIO = means "General Purpose Input/Output". You can use any four pins of your board. It does not matter which you use. The good thing about serial mode is, that you do not need to connect DB0 to DB7.
See my picture. I have only connected four lines (white wire) with my Arduino board.

Uncommenting a line in u8glib might not need to be enough.You might need to modify the arguments (=pin numbers)  of the constructor call.

BLA and BLK usually is the power supply for the BackLight LED. It will require an additional (fixed) resistor. 10K should be fine for the variable pot. Without the datasheet of your display it is difficult to say something reliable, but in general the wiper should be connected to v0. One end to GND and the other end to some negative voltage.

Oliver
19  Using Arduino / Displays / Re: YL24064-27 (T6963) Graphic Display, need help at wireing on: August 10, 2014, 09:57:05 am
Hi

Yes, a0 = c/d
Maybe you can most a picture of your setup and the constructor call, you use.
Also note, that often more than -10V are required.

Oliver
20  Using Arduino / Displays / Re: 128x64 Parallel/Serial GLCD using ST7920 Controller - Sketch & Mega2560 Pinout on: August 10, 2014, 04:00:57 am
Hi

U8glib should work for this display controller (see also my picture below)

For serial setup, connect PSB with GND. Then connect E, RW, RS and RST with some GPIO ports of your board and remember the Arduino pin numbers. Once you installed U8glib, use the following constructor:
Code:
U8GLIB_ST7920_128X64_1X(E, RW, RS, RST)
with E, RW, RS and RST must be the pin numbers of your Arduino board.
Similar to a KS0108 setup, V0 has to go to  the wiper of a variable resistor, which is connected between GND and Vout for contrast adjustment. On the picture below, i placed the var port directly on the display module.

Oliver



Oliver
21  Using Arduino / Displays / Re: YL24064-27 (T6963) Graphic Display, need help at wireing on: August 10, 2014, 12:06:57 am
Yes, you will need the Uno board, because your display requires 5V TTL logic.
I have tested u8glib sucessfully with the T6963 display.

Oliver
22  Using Arduino / Programming Questions / Re: Menu for Display on: August 09, 2014, 05:06:33 am
I think, using a button callback (like you did) is the prefered way to jump back to the other mode. This looks already good. You might check also direktly in the event source for "1", assign root and change mode. I have not tested this, but maybe you can also jump back then.

Oliver
23  Using Arduino / Displays / Re: YL24064-27 Graphic Display, need help at wireing on: August 09, 2014, 04:45:15 am
Have a look here: http://www.newhavendisplay.com/specs/NHD-24064CZ-FSW-GBW.pdf
Your vee pin: I think is an output (although marked as input on your datasheet, but i found newhaven displays description more trustable). You can do this: Apply 5V to your display and measure voltage at your vee pin. If it is -10 V you do not need to apply extra -10V, because it is produced on board. You can then use the vee pin as source for pin 4. However you need a resistor devider or adjustable resistor to obtain the voltage for pin 4.
Pin 4 is used to adjust contrast and must receive a voltage between -5 and -10V (see the newhaven doc).
If there is no voltage on vee, then you need an external -10 source to get the voltage for pin 4 (v0)

Oliver
24  Using Arduino / Displays / Re: YL24064-27 Graphic Display, need help at wireing on: August 08, 2014, 05:17:43 pm
reset = pin 10

The display might require -10 V (not clear from the datasheet)

How did you connect pin 4?

Oliver
25  Using Arduino / Displays / Re: YL24064-27 Graphic Display, need help at wireing on: August 08, 2014, 02:35:32 pm
Hi

This is a T6963 display as mentioned in the datasheet. u8glib might work.

Oliver
26  Using Arduino / Programming Questions / Re: Menu for Display on: August 07, 2014, 02:27:27 pm
Hi gnux

I see at least two problems.
First is, that the event source is not complete:
Code:
uint8_t m2_es_gnusso(m2_p ep, uint8_t msg)
{
  if ( keypad_is_used_for_menu != 0 )
   // Tasto(that means key) maybe is not correct my fault is use when I call ReadKeypad
  else
   // Tasto(that means key) maybe is not correct my fault is use when I call ReadKeypad
  switch(msg)
  {
    case M2_ES_MSG_GET_KEY:
      if (Tasto == '5'  )
        return  M2_KEY_EVENT(M2_KEY_SELECT);
      if (Tasto == '6') 
        return  M2_KEY_EVENT(M2_KEY_NEXT);
      return M2_KEY_NONE;
    }
   return 0;
}
I thinkt the logic is inverted and some { and } are missing.
Quote
Code:
uint8_t m2_es_gnusso(m2_p ep, uint8_t msg)
{
  if ( keypad_is_used_for_menu == 0 )  // this should be a check for equal, i think!!!
  {
    // do nothing
  }
  else
  {
   // Tasto(that means key) maybe is not correct my fault is use when I call ReadKeypad
  switch(msg)
  {
    case M2_ES_MSG_GET_KEY:
      if (Tasto == '5'  )
        return  M2_KEY_EVENT(M2_KEY_SELECT);
      if (Tasto == '6') 
        return  M2_KEY_EVENT(M2_KEY_NEXT);
      return M2_KEY_NONE;
    }
   }
   return 0;
}

Second problem is, that keypad_is_used_for_menu is never changed. If you detect "*", you probably want to set keypad_is_used_for_menu to 1. And if you did finished your menu, you may want to set keypad_is_used_for_menu to 0.

Oliver
27  Using Arduino / Networking, Protocols, and Devices / Re: I2C and USB conflict on Atmega32u4 with Leonardo bootloader on: August 07, 2014, 01:50:42 pm
hmmm... then i also have no other idea.

Oliver
28  Using Arduino / Networking, Protocols, and Devices / Re: I2C and USB conflict on Atmega32u4 with Leonardo bootloader on: August 07, 2014, 05:40:41 am
Hi

Are there pull-up resistors on the I2C bus?
It might be worth to try to add pull-ups (4.7K Ohm) and check whether this will improve the situation.

Oliver
29  Using Arduino / Programming Questions / Re: Menu for Display on: August 06, 2014, 11:54:08 pm
Hi

I think, your "m2_es_gnusso" looks almost korrekt, but should return NONE if no key is pressed. Will the menu work with this?

Code:
uint8_t m2_es_gnusso(m2_p ep, uint8_t msg)
{
  Tasto = customKeypad.getKey(); // is necessary call getKey() here ?
  switch(msg)
  {
    case M2_ES_MSG_GET_KEY:
      if (Tasto == '4')
        return  M2_KEY_EVENT(M2_KEY_PREV);
      if (Tasto == '5'  )
        return  M2_KEY_EVENT(M2_KEY_SELECT);
      if (Tasto == '6') 
        return  M2_KEY_EVENT(M2_KEY_NEXT);
      return M2_KEY_NONE;
    }
   return 0;
}
In order to switch between two different "phases", you may need to extend "m2_es_gnusso":
1. Introduce a new flag, that indicates whether you are in the menu or not
2. Check this flag inside "m2_es_gnusso"
for example:

Code:
int keypad_is_used_for_menu = 1;

uint8_t m2_es_gnusso(m2_p ep, uint8_t msg)
{
  if ( keypad_is_used_for_menu != 0 )
    Tasto = customKeypad.getKey();
  else
    Tasto = 0;
  switch(msg)
  {
    case M2_ES_MSG_GET_KEY:
      if (Tasto == '4')
        return  M2_KEY_EVENT(M2_KEY_PREV);
      if (Tasto == '5'  )
        return  M2_KEY_EVENT(M2_KEY_SELECT);
      if (Tasto == '6') 
        return  M2_KEY_EVENT(M2_KEY_NEXT);
      return M2_KEY_NONE;
    }
   return 0;
}


Now you can turn the flag keypad_is_used_for_menu on and off in order to switch between menu input and other input.

Oliver
30  Using Arduino / Displays / Re: OLED 1.3" I2C IIC 128x64 Serial LCD - Faulty? on: August 06, 2014, 12:41:55 pm
Hi All

Of course pull up resistors are mandatory for I2C, however it is not clear whether they are included on the OLED module or not. Yet, your pictures did prove, that you are able to transfer some usefull data to your OLED. So, pullups are not required in your specific case. This also aligns with my own experience, that such kind of OLED modules often do not need pullup resistors.

Still my suggestion is to give a try to u8glib with the setup of your picture. All the example sketches include the constructors, and checking the options will be as simple as uncommenting exactly one of the constructors in the examples of U8glib.

The "GraphicsTest" example looks like this in line 89:
Code:
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_128X64 u8g(4, 5, 6, 7); // SW SPI Com: SCK = 4, MOSI = 5, CS = 6, A0 = 7 (new white HalTec OLED)
//U8GLIB_SSD1306_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
//U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send ACK
//U8GLIB_SSD1306_ADAFRUIT_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_ADAFRUIT_128X64 u8g(10, 9); // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SSD1306_128X32 u8g(10, 9);             // HW SPI Com: CS = 10, A0 = 9 (Hardware Pins are  SCK = 13 and MOSI = 11)
//U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
//U8GLIB_SH1106_128X64 u8g(13, 11, 10, 9); // SW SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_SH1106_128X64 u8g(4, 5, 6, 7); // SW SPI Com: SCK = 4, MOSI = 5, CS = 6, A0 = 7 (new blue HalTec OLED)
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NO_ACK); // Display which does not send ACK

Uncomment this line:
Code:
//U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
Compile and upload the example. Will this work? I am very confident it will.

The problem here is not the Adafruit and not the OLED Display. It is the combination of both. I can not promise, that u8glib will work, but i did work together with a lot arduino users and i received a lot of feedback about successful installations.

Moreover, i sometimes order "strange" OLEDs from far east, just to make it work with U8glib. Of course you do not need to use u8glib (it might appear to be strange by itself), but at least you would know the exact controller type: SSD1306 or SH1106. Please also note, that the displays often are offered as SSD1306, although they contain a SH1106.

Oliver



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