Optimized library for Adafruit Sharp Memory Display 3502

Status
Not open for further replies.

alpage

Member
I'm using this display on a Teensy 3.5 running a modified GRBL. I want to update the positions of the x,y and z axes frequently but don't want to bog down the main loop transferring entire frames to the display. So what I did was modify the code (based on https://github.com/johnschnurr/Sharp_Mono_LCD) so the main update call copies the frame to a separate double buffer and sets a flag. Then an interval timer running 24 times a second checks the flag. If set it initiates a DMA transfer to the memory display and clears the flag. At the end of the DMA transfer it toggles the SS pin to resting state.

Several functions in the code were tweaked for better performance. I also added hardware toggling of the VCOM pin which is required by this type of display. I use low frequency PWM for this.

Code can be found at https://github.com/alpage-ca/Sharp_LCD_DMA
 
Status
Not open for further replies.
Back
Top