Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ultrasounder
Level 1
Level 1
First like given 5 sign-ins First question asked

I inherited a design from a previous engineer and I am not familiar with PSoC. I have been trying to bring up a PSoC5 LP based system that is based on a reference design which itself was based on the CY8CKIT-059 prototyping kit. The previous reference design was a carrier board that adapted the CY8CKIT-059 kit. Barring a few changes to the pin definitions, the firmware should be identical to the previous version.  The carrier design had a LCM-S01602DSR/C LCD MOD 32 DIG 16 X 2 REFLECTIVE display.  The previous design the display function was verified to work and this new PCB was going to just get the firmware ported over with "simple" pin remaps. But after I created the new firmware with remapped pins, I flash the new board with firmware and I dont get any of the original functionalities. The LCD is always showing some garbage characters(left pointing arrows). But i already went and verified the pins on the PSoC driving into the display port and I see actual bits of data being written on the bus. But that still doesn't prove whether the display is correctly configured or not. I have attached a snapshot of my schematic for your reference. Please let me know if i overlooked something obvious. 

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Seeing your schematics, I could not find a good reason for your issue.

So I wrote a simple test program for CY8CKIT-059.

I assigned the LCD pins to P2[6:0], which may not be a good practice

as P2[1] is connected to a LED1 and P2[2] is connected to SW1.

This causes some data corruption(s) time to time. (Note.1)

 

Well returning to the topic, my program worked like below

IMG_5849.JPG

So far, so good?

Then I swapped P2[3:0] -> P2[0:3], reversed the signal order of DB4, DB5, DB6, DB7,

to DB7, DB6, DB5, DB4, and I got

IMG_5848.JPG

So, one candidate of possible cause of your problem may be wrong connection(s) of DB4~DB7 with P2[0:3].

moto

(Note.1)

This morning I found that if I modify LCD_PrintString() in LDC.c (filename varies depending on your LCD name) as below, as far as I have been testing, no data corruption(s) happened.

void LCD_PrintString(char8 const string[]) 
{
    uint8 indexU8 = 1u;
    char8 current = *string;

    /* Until null is reached, print next character */
    while((char8) '\0' != current)
    {
        LCD_WriteData((uint8)current);
        current = string[indexU8];
        indexU8++;
        CyDelay(1) ; // 31-Jan-2024
    }
}

 

 

 

 

 

  

View solution in original post

0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Seeing your schematics, I could not find a good reason for your issue.

So I wrote a simple test program for CY8CKIT-059.

I assigned the LCD pins to P2[6:0], which may not be a good practice

as P2[1] is connected to a LED1 and P2[2] is connected to SW1.

This causes some data corruption(s) time to time. (Note.1)

 

Well returning to the topic, my program worked like below

IMG_5849.JPG

So far, so good?

Then I swapped P2[3:0] -> P2[0:3], reversed the signal order of DB4, DB5, DB6, DB7,

to DB7, DB6, DB5, DB4, and I got

IMG_5848.JPG

So, one candidate of possible cause of your problem may be wrong connection(s) of DB4~DB7 with P2[0:3].

moto

(Note.1)

This morning I found that if I modify LCD_PrintString() in LDC.c (filename varies depending on your LCD name) as below, as far as I have been testing, no data corruption(s) happened.

void LCD_PrintString(char8 const string[]) 
{
    uint8 indexU8 = 1u;
    char8 current = *string;

    /* Until null is reached, print next character */
    while((char8) '\0' != current)
    {
        LCD_WriteData((uint8)current);
        current = string[indexU8];
        indexU8++;
        CyDelay(1) ; // 31-Jan-2024
    }
}

 

 

 

 

 

  

0 Likes