For Hitachi HD44780 and compatible LCD controllers. This code was modified for a 4 bit interface based on the LCD code from the book Embedded Systems Building Blocks. A 4 bit interface only uses 4 data lines to control the LCD controller, with slightly more complex programming.
You should modify your ucos-ii cfg.h file to contain the following:
/*
*********************************************************************************************************
* LCD DISPLAY MODULE DRIVER CONFIGURATION CONSTANTS
* (Chapter 5)
*********************************************************************************************************
*/
#if MODULE_LCD
#define DISP_DLY_CNTS 100 /* Number of iterations to delay for 40 uS (software loop) */
#define DISP_PORT_CMD 0x104 /* Address of the Control Word (82C55) to control RS & E */
#define DISP_PORT_DATA 0x104 /* Port address of the DATA port of the LCD module */
#define DISP_MODE_BITS 4 /* Number of bits that Hitachi LCD is operating with, either 4 or 8 */
#endif
The cfg.c must must also be modified, see the sample cfg.c provided in the zip file. You want all the code within the MODULE_LCD define. Again the code assumes a Tern TD86 board, but should work with others with minimal effort.
esbblcd.zip After unzipping place the files in the \Software\Blocks\LCD\Source directory (make backups).
...develop, race, win!