Post B6GUiQArCkDSHLUICG by cato@chaosfurs.social
 (DIR) More posts by cato@chaosfurs.social
 (DIR) Post #B6GUiPTForL0675TEW by cato@chaosfurs.social
       0 likes, 0 repeats
       
       RE: https://chaosfurs.social/@cato/116563857284574318Time to dust off this thread! I have now - motivated by a looming deadline, because I promised this display for an event this weekend - managed to make a custom control board and integrate it into my existing software framework!RT: https://chaosfurs.social/users/cato/statuses/116563857284574318
       
 (DIR) Post #B6GUiPeb8gPafIOWum by cato@chaosfurs.social
       0 likes, 0 repeats
       
       There it is! It can control all 8 rows of LCDs and the alternating indicators that are left of each line of text.
       
 (DIR) Post #B6GUiPn6d3DX5gNKAy by cato@chaosfurs.social
       0 likes, 0 repeats
       
       I added a "line flags" feature to my software - basically a uint8_t with up to 8 flag bits per line of text that can be used for the indicators or whatever else a display might hold in the future. My web frontend automatically renders these as checkboxes based on the display configuration.
       
 (DIR) Post #B6GUiPz9uErHh40wxk by cato@chaosfurs.social
       0 likes, 0 repeats
       
       Since this display is using mosaic segmented LCDs, creating the font data would be a huge pain in the butt to do by just writing down raw bytes. So I made a quick and dirty little tool by tracing a photo of the LCD layout in Inkscape, using this in a HTML file with some JavaScript to make it interactive and having that spit out the correct bytes for the drawn character.
       
 (DIR) Post #B6GUiQArCkDSHLUICG by cato@chaosfurs.social
       0 likes, 0 repeats
       
       Fun fact! This thing is using 60 bits per character. No, it doesn't use any padding in between. I had to do some annoying bit shifting to get a nice data stream.
       
 (DIR) Post #B6GUiQKQd9s8l1xw7E by cato@chaosfurs.social
       0 likes, 0 repeats
       
       Font done, bootup shows the hostname and IP (as much as fits on a single module at least). Exactly as it should be!
       
 (DIR) Post #B6GUiQVPyIf9J76iFE by cato@chaosfurs.social
       0 likes, 0 repeats
       
       The alternating blinker control also works!
       
 (DIR) Post #B6GUiQdvSfT5jV5VVQ by cato@chaosfurs.social
       0 likes, 0 repeats
       
       Aaaand I'm in integration hell :neofox_woozy:
       
 (DIR) Post #B6GUiQpGmUXgIgOZBg by cato@chaosfurs.social
       0 likes, 0 repeats
       
       There seems to be some sort of problem once more than 4 LCD buses are plugged in. But measuring the shared signal lines, the signal levels and edges as well as the power rails look totally fine, so it's not just the driver being too weak...?It fails in a repeatable, consistent way too, so random glitches seem very unlikely.Even at a comically slow 5 kHz clock it still fails.But enough for today, I really need to sleep :neofox_flop_sleep:
       
 (DIR) Post #B6GUiR0y4ztqsxruQC by cato@chaosfurs.social
       0 likes, 0 repeats
       
       New insights: It must be a signal integrity issue where the LCDs can't get the data quite right. See this capture. Red is clock, blue is data input, brown is data output, green is latch (irrelevant here). I am sending the same data across the whole display so even thouth the output lags behind 10 characters (600 bits), it SHOULD be the same pattern. Every group of HIGH bits is shortened by one bit.
       
 (DIR) Post #B6GUiREnFaxVZqKwyG by cato@chaosfurs.social
       0 likes, 0 repeats
       
       pretty sure the clock (red) shouldn't have hiccups like this
       
 (DIR) Post #B6GUiRKotBmNsX9lMe by cato@chaosfurs.social
       0 likes, 0 repeats
       
       (also yay, finally managed to get my PicoScope to work in Linux. One less reason to boot up the old Windows install)
       
 (DIR) Post #B6GUiRNeie321KU1mi by cato@chaosfurs.social
       0 likes, 0 repeats
       
       let's play around with some series termination
       
 (DIR) Post #B6GUiRf1g3wUtCbtrM by cato@chaosfurs.social
       0 likes, 0 repeats
       
       330R on both data and clock - data is acceptable, but clock is way too weak. It still registers though! Still showing garbage anyway. But now the data out doesn't keep losing bits :DGonna try 100R on clock and leave it at 330R for data.
       
 (DIR) Post #B6GUiRqMzt15SNuxXc by cato@chaosfurs.social
       0 likes, 0 repeats
       
       I extended my font generator thingy to allow the reverse operation, i.e. entering bytes and showing what they would look like on the LCD. I then added a function to shift the data bit by bit, and tried it with the character I am trying to send (5), and of course - one left shift and I get exactly the garbled characters I am seeing on the display. So that is what's happening. Somehow there is a single bit shift in all of the data
       
 (DIR) Post #B6GUiS0eNfEvyGjAZ6 by cato@chaosfurs.social
       0 likes, 0 repeats
       
       I did confirm with the oscilloscope that what the LCD is receiving is valid data now and that the data matches what it should be. So the bit shift must have occurred outside of the timeframe I sampled with the scope
       
 (DIR) Post #B6GUiSDlatjQcwre0e by cato@chaosfurs.social
       0 likes, 0 repeats
       
       i.i switched the clock phase (SPI mode 1 instead of 0)and it worksi can't
       
 (DIR) Post #B6GUiSLv6aFn2Eg9ia by cato@chaosfurs.social
       0 likes, 0 repeats
       
       why?? I tested with Arduino's shiftOut weeks ago and it worked?? Isn't shiftOut also mode 0?
       
 (DIR) Post #B6GUiSXyNltXdcJmVM by cato@chaosfurs.social
       0 likes, 1 repeats
       
       :neofox_owo: