Niijaooh Posted November 15, 2004 Report Share Posted November 15, 2004 Hey peopleI have problems with some missing/wrong characters on my 4*20 lcd (only using 2 lines) on my Midibox Sid. It's a lcd i took from a ISDN phone and it has two hd44780 controllers. I've resoldered the connections a couple of times but it's the same. I've seen others with the same problems in this forum but no solutions.I therefore want to try out a 4 bit ks0066 20*2 LCD that I have and it is now I need your help.I've looked a bit on how to change the source of mios so that it works in 4 bit but I can't figure it out and I don't know how to recompile it. I have absolutely no experience with programming, compiling and that.If anyone would do this for me and send me the .syx or give me precise walkthrough and/or links on how it is done, I would be very grateful.Thanks in advance.Best regards,Niijaooh Quote Link to comment Share on other sites More sharing options...
moebius Posted November 15, 2004 Report Share Posted November 15, 2004 Hi,Modification is done to the main.asm of the application - MIOS already supports 4bit lcd interface.Pick one: http://www.midibox.org/cgi-bin/yabb/YaBB.cgi?board=troubleshooting;action=display;num=1097827380http://www.midibox.org/cgi-bin/yabb/YaBB.cgi?board=parts_q;action=display;num=1074447664for reference, how to do this.Bye, Moebius Quote Link to comment Share on other sites More sharing options...
Niijaooh Posted November 15, 2004 Author Report Share Posted November 15, 2004 hello againI have seen those threads before but i still need to know exactly what to do step by step from changing the correct lines to how to compile with mblab and converting it to get the .syx Quote Link to comment Share on other sites More sharing options...
moebius Posted November 18, 2004 Report Share Posted November 18, 2004 Hi,Err.. actually USER_Init is located in sid_init.inc in sid application. My fault.. :-/But still, this shouldn't be too complicated to understand: Search for text USER_Init, in sid_init.inc and add: ;; Initialize 4bit LCD mode movlw 0x37 | 0x80 ; E1: D.7, 4bit interface movwf MIOS_PARAMETER1 movlw 0x24 | 0x80 ; E2: C.4, 4bit interface movwf MIOS_PARAMETER2 movlw 0x00 ; LCD type 0 call MIOS_LCD_TypeSetDirectly under that line.. Don't replace or delete anything, just add. This can be done with your favourite text editor.. err, like Notepad ;) (Or in MPLAB IDE, but don't ask about it, as I don't have it)There are compiling instructions in HOWTOs section at http://www.ucapps.de.. Just pick that verision of a sid app (*.asm) that you'll be using. Also conversion to .syx is pretty straight forward.. like clicking convert.bat, and then choosing right .syx to upload. If these instructions aren't enough - Do you prefer pre-compiled version?Bye, Moebius Quote Link to comment Share on other sites More sharing options...
Niijaooh Posted November 22, 2004 Author Report Share Posted November 22, 2004 helloI've tried what you said and i've made a new main.syx (of the sid app) and uploaded but it is still in 8 bit because there are only 0's and some black boxes. By the way will the placement af the characters be the same when using a 4 bit lcd in 8 bit mode because there a only symbols in the last 5 boxes on each line?Still i've would like if mios was changed aswell so that it would show the startup message.Will u send me or link to some precompiled versions? It would be a great help. maybe I did something wrong.Best regards, Niijaooh Quote Link to comment Share on other sites More sharing options...
moebius Posted November 24, 2004 Report Share Posted November 24, 2004 Hi,By the way will the placement af the characters be the same when using a 4 bit lcd in 8 bit mode because there a only symbols in the last 5 boxes on each line?Nothing else changes, but data bytes are split to two nibbles which are then transferred in two cycles.Still i've would like if mios was changed aswell so that it would show the startup message.Err.. should be possible, but I haven't examined MIOS that much yet.Will u send me or link to some precompiled versions? It would be a great help. maybe I did something wrong.I made precompiled versions - only changed to use 4bit mode.Bye, Moebiusp.s. I don't know that much about LCD problems - but are you sure you have connection right.. Quote Link to comment Share on other sites More sharing options...
LO Posted November 24, 2004 Report Share Posted November 24, 2004 Hi......mmmmm I also had this exact same problem with a 4x40.It was really easy to  solve no need to switch to 4 bits or anything like that. Make sure you have the 2nd enable line (unused) tied to ground and all should be fine.Hope that solves your problems?pEaCeLOedit; thanks to TK for helping me to troubleshoot that one! Quote Link to comment Share on other sites More sharing options...
Niijaooh Posted November 27, 2004 Author Report Share Posted November 27, 2004 Hello again. The 4 bit lcd is working sort of. It was a connection problem  :-[ and my own compiled . syx worked aswell but thank you so much Moebius for helping! I knew your .syx was right so i looked at the wire on the lcd (actually a very thin data cable with very small solder points) and two small copperwire threads were tuching another wire even though i had separated all the bigger wires. Makes sense? Well i hope you get the idea ;) My setup is quite a mess  ::) because im only testing and dont have a box or cs yet. Now i just have one problem! It only uses the first line. LikeP  1Inte 1al1----chI think it must be the connection. Dont you?I will look in to soon and give you some feedback if i get it to work.Best regards,Niijaoohedit: spelling Quote Link to comment Share on other sites More sharing options...
moebius Posted November 27, 2004 Report Share Posted November 27, 2004 Hi,I knew your .syx was right You're more confident about my skills than I am ;)..so i looked at the wire on the lcd (actually a were thin data cable with were small solder points) and two small copperwire threads were tuching another wire even though i had separated all the bigger wires. Makes sense? Well i hope you get the idea ;)Yes, "The Flat Ribbon Cable From HELL"!! ;DI think the connection is to blame... (Second line has the same address in every HD44780 (compatible) display, which has under 80 characters).You have a multimeter?I recommend you to try putting core and LCD on steady position.. With power off (!! Sorry ;)) - Try measuring if there are connection problems by between LCD and the PIC, by checking resistances between corresponding PIC pins and  LCD PCBs solder taps.. and then measure for shorts between the control lines..Bye, Moebius Quote Link to comment Share on other sites More sharing options...
johnh Posted November 30, 2004 Report Share Posted November 30, 2004 moebius wrote: Yes, "The Flat Ribbon Cable From HELL"!! ;DWhy do people insist on torturing themselves soldering ribbon cableto the LCD? I find it much easier to solder a 14 pin single row headeronto the LCD and then terminate the ribbon cable with single rowconnectors with insertable pins. I used 3 4-pin connectors and 12-pin connector because that is what I have on hand. I find it mucheasier to make good crimp connections on the connector pins (theycan be reinforced with solder if desired) than solder the ribbon cabledirectly to the LCD. I suppose I should take some pictures and writethis up... The only drawback I see is that the whole assembly becomesslightly deeper. Quote Link to comment Share on other sites More sharing options...
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.