Shop OBEX P1 Docs P2 Docs Learn Events
EA DOGM128-6 Display with SPI - Page 3 — Parallax Forums

EA DOGM128-6 Display with SPI

13»

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-28 22:34
    @rubicon - We can't help you with the PIC code. You'll have to struggle through that yourself or see what help you can get from various PIC support forums. You're welcome to use what you find out here about the use of the DOGM128-6 with the Propeller, but this is a Propeller support forum after all.
  • Nick DNick D Posts: 7
    edited 2009-10-29 10:11
    I can try and help you, Rubicon. Evidently, we're on the wrong post. Can you give me your email?
    Nick
  • rubiconrubicon Posts: 2
    edited 2009-10-29 14:17
    I'm sorry about that, I've just been searching for information on the EA-DOGM128-6 and this I was lead to this forum. Though I understand this forum is for another use.... my email address is ruben.loganantharaj@smartfield.com ..... Thank you Nick D for the help, please email me so I can show you my code.
  • EADOGM162L-AEADOGM162L-A Posts: 2
    edited 2010-01-07 13:29
    i am trying to get the EADOGM162 display to start using SPI interface.after successfully interfacing the display to board and sending the correct data sequence to the display from the MOSI pin(checked in scope), the display is still dead.I am confused as to what might be the problem during initialization.

    the data i sent from spi MOSI is using standard SPI function for the board SPI_I2S_SendData(SPI2, byte);

    the byte is transmitted successfully and i scoped the MOSI output.but the lcd doesnt start.

    in the LCD part of the code is it necessary to do any coding prior to the initialization like addressing registers and all?i just started sending commands through MOSI to SI pin of display.should i do some coding for shifting the registers in display for data? am i doing something wrong?
    Reply With Quote
  • Nick DNick D Posts: 7
    edited 2010-01-07 14:20
    This is some of my initialization code:

    #define EADOGM_ROWS 2
    #define EADOGM_INIT_BIAS_SET 0X14
    #define EADOGM_INIT_POWER_CONTROL 0X55
    #define EADOGM_INIT_FOLLOWER_CONTROL 0X6D
    #define EADOGM_INIT_CONTRAST_SET 0X78
    #define EADOGM_INIT_FS1 0X39
    #define EADOGM_INIT_FS2 0X38
    #define EADOGM_INIT_CLEAR_DISPLAY 0X01
    #define EADOG_INIT_ENTRY_MODE 0X06
    #define EADOGM_CURSOR_ON 0b00001010
    #define EADOGM_CURSOR_OFF 0
    #define EADOGM_DISPLAY_ON 0b00001100
    #define EADOGM_DISPLAY_OFF 0

    void eaDogM_Initialize(void)
    {
    EADOGM_RST=1;
    Time_1ms(10);
    EADOGM_RST=0;
    Time_100ms(1);
    EADOGM_RST=1;
    EADOGM_CS=1;
    EADOGM_RS=0;
    Time_100ms(2);
    //these are all commands. RS=0
    printf("%c",EADOGM_INIT_FS1);
    printf("%c",EADOGM_INIT_BIAS_SET);
    printf("%c",EADOGM_INIT_POWER_CONTROL);
    printf("%c",EADOGM_INIT_FOLLOWER_CONTROL);
    printf("%c",EADOGM_INIT_CONTRAST_SET);
    printf("%c",EADOGM_INIT_FS2);
    printf("%c",EADOGM_INIT_CLEAR_DISPLAY);
    printf("%c",EADOG_INIT_ENTRY_MODE);
    EADOGM_RS=1;

    Make sure you trigger the CS line. Even though it's the only display, you still have to use it. Make sure RS is low for commands and high for data.
    Nick
  • Nick DNick D Posts: 7
    edited 2010-01-07 15:11
    The Printf calls putch and SPI:
    void putch(char c)
    {
    int i;
    int count;
    int dots;
    if(EADOGM_RS)
    {//if this is on, then the data is in the font table
    i=(c-32)*8; //get ascii equivelent of char, subtract 32 for table address
    for(count=0;count<8;count++)
    {
    dots=font1[noparse][[/noparse]i+count];
    spi(dots);
    }
    current_col=current_col+8;
    }
    else
    { //must be a command
    spi(c);
    }
    }
    //
    void spi(int d)
    {
    EADOGM_CS=0;
    RXdata=SSPBUF;
    if(!DEBUG)
    {//skip this section if debugging
    do //clear collision flag, send data, check collision and repeat if wcol=1
    {
    SSPBUF=d; //send data
    }while(WCOL);
    while(!BF);
    }
    RXdata=SSPBUF; //clears BF flag
    //Time_1ms(2);
    EADOGM_CS=1;
    //Time_1ms(1);
    }

    You realize you need a font array to display, correct? I have the bitmap for a font if you need it. send me your email address and I'll send it to you.
  • phillip_oyephillip_oye Posts: 1
    edited 2012-04-23 01:30
    Hi fellas,

    I am sharing my code in c++ that is actually writing something on the display, but I would like to use a font editor to make it easier to control bytes written on the display and I don't have USB-TEST BOARD EA 9780-1USB. Have you got any general advice how to approach the working with fond editor on graphic displays in c++? I'm using AVR studio and working on atmega88.
    cheers!
    c
    c
    5K
  • RaymanRayman Posts: 14,838
    edited 2012-04-23 03:51
    First, I'd ditch the AVR and atmega and get a Parallax Propeller (this is the Propeller forum after all).

    Second, I'd look for an open source MFC Visual Studio font editor on the web.
    I've looked, but haven't found one. Would be a nice find though...
    I think most fonts these days are adobe or ttf scaleable fonts and not the simple fonts we need.
    I do have some old Palm Pilot tools that might work though...
Sign In or Register to comment.