User Tools

Site Tools


dictionary:4-bit_mode
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


dictionary:4-bit_mode [2007/11/17 17:18] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +Since version mios_v1_5b [[http://www.ucapps.de/mios.html|MIOS]] has supported 4-bit mode for HD44780 compatible displays\\
  
 +Usually this mode isn't needed, but some displays have been internally configured for 4-bit operation and don't have all the necessary connections for full 8-bit operation or You might have some other reason to try this mode out.
 +
 +To configure [[http://www.ucapps.de/mios.html|MIOS]] application to use 4-bit CLCD mode, changes need to be made to the application:\\
 +
 +First locate\\ **'USER_Init'** section of the source files ((usually in 'main.asm', in MB_SID 'sid_init.inc'))
 +
 +Then add to its own section just below the 'USER_Init' ((Don't add it in between the initialization commands or you can break something this way)):
 +
 + 
 +       ;; use a CLCD, E input of first CLCD at D.7, E of second CLCD @C.4
 +       ;; using the 4-bit interface:
 +       ;; -> connect MBHP_CORE:J15:D7-D4 of the core module to D7-D4 of the LCD
 +       ;; -> left MBHP_CORE:J15:D3-D0 of the core module open!
 +       ;; -> tie D3-D0 of the LCD to ground
 +       movlw   0x37 | 0x80     ; E1: D.7, 4bit interface
 +       movwf   MIOS_PARAMETER1
 +       movlw   0x24 | 0x80     ; E2: C.4, 4bit interface
 +       movwf   MIOS_PARAMETER2
 +       movlw   0x00            ; LCD type 0
 +       call    MIOS_LCD_TypeSet''
 +
 +Then you have to Compile the modified application.
 +
 +See the comments ((marked with ;; in the beginning of the line)) in the code for how to connect the display to the core. In the display side, having the datasheet for it helps a lot.
 +
 +More: [[http://www.ucapps.de/mios_fun.html#MIOS_LCD_TypeSet|MIOS function reference]]
dictionary/4-bit_mode.txt · Last modified: 2007/11/17 17:18 by 127.0.0.1