/* --------------------------------------------------------------------------- ** This software is in the public domain, furnished "as is", without technical ** support, and with no warranty, express or implied, as to its usefulness for ** any purpose. ** ** ioisr.c ** ** Beschrijving: BigAVR LCD module ** Target: AVR mcu ** Build: avr-gcc -std=c99 -Wall -O3 -mmcu=atmega128 -D F_CPU=8000000UL -c lcd.c ** avr-gcc -g -mmcu=atmega128 -o lcd.elf lcd.o ** avr-objcopy -O ihex lcd.elf lcd.hex ** or type 'make' ** Author: dkroeske@gmail.com ** -------------------------------------------------------------------------*/ #define F_CPU 8e6 #include #include #include #define LCD_E 6 // RA6 UNI-6 #define LCD_RS 4 // RA4 UNI-6 void lcd_strobe_lcd_e(void); void init_4bits_mode(void); void lcd_write_string(char *str); void lcd_write_data(unsigned char byte); void lcd_write_cmd(unsigned char byte); void lcd_clear(void); /****************************************************************** short: Busy wait number of millisecs inputs: int ms (Number of millisecs to busy wait) outputs: notes: Busy wait, not very accurate. Make sure (external) clock value is set. This is used by _delay_ms inside util/delay.h Version : DMK, Initial code *******************************************************************/ void wait( int ms ) { for (int i=0; i