12/11/2023 0 Comments Spi arduino code![]() That way it could at least work with the existing hd44780 library. ![]() If it were me, I'd look closely at the LCD PCB and see if the IF0 and IF1 pins on the RW1063 chip can be located to re-strap it for i2c mode. ![]() It is the serial mode that is funky for this device. In 4/8 bit mode it works just like a typical hd44780 and can work with the IDE supplied LiquidCrystal library or any library that supports talking to an hd44780 display using direct pin control including the hd44780 library hd44780_pinIO i/o class.įor i2c mode, it resembles a PCF2119x, PCF2116 and the hd44780 library hd44780_I2Clcd i/o class can control it over the i2c bus. There might be one, I'm just not aware of one. My library doesn't support it and I've not yet seen a library does does. I wouldn't say I can't provide support for in the hd44780 library but as of today there is not support for the serial psuedo SPI mode for this device.ĭoes the display actually use or resemble the HD44780 in any way? So the long and short of this is that you do not/ can not provide library support for it and the OP is essentially "up the creek without an oar"? I guess technically you might be able to use it if the default power up mode was what you needed, set the RS level to send characters and you always sent 80 characters to fully load DDRAM each time you wanted to update the display. The LCD is unusable if you can't send both commands and characters. If you don't dynamically control RS then you would only be able to send commands or only data depending on which constant level you set it to. This LCD needs another signal outside of the SPI bus data stream (outside the SPI spec) to control it since the h/w interface is not really SPI but just a serial byte latch.Īnd for sure you will have to properly set the RS signal prior to sending data to the LCD since you must tell the LCD whether the serial data being transferred is a character write or a command write. The real spec uses 4 pins (SCK, MOSI, MISO, SS or CS)įor an output only device you can limit that to 3 pins CS, SCK, MOSI On a REAL SPI slave device you can fully control the slave device using nothing but the SPI bus data stream. ![]() I've been saying that if you are having to use additional signals outside of the SPI data stream, to control the device, the device is not really using SPI - it may be similar to SPI by using similar cs, data, clk signals but it is not SPI. The RS signal is not a control signal for the SPI interface, but for the LCD controller itself.įor this LCD device, the RS signal must be used to tell the LCD if the data byte being sent is a data/character write or an instruction/command. Given I've never seen an LCD that uses this type of "SPI" interface, I'm guessing that it isn't very common. It wouldn't be that big of deal to write an i/o class for it for my hd4780 library that supports this screwy "SPI" mode but I don't have one of those "SPI" LCD devices to test it. If I had that LCD, I would look very closely at it to see if I could restrap it to run i2c mode instead. Not to say one doesn't exist but I've never seen one. I've not ever seen a library that works with this type of interface. For an hd44780 type interface it would be the control signals like RS as well as the LCD data bits. Normally when you have a real SPI interface you clock the data bits in and the data stream includes everything you need to control the LCD. This is pretty screwy and I've never seen a LCD interface that works this way before. The RS pin must also be used in this mode. The "SPI" interface simply transfers 8 bit data bytes. You must also use the RS pin (pin 5) to select between character writes and commands. The biggest issue is that you can't control the LCD using only the data and clock pins. If is strapped for SPI, I think you may be out of luck.Īnd while the interface is kind of sort of SPI like it it isn't actually SPI. If it is strapped for I2C you can use the hd44780 library with the hd44780_I2Clcd i/o class If it strapped for 4/8 bit mode you can use the LiquidCrystal library. Once you know the mode and how the hd44780 instructions are encoded it is possible to see if there are any libraries already written that support it. Then, if it is strapped for i2c or SPI mode, you will to know how to encode the bytes across the interface bus to control the hd44780 signals and send instructions to control the the LCD.Īll this should be in a full datasheet or you can get it from a RW1063 datasheet. You need to know which mode it is configured for. That controller can be strapped to run 3 different modes:įirst you need an accurate datasheet for the display you actually have. Just knowing that it is a RW1063 isn't enough. Apparently, RW1063 controller is used in this display.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |