August 28, 2011 by vgphotog The interrupt handler sei() seems to disable the LCD display when using the ATmega328P. I have just changed over to the ATmega328P from the ATmega168. I have tested most of the basic programs that came with the nerd kit and they work but the display failed to work in a program that I am writing to test the capacity of rechargeable batteries. After much trouble shooting I have discovered that the failure comes from the code that I am using from the realtimeclock1.c program. So I loaded the into the 328 and it also fails to display a result on the LCD. If I comment out the sei() about six lines from the end of the program the display is active and displays zero. Of course the program will not function as intended with that line commented out. I seems that some way sei() disables the LCD. The display remains completely blank if sei() is not commented out. What can I do to make this program work with the ATmega328P? "LCD with sei() commented pic" // realtimeclock1.c // for NerdKits with ATmega328p // mrobbins@mit.edu #define F_CPU 14745600 #include #include #include #include #include #include #include "../libnerdkits/delay.h" #include "../libnerdkits/lcd.h" #include "../libnerdkits/uart.h" #include "../libnerdkits/io_328p.h" // PIN DEFINITIONS: void realtimeclock_setup() { // setup Timer0: // CTC (Clear Timer on Compare Match mode) // TOP set by OCR0A register TCCR0A |= (1< \endcode Introduces an interrupt handler function that runs with global interrupts initially disabled. This is the same as the ISR macro without optional attributes. \deprecated Do not use SIGNAL() in new code. Use ISR() instead.  Please check out the "Nerdy Stopwatch / Kitchen Timer" thread for an interesting and more detailed explanation of this topic!