Logic Level shifter for 12864 display on Duet 2 Wifi
-
@oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:
Also, some confusion: In your photo you are connecting to the CONN_SD port, not to the CONN_LCD one. Or am I looking at things wrong?
@bearer said in Logic Level shifter for 12864 display on Duet 2 Wifi:
edit: i would propose swapping lcd_cs to from PortDPin(21) / lcdconn.10 to PortAPin(7) / sdconn.7 as it would enable a single 10 way ribbon cable to function as just a display + sd reader (but no buttons/beep). Or maybe utxd0, urxd0 and spi0_cs could be used if the reader isn't present or needed.
true story. the SPI bus is on CONN_SD
-
@oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:
I am currently trying to understand your tsx cabling -- my 74hct08 started smelling funny
the only difference is the swapping of the LCD_CS pin as it allowed me to use just the one port and also cleaned up the board layout a little. i could probably get below 3 vias if I really put some more effort into it, but with the prices jlcpcb have these days meh.
funny smelling wouldn't be caused by swapping the signal pins they don't have the oompfh to do so. i'd check the 5v and gnd connections.
-
It might be a mistake on my board. My guess is I can try to get it to work like your setup, and then move to my board or the updated design later.
I think the distribution of pins to headers is just what a standard 12864 display has, and not dc42's design. I'd suggest sticking with the standard setup.
Don't you need both headers still if you also want to use the encoder wheel? I'd question the utility of the 12864 display without one ... but I might be completely wrong. Speaking of the encoder, do I interpret your color scheme correctly that ENC_A, ENC_B, ENC_SW do not go through the level shifter but connect directly?
-
@oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:
Don't you need both headers still if you also want to use the encoder wheel?
i find my self looking at the screen in passing more than using them for operation, but yes.
@oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:
do I interpret your color scheme correctly that ENC_A, ENC_B, ENC_SW do not go through the level shifter but connect directly?
when i looked at he reprap discount display schematic, the encoder is wired directly to the headers and its effectively three normally open(?) switches to ground so it only needs the pull up on the duet, no level shifting. so yes.
-
@oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:
I think the distribution of pins to headers is just what a standard 12864 display has, and not dc42's design.
Correct, the pinout is taken from the original RepRapDiscount design and is compatible with the many clones of that display that you can find on Amazon and eBay. Unfortunately, some printer/display manufacturers got the connectors the wrong way round, and others went for a different pinout completely.
-
@dc42 as I am currently experiencing with my CR 20 "minipanel". Reading Marlin source code I am 90% sure it is an ST7920, but for some reason it needs 8MHz instead of 2 (or at least the refresh rate in Marlin is set to 125nsec), and I think some pins are different. I am still digging (-:
-
@oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:
it needs 8MHz instead of 2
should be possible to do with F8000000 to the M918 command
for the pinout you could look at reprap http://reprap.org/mediawiki/images/5/51/RRD_FULL_GRAPHIC_SMART_CONTROLER_SCHEMATIC.pdf and work backwards from the 3 pins on the lcd and the pins on the encoder (to map the cr 20 header)?
-
Thanks for pointing out the F parameter! I will use the default pin layout if only to avoid future hassle when a ready-made adapter is available and people use this that aren't up to making their own custom cable (especially considering I have enough trouble doing it myself).
A new reprap smart controller is on the way so I can test with a device that's known good ... I will test first on an unmodified maestro running RRF 2.05.
-
@oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:
I will use the default pin layout
not sure which is the default? afaik beyond the reprap one its a bit of a lottery, and ramps have had a range of adapters for the various clones (why they couldn't just clone the reprap idk)
if you're refering to the change i made, it's only between the duet and the 74htc08 so it won't affect the display as such. (but it will simplify troubleshooting as you only need to get 1 cable right to get the display to indicate its working)
-
The reprap one works for my favorite replacement display BTT TFT24/35 in 12864 emulation mode) (-: but you're right it -- doesn't matter for the the display side.
-
@bearer by the way, there is a 3.3v source on CONN_SD as well (Pin #8), so no need to head over to the z probe for that.
-
yeah, noticed when i finished up the wirng, but now i finally need to get on with setting up rrf3
-
@oliof I'm pretty sure the CR-20 minipanel is based on the ST7565. The first clue was that I haven't been able to find any display modules of that (small) size with an ST7920 on it, they all come equipped with a ST7565. Also, I put a logic analyzer on the display pins of the Creality mainboard, and I'm seeing A0 being actively used as data/command line (4-wire SPI) and the decoded commands correspond to the ST7565 datasheet. Here's a screenshot from a saved capture:
Edit: improved wording.
-
@Schmart fyi oliof is "gone fishing" for a bit; https://forum.duet3d.com/topic/15792/taking-a-break
-
@bearer Thanks for the heads-up! Then please consider my message as general information for the forum
-
Just a little peek to report that I got it almost working with a cloned RepRap Smart Graphics Controller with very low SPI speed (100kHz) and somewhat malfunctioning buttons (stray button presses registered) using a txs0108 -- most likely due to shoddy cabling work.
@Schmart thanks for the headsup. That's a bummer as I lack the time and skill to implement full ST7565 support.
-
After a bit more research I discovered that the mini 12864 displays that use the ST7567 chip should already be 3.3V-compatible. That includes this one https://github.com/FYSETC/Mini-12864-Panel and clones, including the Viki 2 and MKS Mini I think. These displays need one more pin that the ST7920-based displays and a modification (probably small) to the driver, but that shouldn't be difficult.
What's stopping me adding this support to the Duet WiFi/Ethernet firmware as standard is that there isn't enough room in flash memory. Recent improvements in RRF 3.01RC and switching to a more recent C++ compiler and library have increased the binary size to 493kb, leaving just 19kb free against 24kb needed.
-
ISTR that extra pin is for digital contrast control (the smart full graphics controller has a potentiometer for that) so it might need another option for M918 to set contrast ... likely adding some more memory requirements.
But as long as there's no space in RAM that's likely moot anyways.
-
@oliof said in Logic Level shifter for 12864 display on Duet 2 Wifi:
ISTR that extra pin is for digital contrast control (the smart full graphics controller has a potentiometer for that) so it might need another option for M918 to set contrast ... likely adding some more memory requirements.
It's not for contrast control, it's just that the ST7567 controller chip needs a command/data input pin as well as data, clock and CS.
-
Today I learned.
That said, I'd be willing to carry a patch removing unnecessary kinematics for an unofficial unsupported build with ST7567 support to make space -- I already know how to do that. I should be able to keep the patch going in case it needs changes ...@dc42 I want to thank you a lot for even putting forward the consideration of including it; I also understand other features would be prioritized indefinitely.