Difference: SharpMIP (1 vs. 5)

Revision 52022-08-15 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 104 to 104
 

Adafruit SHARP Memory Display Breakout 1.3" 168x144

Changed:
<
<
Adafruit #3502
>
>
Adafruit #3502. Schematics
  lcds___displays_1393disp7_LRG.jpg

Revision 42022-08-02 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Changed:
<
<
title="Memory-in-Pixel Display"
>
>
title="Memory-in-Pixel Display MIP"
  titlestyle="color:#F00000;" }%
Intro

Revision 32022-05-15 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 100 to 100
 
Added:
>
>
D9 for CS.
 

Adafruit SHARP Memory Display Breakout 1.3" 168x144

Adafruit #3502

Revision 22022-05-14 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 18 to 18
 
Changed:
<
<

MIP and I2C Words

>
>

MIP Words

  mip-emit works like the standard word emit. It blocks the calling thread, as long as the character is not written to the MIP display. Horizontal (x) position is in pixel (0 to 167/399), vertical position (y) is in lines (0 to 17/29), a line consists of 8 pixels. Larger fonts takes more than one line.

Revision 12022-05-13 - PeterSchmid

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="WebHome"
Memory-in-Pixel Display
Intro
This new type of LCD has the ultra-low power usage of eInk and the fast-refresh rates of an LCD. Viewable in any light, from edge-of-vision to bright sunlight. Wide, symmetrical viewing angles, typically 120° ×120°.

Driver mip.c, fonts from https://www.mikrocontroller.net/topic/54860.

Code page 850

Code page 850, 9x14

MIP and I2C Words

mip-emit works like the standard word emit. It blocks the calling thread, as long as the character is not written to the MIP display. Horizontal (x) position is in pixel (0 to 167/399), vertical position (y) is in lines (0 to 17/29), a line consists of 8 pixels. Larger fonts takes more than one line.

mip-emit     ( Char -- )        Emits a character (writes a character to the MIP display)
mip-emit?    ( -- Flag )        MIP ready to get a character (SPI not busy)

hook-emit    ( -- a-addr )      Hooks for redirecting terminal IO on the fly
hook-emit?   ( -- a-addr )    

mippos!      ( x y -- )         Set MIP cursor position, 
                                x horizontal position, for 6x8 font max. (168 / 6) -1, depends on the font's x size 
                                y vertical position (a line consists of 8 pixels), max. 17 for 168x144 or 29 for 400x240 displays.
mippos@      (  -- x y )        Get the current MIP cursor position
mipclr       (  --  )           Clears the OLED display, sets the cursor to 0, 0
mipfont      ( u --  )          Select the font, u: 0 6x8, 1 8x8, 2 8X16 , 3 12X16

>mip         ( -- addr1 addr2 ) redirect to MIP
>term        ( addr1 addr2 -- ) terminate redirection

Usage

It is easy to redirect the terminal output to the MIP display, to use the string formatting words.

: mip-hallo (  -- )
  hook-emit @              \ save emit hook
  ['] mip-emit hook-emit !  \  redirect terminal to mip-emit
  ." Hallo Velo! " cr
  ." ciao"
  hook-emit !         \ restore old hook
;

or even simpler

: mip-hallo (  -- )
  >mip         \ redirect terminal to mip-emit
  ." Hallo Velo! " cr
  ." ciao"
  >term         \ terminate redirection
;

or on a command line

>mip .( Hallo Velo!) >term

show date and time on MIP (see CmsisRtos#How_to_use_Tasks for a background task).

: clock (  -- )
  mipclr
  3 mipfont
  -1 -1 -1 alarm!  \ set an alarm every second
  begin
    wait-alarm     \ wait a second
    0 0 mippos!
    >mip .time >term
  key? until
  key drop
;

-- Peter Schmid - 2022-05-13

Creative Commons License
This work by Peter Schmid is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback