K26, LCD, FlexBus and 8080 Mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K26, LCD, FlexBus and 8080 Mode

1,821 Views
weblar
Contributor V

Having had several LCD displays working successfully in 6800 mode, I've now working with a display which only has an 8080 interface. I know that the flexbus is more sympathetic towards 6800 mode but would this be considered the correct mapping for 8080:

LCD_CS# = GPIO

LCD_RST# = GPIO

LCD_D[0..15] = FLEXBUS_AD[0..15]

LCD_DC# = FLEXBUS_AD16

LCD_WR# = FLEXBUS_CS0#

LCD_RD# = FLEXBUS_CS1#

// Configure flexbus CS0 for writing

FLEXBUS[0].CSAR = 0x60000000;

// Configure for 16bit multiplexed mode where the 16bit data is driven on lower 16 bits and address is on upper 16 bits

FLEXBUS[0].CSCR = 16bit port size | auto-ack | byte-shift;

// Base address mask allows up to 0x60001FFFF so that we can present the DC# on bit 16

FLEXBUS[0].CSMR = BAM(1) | VALID;

// Configure flexbus CS1 for reading

FLEXBUS[1].CSAR = 0x70000000;

// Configure for 16bit multiplexed mode where the 16bit data is driven on lower 16 bits and address is on upper 16 bits

FLEXBUS[1].CSCR = 16bit port size | auto-ack | byte-shift;

// Base address mask allows up to 0x70001FFFF so that we can present the DC# on bit 16

FLEXBUS[1].CSMR = BAM(1) | VALID;

The reason behind mapping the LCD_RS to the FLEXBUS_AD16 signal is quite simple:

// Write data to the LCD display

void writeData(uint8_t data) {

    LCD_CS = LOW;

    *(uint16_t *)(0x60010000) = data;

    LCD_CS = HIGH;

}

// Write command to the LCD

void writeCommand(uint8_t command) {

    LCD_CS = LOW;

    *(uint16_t *)(0x60000000) = command;

    LCD_CS = HIGH;

}

Where the 16th bit is driven as an an address rather than data (because of the multiplexed mode) and thus is either clear during a command transaction or set during a data transaction.

Does this make sense to anyone? Could anyone offer any advice as to whether this is the correct mapping?

Thanks in advance

Tags (4)
0 Kudos
6 Replies

1,386 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Weblar,

I have downloaded the LCD controller data sheet.

I think it is okay to connect the LCD controller with the K26 in 8080 mode, but it seems that your connection has issue. If I were you, I would connect as following:

LCD controller signals                                 FlexBus signals

Reset                                                            GPIO

CS#                                                               CSx of FlexBus

D/C#                                                              GPIO

RD#                                                                FB_OE

WR#                                                               FB_RW

D[23:0]                                                            FB_D[23:0]

With software, when you access data, set the D/C# pin, when you access command, clear D/C# pin, I see that you use address pin16 to identify the command or data by address space in firmware.

The main concern i have is the timing, for LCD controller in 8080 mode, the low tenure /CS is the shorter than that of /RD or /WR, pls refer to section Figure 13-3: 8080 Mode Timing Diagram in data sheet of LCD controller.

but /Rd and /WR is the shorter for Flexbus. You can have a try to check if the data can be accessed by connecting the FlexBus signals with LCD controller via float cables.

Hope it can help you.

BR

Xiangjun Rong

0 Kudos

1,386 Views
weblar
Contributor V

Thank you for your response. I understand your suggestions.

I will give this a try on a test board which I have.

0 Kudos

1,386 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Marcin,

I have some problem when I use synchronization mode by connecting only the bit/frame to SAI receiver, the bit/frame signals are from external, I am debugging the code, sorry for the delay.

BR

Xiangjun Rong

0 Kudos

1,386 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Weblar,

I think the timing of FlexBus is compatible with 8086 mode, can you tell us the part number of the LCD  so that we can have a review for  the timing?

BR

Xiangjun Rong

0 Kudos

1,386 Views
weblar
Contributor V

Hi,

Thank you for your reply.

The LCD controller I'm working with is an SSD1963. Here is the datasheet:

http://www.allshore.com/pdf/solomon_systech_ssd1963.pdf 

Kind regards,

Kevin

0 Kudos

1,386 Views
weblar
Contributor V

Anyone able to pass on any advice from previous experiences?

0 Kudos