Close

LCD support

A project log for Monoprice Mini Marlin 2.0 Support

Getting Marlin to run on the Monoprice Mini/Malyan M200.

jc-nelsonJ.C. Nelson 07/26/2018 at 18:120 Comments

The LCD on the MP Mini, as noted in other logs, is a completely separate MCU, an ESP8266, running at the inexplicable speed of 500000 baud on USART2. the next step was to figure out how the LCD communicated with the microcontroller. 

To do this, I needed to build more test hardware.

The first was simple - a level shifter (3.3v to 5v) that let me hook up the main board to my computer and use a serial monitor to interact with Malyan's stock firmware.

The second was more complex - I needed to power the LCD + run a level shifter so I could hook the LCD to the computer and interact with it via a  serial monitor.

Now I was in business.

With some research on Malyan's wiki, I determined the majority of the functionality, but much of it was done by clicking something on the LCD and seeing what it emitted, then passing it to the main board and seeing how the board responded.

This left me with a large document of what I thought should happen given a particular response. To be honest, at this point, I entered a phase where I'd look at it and think "It works well enough for me."

One cold afternoon, however, I hit a patch of ice while ridding my scooter home from work, and wound up sliding clean into the curb. My jacket took the worst of it, but I was banged up, bruised, on minor pain meds, and with nothing to do.

I sat and the computer and opened a new source file called "malyanlcd.cpp" and began to hack.

Within a few days I'd implemented enough code to say I had malyan LCD support functioning. The first iteration did everything through injecting GCODE commands. Later I'd change that to manipulate the heater values directly, because if a file contained a [wait] variant of a temperature command and you tried to adjust it via the LCD, the injected temperature command wouldn't run until the first command completed.

The print completion screen still doesn't show the right time, but the LCD is mostly functional.

(Note if you're following along, this code is already in Marlin 2.0), I'm writing this up retroactively.

Discussions