ahmedragia21
Member
I'm trying to capture the data using stm32, I have used two latches as the following diagram
and this is the schematic of the bus for your reference
I'm not getting any LCD commands that was referenced in the answer, I only get two LCD Commands 0x60, and CS1,CS2 = 1, A1 = 0 or 1, and they are always like that. I'm not sure how to debug that, I need some ways to debug that issue.
Latches are LS374
Here is my coding part:
// Control logic for LCD1 and LCD2
if ((!CS1) && (!A1)) {
LCD1_write_cmd(data_bits);
}
if ((!CS1) && (A1)) {
LCD1_write_dat(data_bits);
}
if ((!CS2) && (!A1)) {
LCD2_write_cmd(data_bits);
}
if ((!CS2) && (A1)) {
LCD2_write_dat(data_bits);
}
}[/CODE]
and this is the schematic of the bus for your reference
I'm not getting any LCD commands that was referenced in the answer, I only get two LCD Commands 0x60, and CS1,CS2 = 1, A1 = 0 or 1, and they are always like that. I'm not sure how to debug that, I need some ways to debug that issue.
Latches are LS374
Here is my coding part:
Code:
void processData(uint32_t buffer) {
// Extracting control signals
uint32_t data_word = buffer;
int16_t A1 = (data_word >> 0) & 0x01; // PD0
int16_t CS1 = (data_word >> 1) & 0x01; // PD1
int16_t CS2 = (data_word >> 2) & 0x01; // PD2
// Extracting data bits
uint8_t data_bits = (data_word >> 3) & 0xFF; // PD3 to PD10
if ((!CS1) && (!A1)) {
LCD1_write_cmd(data_bits);
}
if ((!CS1) && (A1)) {
LCD1_write_dat(data_bits);
}
if ((!CS2) && (!A1)) {
LCD2_write_cmd(data_bits);
}
if ((!CS2) && (A1)) {
LCD2_write_dat(data_bits);
}
}[/CODE]