Forum Discussion

CAlex's avatar
CAlex
Icon for Contributor rankContributor
3 years ago

Cyclone V SOC LCD example problem

Hi,

I'm trying to use LCD on my cyclone V board. I failed to compile the I2C LCD example so I moved the code to my project. I moved the master part and some encironment needed. The code ran well

But the LCD didnt show anything.

I put all the lcd_demo_master to my main.c and call the lcd_demo_master.

The console showed the init of I2C is successful as well.

Any Ideas?

Reguards.

6 Replies

  • CAlex's avatar
    CAlex
    Icon for Contributor rankContributor

    Nevermind,

    Now the problem is that how can I print "\n" and Hex on that LCD.

    I had a 128 bit buffer with 4 elements |--(uint8_t) a--|--(float) A--|--(uint8_t) b--|--(float) B--|

    I want to let the LCD show these four elements in their form

    | a "\n" A | first line

    ------------------------------

    | b "\n" B | second line

    I wrote the first line as followed but I dont know if it is what I want:

    // Read the first element code_a
    if(status == ALT_E_SUCCESS)
    status = alt_i2c_master_transmit(device,BUFFER,sizeof(uint8_t),ALT_E_FALSE,ALT_E_TRUE);
    if(status != ALT_E_SUCCESS)
    {
    break;
    }
    delay_us(LCD_PRINT_DELAY_US);

    ------------------------------------------> there should be a blank output
    // Read the second element count_A
    if(status == ALT_E_SUCCESS)
    status = alt_i2c_master_transmit(device,BUFFER+sizeof(uint8_t),sizeof(float),ALT_E_FALSE,ALT_E_TRUE);
    if(status != ALT_E_SUCCESS)
    {
    break;
    }

    Also, I didnt change their type,so they are all "char"

    Any solutions?

    Reguards.

    • CAlex's avatar
      CAlex
      Icon for Contributor rankContributor

      Sorry but that thread didnt help.

  • KellyJialin_Goh's avatar
    KellyJialin_Goh
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    Any updates from you end whether the feedback provided is useful?


    Thank you.


    Regards,

    Kelly


  • KellyJialin_Goh's avatar
    KellyJialin_Goh
    Icon for Frequent Contributor rankFrequent Contributor

    Hi,

    As we do not receive any response from you on the previous question/reply/answer that we have provided. Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


    p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.


    Thank you.


    Regards,

    Kelly Jialin, GOH