Show Posts
Pages: 1 ... 30 31 [32] 33 34 ... 104
466  Using Arduino / Displays / Re: Problem with UTFT Library and TFT_320QVT screen (using Arduino Due) on: January 19, 2014, 05:01:08 pm
I agree, that there is not much information in the original post. However it was mentioned "Due" in the title...

From a technical point of view: There was one thread in the german forum, which includes the answer from SainSmart (in english)
http://forum.arduino.cc/index.php?topic=121418.0

The TFT will work with UTFT on the Uno  and the Mega with 0023 and the 1.0.1 IDE. Also the SainSmart lib will work. However, Arduino Due was not mentioned (in fact probably not available at that time), so maybe there is an incompatibility between the Due and the TFT and/or UTFT.

Typical problems include:
- 3.3V: Due is a 3.3V device, all other Boards are 5V. Maybe the TFT expects 5V
- Pin assignments. Maybe different pins need to be used for the Due
- Due not supported in UTFT: Problem is, nobody can test all cominations. So UTFT might be compatible in general with the Due, but maybe the specific shield is not supported.

How to track down the problem:
Try to figure out whether the correct signals are applied to the TFT shield. Best is to use a scope...

Oliver
467  Using Arduino / Displays / Re: U8glib: Graphics Lib for LCDs and OLEDs on: January 19, 2014, 01:22:39 pm
So it uses HW SPI if you define the HW SPI pins in the setup function?

The opposite is true, see page http://code.google.com/p/u8glib/wiki/device.

Text copy from there:
Code:
SW SPI u8g_dev_st7565_64128n_sw_spi U8GLIB_64128N(sck, mosi, cs, a0 [, reset])
HW SPI u8g_dev_st7565_64128n_hw_spi U8GLIB_64128N(cs, a0 [, reset])


Oliver
468  Using Arduino / Displays / Re: How to use this 128X64 graphic LCD by Arduino UNO? on: January 19, 2014, 01:19:20 pm
@raschemmel:
Serial monochrome displays usually do not have a MISO output. The microcontroller does not receive any information from the LCD: This is one of the big problems with monochrom LCDs.

@greeng:
To suggest anything usefull, some pictures, exact setup and the constructor used, would be nice.

Quote
Could I check the source code about send data to the IC ram something like that ?
it is open source. All source is included in the zip file or on the u8glib google page: http://code.google.com/p/u8glib/source/browse/#hg%2Fcsrc.

Oliver
469  Using Arduino / Displays / Re: How to use this 128X64 graphic LCD by Arduino UNO? on: January 19, 2014, 03:00:01 am
Indeed timing needs to be correct, but all timing values are minimum values. That means for example if CD is changed, then the software has to wait at least some nano seconds. Waiting longer is not a problem. Slow controller like the Arduino Uno easily fullfill these conditions.

Oliver
470  Using Arduino / Displays / Re: U8glib: Graphics Lib for LCDs and OLEDs on: January 18, 2014, 04:33:02 pm
U8glib supports SW SPI (with any pins), but also HW SPI.

Oliver
471  Using Arduino / Displays / Re: large backlight monochrome lcd on: January 18, 2014, 05:15:36 am
Hi Marco

Monochrome displays above 5" usually are driven by the RA8835 controller. I do not know any Arduino Library for it.
Nice displays are available from buydisplay.com. I recently added support for one of their 4.3" displays to U8glib.

Oliver



472  Using Arduino / Displays / Re: How to use this 128X64 graphic LCD by Arduino UNO? on: January 14, 2014, 01:47:42 pm
Connecting 3.3V device to a 5V board can destroy the 3.3V device. You really need a level shifter.

Using U8glib should be simple. Connect your display as shown in the pictur.

Install U8glib (can be done through the Arduino IDE meanwhile). You will find some U8glib examples in the IDE.
Start with the HelloWorld example.

Uncomment one of the following constructors (remove the // at the beginning of the line) :
//U8GLIB_DOGM128 u8g(13, 11, 10, 9);      // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_LM6059 u8g(13, 11, 10, 9);      // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9
//U8GLIB_LM6063 u8g(13, 11, 10, 9);      // SPI Com: SCK = 13, MOSI = 11, CS = 10, A0 = 9

Compile and upload. 
If nothing appears on the display, the wiring might be wrong or your display has been destroyed.
If you see something, try all constructor one after the other, until you get the best result.

Oliver
473  Using Arduino / Displays / Re: HY28B SPI/Serial Display on: January 13, 2014, 03:49:00 pm
Nice finding, but i think this is far away from a usefull library smiley-sad

Oliver
474  Using Arduino / Displays / Re: HY28B SPI/Serial Display on: January 13, 2014, 02:43:59 pm

At the weekend i was looking at the ILI9325 SPI protocol. Now looking at the PCF8833 (which is the controller for the LPH9135) i would say that the SPI protocol is totally different.

I did also look at UTFT.h: The ILI9325 is only supported in 8 Bit or 16 bit parallel mode.

All in all, it seems that UTFT does not support your display in SPI mode.

Oliver

475  Using Arduino / Displays / Re: How to use this 128X64 graphic LCD by Arduino UNO? on: January 13, 2014, 01:24:52 pm
At least two of the caps are required for the internal charge pump. The LCD requires about 10V which are generated from 3.3V with this charge pump. If you see black lines, then this charge pump works fine. You should be able to measure about 10V at one of the caps.

Not sure how we could support you further. Maybe it makes sense that you provide a complete schematic of your setup, so that this can be reviewed.

Oliver
476  Using Arduino / Displays / Re: U8glib: Graphics Lib for LCDs and OLEDs on: January 12, 2014, 07:24:23 am
With the SW SPI constructor
U8GLIB_SSD1306_128X64(sck, mosi, cs, a0 [, reset])
you can use any Arduino pin. For example
U8GLIB_SSD1306_128X64(1,2,3,4)
tells U8glib, that the sck line of the display is connected to pin 1 of the Arduino board, MOSI (data) line is connected to pin 2 of the Arduino and so on. In fact you can mimic the Adafruit setup with U8glib (pin values from your table):
U8GLIB_SSD1306_128X64(10, 9, 12, 11, 13)

Also ensure, that your display is put into serial mode.

Oliver


477  Using Arduino / Displays / Re: Strange OLED display problem on: January 10, 2014, 02:11:35 pm
Like most other displays, your OLED module has two different parts:
- The OLED display areay
- The controller (SSD1351)

Not all OLEDs are identical. They differ in brightness, speed, capacitance, etc.
The controller is able to support all of them, but the correct setup for the specific display needs to transfered from the uC to the SSD1351. Obviously the adafruit lib sends the correct setup sequence for their own OLED, but of course it might not fit for other OLEDs. So you need to modify the setup sequence for your display.

Good candidates for modifing are these lines from the Adafruit Lib:
Code:
    writeCommand(SSD1351_CMD_PRECHARGE);                 // 0xB1
    writeCommand(0x32);
 
    writeCommand(SSD1351_CMD_VCOMH);                         // 0xBE
    writeCommand(0x05);

    writeCommand(SSD1351_CMD_CONTRASTABC);
    writeData(0xC8);
    writeData(0x80);
    writeData(0xC8);

    writeCommand(SSD1351_CMD_CONTRASTMASTER);
    writeData(0x0F);

    writeCommand(SSD1351_CMD_SETVSL );
    writeData(0xA0);
    writeData(0xB5);
    writeData(0x55);
   
    writeCommand(SSD1351_CMD_PRECHARGE2);
    writeData(0x01);

I suggest to also read section 8.7 of the SSD1351 datasheet.

Oliver
478  Using Arduino / Displays / Re: How to use this 128X64 graphic LCD by Arduino UNO? on: January 10, 2014, 01:58:11 pm
It could be also an issue with the capacitors. I have not seen them on any of your pics, but you usually need two external 1uF ceramic caps (see page 6 of the 1705 manual).
 
Oliver

479  Using Arduino / Displays / Re: How to use this 128X64 graphic LCD by Arduino UNO? on: January 09, 2014, 03:27:47 pm
PART 1: Let me start to answer the none-display questions.

Quote
1010,0000 = 160 decimal,  is my interpretation right in this way?

In C and C++ (which is the programming language used by Arduinos), all numbers are decimal unless they are prefixed with 0 (zero) or 0x (zero x).
If a number has an initial zero, then the number is interpreted as octal number. This means that "010" has the value 8!
If a number has an initial prefix of "0x" then the number is interpreted as hexadezimal value.
Actually i try to avoid octal numbers, but hexadezimal number are quite useful to send to a display controller.
So, 1010,0000 can be written as 0xa0 (or 0xA0) because four bits equal exactly one hexadecimal digit:
binary 1010 = hex a
binary 0000 = hex 0

Quote
1. Should SPI.transfer ( ) only tranfers decimal number or  how to write it to send other types of data?

SPI.transfer can transfer a value between 0 and 255. The range is important, but not the representation of the number.
It does not matter if you write SPI.transfer(160) or SPI.transfer(0xa0). In both cases a specific sequence of 8 bits is transfered.
You could also transfer a single letter: SPI.transfer('B') which is equal to SPI.transfer(66).

Quote
3. Should  all arduino sketches need a loop () function?  what if I only want the program run for once? for display how to do it?

let me split this into three questions:

> Should  all arduino sketches need a loop () function?
Yes. I leave it as an excercise to you to try to compile without "loop()"

> what if I only want the program run for once?
Put all your code into setup().

Microcontroller do have the ability to go to some shutdown mode in order to reduce power consumtion to a minimum, but i think this is beyond the scope of this thread.

> for display how to do it?
Do what? If you just want to display something static until power is switched of, then put all your init and display code into "setup()". But for my own applications it is more like this:

setup() {
  init display
  output something to the user
}

loop() {
  wait for some input
  display something
  // loop will start at the beginning and wait for some input again
}

If the input is a temperature sensor, then this could look like this:
loop() {
  read temperature from sensor
  display temperature
  delay for 1 second
}

This wil update the display every second.

PART 2: Display specifc answers

First, i think you understood the concept of communication with the display controller. The code looks quite good regarding the setting of the command/data and the chip select line.

Quote
2. How to set the display column address ( -Y ) see ic spec P13 , command as blow , how to pick a specific column of pixels?
Quick answer: Either the display vendor tells you this or you have to figure this out by testing and analysis.

Long answer:
For the display Chip on Glas module on your picture, probably three or four companies are involved:
Company 1: Creates the actual liquid crystal
Company 2: Creates the display controller (UC1705)
Optional Company B: Creates LED backlight
Company 3: Assembles the liquid crystal, the optional backlight and the display controller to something which is called COG Module.

The problem is: We do not know how company 3 has connected the display controller with the liquid crystal. For example:
The controller actually has 132x65 dots, but the liquid crystal only has 128x64. Which line and which colums are invisible? This is a decision that was taken by company 3 during the wiring of the two subcomponents.
Let as consider the binary value 1000,0000 at position 0 in the controller ram.
Upper left pixel of the 128x64 might be swithed on. But it might also be the lower left corner.
Also it might be the 7th pixel of the display on the top row if the byte order is swapped.
It might also be invisible if the liquid crystal if the crystal is connected to rows 1 to 65.
It might also be invisible if the liquid crystal is connected to colums 4 to 132.
But there might be also a pixel visible at position 3  if the lc is connected from 4 to 132 and the byte order is swapped.

This means: If company 3 does not provide you enough information, then you have to set some pixel on the screen do some reverse engineering how the interconnection between controller and crystal.

There are also several registers in the controller which allow you to setup the controller so that some parts of the swapping is done automatically (like SEG and COL direction).

This is my suggested procedure on an unknown LCD:
Step 1: Try to make something visible. This includes
- Activate charge pump
- Activate Display
- Activate "all pixel on" mode or write some random pixels in the middle of the display
- setup display contrast
- activate other LCD parameters
Step 2: Fine tuning
- Figure out bit order
- Analyse how the 128x64 is mapped to the 132x65 RAM area
- Apply correct COM and SEG order

Of course a good datasheet from company 3 will tell you all these details  smiley-wink

So my question: Do you see something on the screen already?

Oliver



480  Using Arduino / Displays / Re: How to use this 128X64 graphic LCD by Arduino UNO? on: January 06, 2014, 06:23:09 pm
For some strange historical reason these LCDs always need an additional signal to accept "command" input. In fact, this has been taken over to all modern OLED and TFT controllers. So the SPI communication needs four signals going from the uC to the LCD controller:
- clock signal
- serial data
- c/d signal
- chip select

This is also called "4-wire" SPI as mentioned on page 7 in the UC1705 data sheet.

There is also no MISO signal, so you can not read back any data from the controller in SPI mode. This also makes the programming somehow difficult.

Oliver
Pages: 1 ... 30 31 [32] 33 34 ... 104