2008-03-30 Kevin Rosenberg * gcc_*/Makefile: Add more listing and optimization flags. Rename directory dep to .dep 2008-03-22 Kevin Rosenberg * serial_lcd.c: Add note about processing data overrun flag 2008-03-21 Kevin Rosenberg * serial_lcd.c: Fix typo for ICC and CV compilers and add USART RX framing error check. Added protection against size optimization on timed sequences for CV. Thanks to Lee Theusch for the these ideas. 2008-03-20 Kevin Rosenberg * serial_lcd.h, serial_lcd.c: Switch to using native delay and sleep functions for Codevision. 2008-03-18 Kevin Rosenberg * Add Codevision port 2008-03-15 Kevin Rosenberg * serial_lcd.c: Add 4-bit interface mode * serial_lcd.h: Move LCD control codes here with renaming. Use new device-independant iccioavr.h file for ImageCraft (requires ICC V7.16+). Use __flash keyword for Imagecraft (requires ICC V7.15+) * Use custom Makefiles for all IAR, GCC, and ICC compilations 2008-02-24 Kevin Rosenberg * Enscapulate MAIN_FUNC() and MAIN_FUNC_LAST to avoid compile warnings on all platforms 2008-01-04 Kevin Rosenberg * README: Update sizes for 20080104 release 2008-01-03 Kevin Rosenberg * README: Update with information about the two C++ variants. * serial_lcd.h: Rename LCD_DATA_OUT to LCD_DATA_PORT. Create IO definitions for baud rate jumpers to segment their access in serial_lcd_obj.cpp. Add MAIN_FUNC() macro for new GCC OS_main attribute. * serial_lcd.c: GetUsartBaud() move variable declaration to assignment. Rename LCD_DATA_OUT to LCD_DATA_PORT. Use MAIN_FUNC(). * serial_lcd.cpp: Rename some member variables by prepending "m_". Modify UART_UBRR() to round to nearest integer. Rename LCD_DATA_OUT to LCD_DATA_PORT. Remove intermediate Baud Divisors since C++ can employ preprocessor macro in array initialization. Use MAIN_FUNC(). * serial_lcd_obj.cpp: Rename some member variables by prepending "m_". Move GetBaud from Uart class to standalone function GetBaudDivisor(). Use that divisor as for Uart::setBaudDivisor() method. Modify UART_UBRR() to round to nearest integer. Rename LCD_DATA_OUT to LCD_DATA_PORT. Remove intermediate Baud Divisors since C++ can employ preprocessor macro in array initialization. Use MAIN_FUNC(). Modify Lcd::init() to accept parameters to define io definitions. Separate and add methods for setting Uart baud divisor, parity, rx/tx enable and interrupt enable configurations. 2008-01-01 Kevin Rosenberg * ChangeLog: Renamed from CHANGES * serial_lcd.h: Move LED_BRIGHTNESS_LEVELS to .c and .cpp functions so value can be encapsulated in .cpp LedPwm class. Move LCD command codes to .c and .cpp files so that they can be encapsulated by C++ classes. * serial_lcd.c: Make init functions inline to correspond to C++ versions. Change GetUsartBaud to inline since it is only called once in a program. Move LED PWM brightness computation to inline function. Make LED switch on and off code into inline functions. Move CTS initialization to UsartInit. * serial_lcd.cpp: Change GetUsartBaud to inline since it is only called once in a program. Move RX buffer into member variable of object (saves 2 bytes in GCC and no change in IAR size). Change UART_RX_BUFFER_SIZE from preprocessor definition to static const in class (no change in code size). Move pwmPattern array to static variable in LedPwm class and make pwmPattern an inline method (no change in code size). Make setting LedPwmBrightness a class method. Move LED switch on and off code to class methods. Move baud rate constants into Uart class. Change UBRR from numeric constants to values computed from F_CPU. Move CTS init to Uart::init(). Convert Watchdog and SleepMode to fully static classes. Add Delay class. * serial_lcd_obj.cpp: New source file to test the implementation and impact of using independed C++ classes which can potentially be used as part of a standalone C++ AVR library. 2007-12-31 Kevin Rosenberg * LICENSE: Include appropriate copyright statements (Thanks to AVRFreaks member cpluscon) * serial_lcd.c: Fix Livingston's name Thanks to AVRFreaks member cpluscon) * serial_lcd.cpp: Remove all object constructors to reduce code size by eliminating constructors. Fix Livinston's name (Thanks to AVRFreaks member cpluscon) * gcc_c_cpp/Makefile: Use proper map file for C++ code (Thanks to AVRFreaks member cpluscon) * gcc_c_cpp: Directory renamed from gcc_c_cpp_comparison * iar_c_cpp: new directory * icc_c: new directory * Add assembly listings, map files, and hex files for all compiled output * serial_lcd_tester.c: Serial_Lcd tester (tested on Cygwin, should work on Linux) * serial_lcd_tester.exe: Compiled version of serial_lcd_tester.c for Windows (requires Cygwin DLL file) 2007-12-30 Kevin Rosenberg * Initial source code * Change UART RX from polling to interrupt-driven circular buffer * LED backlight PWM brightness setting (8-levels) using Timer0 COMPA interrupt. Store PWM patterns in flash ram. * Port code to IAR and GCC using kavr_compat.h compatibility defintions and macros * NO_RETURN_FUNC macro on main to remove unnecessary prologue/epilogue code * Move BaudLookupTable array from heap to flash ram. Requires 4 more bytes of program code, but frees 4 bytes of SRAM. * Use _delay_ms functions for GCC and _delay_cycles for IAR * Add idle sleep mode setup and enter sleep when no input is waiting * Add watchdog timer setups and resets * Bind key variables to registers * Change from IO Pin numbers to Pin names * Instead of NULL definition, use 0 to be explicit * If F_CPU (frequency of CPU) is not specified, default to value for standard serial_backpack hardware * Define CPU type (__AVR_ATTiny2313__) for kavr_compat.h if not already defined * Rename preprocessor definition LED to LED_PIN * Move USART_DATA from heap allocated to stack allocated, renamed rx_byte * Remove auto-initialized variable so that auto-initialize code is not included in binary (for compilers that support this optimization) * New BIT variable for led_on status (stored in GPIO register) * Added CTS (clear to send) signal on PA2 pin since RESET pin isn't used by original hardware design * Add conditional compilation of SLEEP_MODE, WATCHDOG, CTS features * Add LED_PORT and LED_DIR definitions (in care LED not on same PORT as LCD control) * Rename LCD_CONTROL_OUT to LCD_CONTROL_PORT, LCD_CONTROL_IN to LCD_CONTROL_PIN_REG, LCD_CONTROL_DDR to LCD_CONTROL_DIR, LCD_DATA_DDR to LCD_DATA_DIR, LCD_DATA_IN to LCD_DATA_PIN_REG * Use "= 0xFF" rather than "|= 0xFF" and simplify compare in LcdBusyWait * Create ENABLE_WAIT() to reuse in 3 functions * Separate common declarations for .c and .cpp versions into .h file * Rename a number of functions for common naming format Copyright (c) 2007-2008 by Kevin Rosenberg. All rights reserved. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved.