Thomas Posted April 19, 2006 Report Posted April 19, 2006 Hallo!I have a strange problem. The display (2x16 from reichelt) did not work properly. It seem that the cursor shift did not work. During startup it shows only "MI", not "MIOS". If I had loades an example application like midibox64 the display shows random characters in the first two columns in both rows. -------------------------eoor------------------------- I just played around with the c-"Hello World!"-Programm. (BTW: very great that c is supported now) void DISPLAY_Init(void) __wparam{ MIOS_LCD_Clear(); MIOS_LCD_CursorSet(0x00); MIOS_LCD_PrintCString("Thomas");}-> the Display shows-------------------------s------------------------- But positioning each character works. void DISPLAY_Init(void) __wparam{ MIOS_LCD_Clear(); MIOS_LCD_CursorSet(0x00); MIOS_LCD_PrintCString("T"); MIOS_LCD_CursorSet(0x01); MIOS_LCD_PrintCString("h"); MIOS_LCD_CursorSet(0x02); MIOS_LCD_PrintCString("o"); MIOS_LCD_CursorSet(0x03); MIOS_LCD_PrintCString("m"); MIOS_LCD_CursorSet(0x04); MIOS_LCD_PrintCString("a"); MIOS_LCD_CursorSet(0x05); MIOS_LCD_PrintCString("s");}-> the Display shows-------------------------Thomas------------------------- I changed the display -> same effect. So it should not be the display. I checked all wiring -> all seems ok, no shortcuts etc. no mismatched wires. But I assume it must be a connection problem. I read the datasheet of the display. And there should be no combination that couses this effect. If one dataline is wrong the characters should be as well. I cannot remember that a wrong character was written. Only the shifting seems to fail.Any Ideas? Quote
audiocommander Posted April 19, 2006 Report Posted April 19, 2006 Hi Thomas,do you have any strange uncommon LCD or is it a widely used one? Is it KS0107/KS0108 or HD61202 compatible?I'm asking because I have a 1x16 LCD that has to be addressed like a 2x8 (0x00 + 0x40).The fact that it only shows 2 chars even on MIOS-Startup ("MI" ? Is that right?) would point to this direction, even if I can't believe it by myself... Is there the missing "OS" also somewhere or just "MI"?Do you have a datasheet for the LCD?Could be a wrong connection somewhere on the Core, although I can't see why the setting of the cursor shouldn't work with a CString while a CString works with explicitly setted cursor?AFAIK PrintCString is just supported by the wrapper, so it should be no difference there?Is your alternative display from the same type?And just to check one more possibility: Do you have some code that's writing something to the LCD from somewhere else? => Timer(), Tick(), DISPLAY_Tick() etc... ?Best regards,Michael Quote
Thomas Posted April 19, 2006 Author Report Posted April 19, 2006 Hallo audiocommander!The display is http://www.reichelt.de/index.html?SID=17d-bY7awQARIAAG-oNuIc7e190ee17f19f3bf80f02dd19e32274;LASTACTION=3;SORT=artikel.artnr;WG=0;SUCHE=lcd;ARTIKEL=LCD%20162C;START=0;END=16;FAQSEARCH=LCD-MODUL%2016X2;FAQTHEME=-1;FAQSEARCHTYPE=0;STATIC=0;FC=669;PROVID=0;TITEL=0;ARTIKELID=31652;FAQAUTO=1;ACTION=3;GRUPPE=A5211The alternative display is from the same type but with LED background lighting. Do you know the debug tool from MIOS Studio? It has a LCD writing test.It is possible to clean the display but it is only possible to write one character. (the first one in this case) I havent tried an other code possion to write on the display yet. Could it be a timing issue? Quote
audiocommander Posted April 19, 2006 Report Posted April 19, 2006 Well, here seems to be your problem:You should have read http://www.ucapps.de/mbhp_lcd.html before ordering. ;)Your LCD controller is a KS0070b (see datasheet).MIOS is by default only compatible with the mentioned LCD-Controller types.You could however write your own driver (requires some efford, but is possible, see section "custom LCD driver" on the lcd page; shouldn't bee too hard in your case, since there seems to be only an issue of correct addressing), only print out chars with MIOS_LCD_PrintChar('x')* or simply buy a HD44780, HD61202 or KS0107 compatible display.Best,Michael* you might also write a custom function or macro, eg: TH_PRINTCHAR(unsigned int addr, unsigned char c) { MIOS_LCD_CursorSet(addr); MIOS_LCD_PrintChar(char);}Edit: fogot to mention the most common controller type: HD44780 Quote
Thomas Posted April 19, 2006 Author Report Posted April 19, 2006 Well, here seems to be your problem:You should have read http://www.ucapps.de/mbhp_lcd.html before ordering. ;)Your LCD controller is a KS0070b (see datasheet).MIOS is by default only compatible with the mentioned LCD-Controller types.Thorstens writes explicitely reichelt's order number LCD 162C LED. And LCD 162C LED and LCD 162C is what I have. Is KS0070b not compatible? Quote
audiocommander Posted April 19, 2006 Report Posted April 19, 2006 Sorry for assuming you haven't read the page :-[I searched for KS0070B and found that it should be compatible to HD44780; so the controller should be ok.Could you please answer these two questions:I'm asking because I have a 1x16 LCD that has to be addressed like a 2x8 (0x00 + 0x40).The fact that it only shows 2 chars even on MIOS-Startup ("MI" ? Is that right?) would point to this direction, even if I can't believe it by myself... Is there the missing "OS" also somewhere or just "MI"?And just to check one more possibility: Do you have some code that's writing something to the LCD from somewhere else? => Timer(), Tick(), DISPLAY_Tick() etc... ?sorry again,Michael Quote
Thomas Posted April 23, 2006 Author Report Posted April 23, 2006 Hallo audiocommander!I just want to check it with a new PIC. There are some other issues, too. Sometime I got no reply during code upload. And I remember that the optocoupler was damaged and I had to replace it. And even if it's not the PIC it is worth to check the board again and resoldering the PIC. We will see next week. Quote
TK. Posted April 24, 2006 Report Posted April 24, 2006 I've read about this effect several times in the meantime, and the error was mostly a swapped RW/E lineBest Regards, Thorsten. Quote
Thomas Posted April 27, 2006 Author Report Posted April 27, 2006 FYI: I changed the PIC. And it works now. I assume the PIC was damaged like the Optocoupler.(perhaps a short cut to the 12V). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.