??? 07/28/04 13:07 Read: times |
#75031 - RE: LCD Help! Responding to: ???'s previous message |
I got it to work now. I am able to wright data to the LCD. The problem I have now is that the code only executes until a certain if statement and from there it doen not wright code to the LCD anymore. When you press the other buttons the LCD doen not display it and the cursor does not shift. Is there a limit of if statements that you can have within an interrupt function?
void 2LCD (void) { P3_6 = 1; //rs P3_7 = 1;//e 100usDelay( ); P3_7 = 0; } void int(void) interrupt 0 { unsigned char x; x = XBYTE[0x0a000]; if (x == 0x00) {P1 = 0x31; 2LCD( );} else if (x == 0x01) {P1 = 0x32; 2LCD( );} else if (x == 0x02) {P1 = 0x33; 2LCD( );} else if (x == 0x04) {P1 = 0x34; 2LCD( );} else if (x == 0x05) {P1 = 0x35; 2LCD( );} else if (x == 0x06) {P1 = 0x36; 2LCD( );} else if (x == 0x08) {P1 = 0x37; 2LCD( );} else if (x == 0x09) {P1 = 0x38; 2LCD( );} else if (x == 0x0a) {P1 = 0x39; 2LCD( );} else if (x == 0x0c) { P1 = 0x2a; 2LCD( );} else if (x == 0x0d) {P1 = 0x03; 2LCD( );} else if (x == 0x0e) {P1 = 0x23; 2LCD( );} } The data is only displayed until the line, where P1 = 37h. Why isn't the rest of the data being displayed? The LCD is connected to Port1. |
Topic | Author | Date |
LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: LCD Help! | 01/01/70 00:00 | |
RE: Lookup table![]() | 01/01/70 00:00 | |
Use a switch statement! | 01/01/70 00:00 |