// mixed 8 bit LCD interface for ECE-3411 // By Marten van Dijk, Jan 2014: // Derived from (1) Prof. Sung-Yuel Park's ECE-3411 lectures, and (2): // File Name : 'lcd_lib.c' // Title : 8 and 4 bit LCd interface // Author : Scienceprog.com - Copyright (C) 2007 // Created : 2007-03-29 // Revised : 2007-08-08 // Version : 1.0 // Target MCU : Atmel AVR series // // This code is distributed under the GNU Public License // which can be found at http://www.gnu.org/licenses/gpl.txt #include "lcd_lib.h" #include #include #include #include void LDCPortConfig(void) { // LDC port configuration for the MCU DATA_PORT_DDR |= 0x0f; // set DATA_PORT[3:0] as output (4-bit mode) //CTRL_PORT_DDR |= ((1<> 4); //give the higher half of cm to DATA_PORT CTRL_PORT &= ~(1<> 4); //give the higher half of cm to DATA_PORT CTRL_PORT &= ~(1<> 4); //give the higher half of cm to DATA_PORT CTRL_PORT |= (1<