On my lcd, I adjust contrast with the potentiometer on pin V0.
Robert
On my lcd, I adjust contrast with the potentiometer on pin V0.
Robert
Without the LCD data sheet I don't think I can help ay more. Looking at the controller data sheet does not tell the whole story. There are different interfaces and component combinations for different VDD voltages and LCD manufactures. Where did you buy this LCD?
Dave
You are right Dave !
All LCD's was a gift for me from a friend. He gave me a printed paper with sumary of LCD(7pins):
- Display Type : TM202SIFSUGWA
- LCD OPERATING VOLTAGE : 4.8V
- VDD : 5V
- DRIVE METHOD : 1/16 DUTY ; 1/5 BIAS
- CONTROLLER : ST7036i
- pinouts, tolerance, etc
Really on boards I found 3 LCDs with different serials, but the boards are same, with the same functions. Actually I work on TM202SGFSGWA-B-1A . On internet I dont find a datasheet for them. I suppose that all LCDs with ST7036 controllers have the same init. The serials depending from manufacturers.
The LCD's are mounted on a working factory boards. I desolder the LCD from motherboard for test...also I make a test on a LCD directly on board ( of course that I cuted the tracks from sda, scl and reset pins for separate of rest components board) because I want to be sure that LCD was not destroied from desoldering. Any code I wrote in pic, I tested with potentiometer divider , with V0 short with Vdd.
I see in datasheet that contrast can be configured from registry(case V0 short with Vdd) or from external resistors divider.
Also I have LCDs with 8 pins but I have not any information about them....I have a information only from a serial printed on back LCD side(TM202TCCWUGWA)...here I suppose that have a 7032 controller, but is no important at this time.
Again thx for your help !
I think the LCDs that googled up for TM202 were Tienma. None of them were TM202T or S. It looks like these are custom made, specs could be anything.
I suggest contacting Tienma and asking for a datasheet.
Robert
As an outside chance change your pullup resistors to 4.7K, I have never used 1k. The contrast is set in the initialization of the display. I do not think you can change it on the fly.
And lastly give this a try
Code:'**************************************************************** '* Name : UNTITLED.BAS * '* Author : Dave Cutliff * '* Notice : Copyright (c) 2014 Use at your own risk * '* : All Rights Reserved * '* Date : 12/29/2014 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** #CONFIG __CONFIG _CONFIG1, _FCMEN_OFF & _FOSC_INTOSC & _WDTE_OFF & _MCLRE_OFF & _CP_ON & _IESO_OFF & _BOREN_OFF & _PWRTE_OFF __CONFIG _CONFIG2, _PLLEN_OFF & _STVREN_OFF & _LVP_OFF #ENDCONFIG OSCCON = %01101010 'sets the internal oscillator to 4Mhz TRISA = %00000000 TRISC = %00000000 ANSELA = %00000000 ANSELC = %00000000 OPTION_REG.7 = 0 SCL VAR PORTC.0 SDA var PORTC.1 Reset var PORTC.2 'could tie reset pin to vdd through 10K resistor pause 100 HIGH Reset 'OPF1 = 0 goto StartProgram '******************************************************************************** '=============Initializing LCD========== ST7036Init: I2CWRITE PORTC.1, PORTC.0,$78,[$00,$38, $39,$14,$79,$50,$6C,$0C,$01,$06] ' Return '******************************************************************************** startProgram: gosub ST7036Init I2CWRITE PORTC.1, PORTC.0,$78,[$40,$48,$65,$6c,$6c,$6f] ' Hello IdleLoop: ' could blink an led here goto Idleloop
Last edited by DaveC3; - 30th December 2014 at 23:52.
Yup, from the manual:
Could this be an issue?The I2C clock and data lines should be pulled up to Vcc with a 4.7K
RobertTransfer on the I2C bus can be paused by the receiving device by its holding the clock line low (not supported on 12-bit core PIC MCUs). To enable this the following DEFINE should be added to the program:
DEFINE I2C_HOLD 1
EDIT: I would try one last thing with Dave's code, add PAUSE 250 before every write to the LCD, just to eliminate that possibility.
Last edited by Demon; - 31st December 2014 at 01:45.
Bookmarks