Regards, Dana.CLOCK SYNCHRONIZATION AND HANDSHAKING
Slave devices that need some time to process received byte or are not ready yet to send the next byte, can pull the clock low to signal to the master that it should wait. Once the clock is released the master can proceed with the next byte.
You sure about no pullup on clk ?
From I2C specification -
Regards, Dana.
Read Data -Read Busy Flag and AddressRead busy flag and address reads the busy flag (BF) indicating that the system is now internally operating
on a previously received instruction. If BF is 1, the internal operation is in progress. The next instruction
will not be accepted until BF is reset to 0. Check the BF status before the next write operation. At the same
time, the value of the address counter in binary AAAAAAA is read out. This address counter is used by
both CG and DDRAM addresses, and its value is determined by the previous instruction. The address
contents are the same as for instructions set CGRAM address and set DDRAM address.
I am not I2C expert, I have to constantly go to website to read about the protocol.Read Data from CG or DDRAMRead data from CG or DDRAM reads 8-bit binary data DDDDDDDD from CG or DDRAM.
The previous designation determines whether CG or DDRAM is to be read. Before entering this read
instruction, either CGRAM or DDRAM address set instruction must be executed. If not executed, the first
read data will be invalid. When serially executing read instructions, the next address data is normally read
from the second read. The address set instructions need not be executed just before this read instruction
when shifting the cursor by the cursor shift instruction (when reading out DDRAM). The operation of the
cursor shift instruction is the same as the set DDRAM address instruction.
The part is supposed to be 44780 Hitachi/Renesas compatible, which definitely
has read capability.
https://www.sparkfun.com/datasheets/LCD/HD44780.pdf
Busy flag -
Yes - you are right. I have used the parallel lcds based on the HD 44780 a lot, since the mid 1980s in fact, and this device ST032 is clearly based on the old chip - all of the commands, memory layout, etc are identical. It seems like a 44780 with an i2c interface bolted on. But my present interpretation of the data sheet is that you cannot read from the serial device as implemented in this case. Coming to this from the parallel lcd, I pondered exactly the point you are making, and worried over the meaning of 'Ack is not busy flag in i2c interface', thinking that this phrase is a warning that the busy flag must be read by extracting the HD 44780 status register and checking the 'busy' bit in the old way. But the data sheet as a whole makes much more sense if you understand the phrase to mean that you cannot read via the i2c interface and that ACK-low functions as NOTBUSY. Here, for example is part of a sample program which came with the device; the documentation suggests no other way for checking the busy flag -
/*******************************************************************************
*
Function Name : Check_Ack
* Description : Check acknowledge.
* Input : n
* Output : None
* Return : None
/
void Check_Ack(void)//Ó¦´ðλ
{
unsigned char ack=1;
SDA=1;
SCL=1;
_nop_();
_nop_();
_nop_();
while(ack==1){ack=SDA;};
_nop_();
SCL=0;
return;
}
/*******************************************************************************
I do not recognise this programming language, but it seems clear that the function waits in a loop until ACK goes low - just as I have written my own getack routine. I have appended the complete data sheet in case you fancy studying it. Also the demo code
I am not I2C expert, I have to constantly go to website to read about the protocol.
Its a pain.
Regards, Dana.
If you do not have scope or analyzer buss decode test equipment
here is a low cost USB analyzer that works great -
https://www.ebay.com/itm/USB-Logic-...270582?hash=item25f26191f6:g:Xs4AAOSwQ7haxEa1
Uses this software -
https://www.saleae.com/downloads/
Regards, Dana.
Don't know if your LCD is bricked or not, but the comparison pic is not a good indication in my opinion. Your top LCD is a COG (chip on glass) and is not going to look like the older LCD, especially before proper initialization.Hey Dana - thank you for discussing this with me. My latest thinking is that the module is damaged, so I have ordered a replacement. I feel that this evidence (attached pic) is relevant. The top pic is what my serial module looks like, while the bottom pic is what I have become accustomed to seeing when an HD 44780 parallel module is powered-up, but not programmed (i.e. the default power-up condition). The top pic does not look right at all, and given the similarities we have been discussing, I feel it must mean something.