Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lostminty

Pages: [1]
1
Hi again,

I'm currently running this code which essentially is the same as the demo code in the
Code: [Select]
display.frequency(300000); //in main method (display is an I2C object from mbeds API)
...


int lcd_init(int con){ //takes an int 0-63 for the 6bit contrast value. Adds these to the base values (0x70 and 0x5C) replaces 0x78 and 0x5E commands from the example
   
    int return_bit = 1;
    int address = 0x78<<1;
    int con1 = 0x70 + (con && 0xF);
    int con2 = 0x5C + (con && 0x30);
    display.start();
   
    return_bit=return_bit&display.write(address, (char*)0x00,4,false);
    return_bit=return_bit&display.write(address, (char*)0x38,4,false);
    wait_ms(10);
    return_bit=return_bit&display.write(address, (char*)0x39,4,false);
    wait_ms(10);
    return_bit=return_bit&display.write(address, (char*)0x14,4,false);
    return_bit=return_bit&display.write(address, (char*)con1,4,false);
    return_bit=return_bit&display.write(address, (char*)con2,4,false);
    return_bit=return_bit&display.write(address, (char*)0x6D,4,false);
    return_bit=return_bit&display.write(address, (char*)0x0C,4,false);
    return_bit=return_bit&display.write(address, (char*)0x01,4,false);
    return_bit=return_bit&display.write(address, (char*)0x06,4,false);
    display.stop();
   
    return return_bit;
}



void lcd_show(char* text){
    int n;
    display.start();
    int address = 0x78<<1;
    display.write(address,(char*)0x40,4,false);
    display.write(address,text,sizeof(text),false);
    display.stop();
}

The init always returns 1 so far. I have pretty normal voltages..

SCL  3.1V
SDA  3.1V
VSS 0V
VDD 3.1V
VOUT 2.8?V (this one I expected to change based on the int passed to the lcd_init method. It does not) (this is also a NP 100V 1uF cap)
C1+ 3.1V (might be the other way around, I replaced this with a non-polarised 100V 1uF cap)
C2- 0V

I remember seeing someone with an issue like this previously in the forum. Will be browsing it now.

2
Thanks for the reply Michael.

I was using 5kOhm pull-up resistors so I'll try switching those.

The code I'm using is from an 'enhanced' lcd driver off the mbed website. It has a mode for the ST7036 chip. I'll use the example you've supplied to check the code fits with this.

The two capacitors, on VOUT and C1+/C1- , are they only needed for this 'vlcd' set up? will the display work correctly without them is what I mean.

3
Hi,

I've purchased a C0220BiZ display. I am connecting it to an mbed BLENano (Nordic chipset).  This device doesn't have many pins (It does have bluetooth which I plan to use to read terminal output soon).

Currently I have the following layout:

pin 1 (RST) : NC
pin 2 (SCL) : pin 9 of mbed
pin 3 (SDA) : pin 10 of mbed
pin 4 (VSS): Ground of mbed
pin 5 (VDD): VDD of mbed (3V3)
pin 6 (VOUT): 1uF 46(?)V electrolytic capacitor connected to VSS
pin 7 (C1+): 1 uF 46V electrolytic capacitor
pin 8 (C1-): 1 uF 46V electrolytic capacitor

On the spec sheet, which I admit I do not fully grasp, It looks like K-R/G/B and A go to ground. Also, VDD goes to ground?

I am not sure at all how to wire K-R/G/B and A. I've got a digitalPin off the mbed going through a 300 Ohm resistor to provide roughly 10mA? I'm unclear of what I'm doing at this point.

I'm going to double check I have SCL and SDA correctly orientated.

Pages: [1]