mischa.mole Posted December 12, 2008 Report Share Posted December 12, 2008 Hello!After a 2 year pause, I've just finished the core module and connected the first lcd. Being quite a newbie to the work with microcontrollers, I was surprised that everyhing worked perfectly. I updated MIOS and changed the PIC ID (graphical LCD). Everything worked, the display reads "READY."Then I connected the second LCD, and surprisingly it nearly also worked. Only there seems to be something wrong with some offset or something similar. It looks like this:(while booting)On the right display, some characters seem to have "moved over" a little. But after that, "READY." is written on both displays correctly.Do I have to change something in the MIOS; can you help me?Or am I completely mistaken and my wiring is bad somewhere?Thanks for your response!Regards from Austria,Mischa Quote Link to comment Share on other sites More sharing options...
stryd_one Posted December 13, 2008 Report Share Posted December 13, 2008 Just guessing... I don't know if the GLCD driver in the bootloader supports dual displays... That would explain why it is OK once MIOS loads up.. Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 13, 2008 Author Report Share Posted December 13, 2008 Ok, now I uploaded the LC App (just for testing, without any source code changes)Now the result looks like this:(I don't know yet much about Midibox coding, but I'm working on it 8))Seems to be quite a mess....as far as I know, the startup screen should spread over both screens, am I right?Anyone now whats wrong?Also, it seems that the most right 16 pixel column is unused (like I have found in other threads), but i think I will take care of this later...Thanks for your help!Mischa Quote Link to comment Share on other sites More sharing options...
stryd_one Posted December 13, 2008 Report Share Posted December 13, 2008 Yeh you got it right the first time, your offsets are out. Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 13, 2008 Author Report Share Posted December 13, 2008 Can you tell me where to do that?As I said, I'm not yet familiar with the MIOS coding. :-[thank you!mischa Quote Link to comment Share on other sites More sharing options...
cimo Posted December 13, 2008 Report Share Posted December 13, 2008 hiyou clearly don t have the latest MIOS installed, look herehttp://www.midibox.org/forum/index.php/topic,9759.msg71740.html#msg71740 Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 13, 2008 Author Report Share Posted December 13, 2008 hi!thanks you for answering!hiyou clearly don t have the latest MIOS installed, look herehttp://www.midibox.org/forum/index.php/topic,9759.msg71740.html#msg71740I have found this thread but I do think i have the newest version of MIOS, on my Screen it says 1.9f while booting (as seen on the picture in the first post)(while booting)I do think i have tho change the code somewhere, but I have no idea where to look.....thanks!mischa Quote Link to comment Share on other sites More sharing options...
TK. Posted December 13, 2008 Report Share Posted December 13, 2008 It looks like the CS lines have an inverted polarity.Could you please try this test application:http://www.ucapps.de/mios/lcd7_ks0108_v2.zipThe ASM version has inverted CS lines enabled by default, so that you can try it out w/o rebuilding a .hex fileThe C version has inversion disabledNote that the inbuilt GLCD driver of MIOS allows to invert the polarity as well. I can search for the details once I know if this is the issue...Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
cimo Posted December 13, 2008 Report Share Posted December 13, 2008 hiyou clearly don t have the latest MIOS installed, look herehttp://www.midibox.org/forum/index.php/topic,9759.msg71740.html#msg71740it looks clearly i am not able to see a picture.. Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 13, 2008 Author Report Share Posted December 13, 2008 Thanks thorsten!....but I fear the inverted CS lines are not the problem......now my screens look like this:far too many knows on the screen i think >:(@cimo: sorry, the images are uploaded to the webspace of my university, maybe the blocked some IPs or something....I will upload them elsewhere as soon as possible!regards,mischa Quote Link to comment Share on other sites More sharing options...
TK. Posted December 13, 2008 Report Share Posted December 13, 2008 Are you able to re-assemble the code?I think that I found a MPASM->GPASM conversion error in app_lcd.inc:USER_LCD_DetermineCS SET_BSR MIOS_LCD_OPTION1 BRA_IFSET MIOS_LCD_OPTION1, 0, ACCESS, USER_LCD_DetermineCSInv[/code] Should be: [code]USER_LCD_DetermineCS SET_BSR MIOS_LCD_OPTION1 BRA_IFSET MIOS_LCD_OPTION1, 0, BANKED, USER_LCD_DetermineCSInvIf you are not able to modify and rebuild the code, please let me know and I will send you a new .hex fileBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 13, 2008 Author Report Share Posted December 13, 2008 Yes Im able to assemble .hex files...I changed the app_lcd.inc file, but now I have got a nearly blank left screen with some half buttons on it, the right screen remains nearly the same...again, thanks for helping me out! Quote Link to comment Share on other sites More sharing options...
TK. Posted December 13, 2008 Report Share Posted December 13, 2008 How does it work now when inversion is disabled in the main.asm file?Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 13, 2008 Author Report Share Posted December 13, 2008 when i put it "non inverted" and the new app_lcd.inc, its the same result as in the start(this:) Quote Link to comment Share on other sites More sharing options...
TK. Posted December 13, 2008 Report Share Posted December 13, 2008 Ok, so the displays are working with non-inverted CSThe left GLCD works as expected, the right GLCD shows a scrambled screen.Since my 240x64 display uses 4 CS lines, and the demo screen (as well as MBLC screen) is displayed correctly, my assumption is a wiring error.Could it be, that the CS3 line of the right GLCD is always enabled (=1), because it shows all components of the screen.CS line mapping:USER_LCD_LAT_CS1 EQU LATC ; Pin C.5USER_LCD_PIN_CS1 EQU 5USER_LCD_LAT_CS2 EQU LATC ; Pin C.4USER_LCD_PIN_CS2 EQU 4USER_LCD_LAT_CS3 EQU LATD ; Pin D.0USER_LCD_PIN_CS3 EQU 0USER_LCD_LAT_CS4 EQU LATC ; Pin C.2USER_LCD_PIN_CS4 EQU 2It could be a bridging fault (check your solderings)Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 13, 2008 Author Report Share Posted December 13, 2008 Okay thank you!I'll swap the CS lines from display 1 and 2 to see if this is the error.I will let you knwo the results!Thanks & regards,mischaEDIT: Yep, you were right, same result with swapped displays....guess I'll have to recheck my wiring...... Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 13, 2008 Author Report Share Posted December 13, 2008 Thorsten you are a genious!You where right with CS3...When i labeled my plugs I misinterpreted the board layoutthinking that J8 was the "row" on the bottom because it's written J9/J8......well i should have rechecked that too, not only my soldering!but now i plugged it in the other way round and..I even managed to move everything in the center and the knobs far to the right (having a 256x64 instead of a 240x64) --> my first efforts in "coding" MIOS applications, yay :Dtomorrow Im gonna continue with the LC App, thanks for your help!Regards, mischa Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 15, 2008 Author Report Share Posted December 15, 2008 Hello!now both of my displays seem to work properly, so I uploaded the LC Application.Now it looks like the LC App still thinks I have character LCDs connected. I have already set the PIC ID header to 0000000000001000 with the change ID application.Do i need some changes in the LC source Code?I have played with these values and the screen changes accordingly, but I never get a "graphical" screen.#define LCD_USE_SECOND 0 ; the emulation handles with two character LCDs if 1 #define LCD_EMU_COL 55 ; number of emulated columns (characters per line) ; o graphical LCDs: use 55 (like a Logic Control) ; o one 2x40 LCD: use 40 (unfortunately..) ; o two 2x40 LCDs: use 55 (like a Logic Control) #define INITIAL_DISPLAY_PAGE 0 ; initial display page after startup (choose your favourite one: 0-3)What have i forgotten?Thanks!redagrds, mischa Quote Link to comment Share on other sites More sharing options...
ilmenator Posted December 15, 2008 Report Share Posted December 15, 2008 I have played with these values and the screen changes accordingly, but I never get a "graphical" screen.So you get text messages on the LCD, but no graphical representation of the knob? Does it look like this?Best regards, ilmenator Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 15, 2008 Author Report Share Posted December 15, 2008 Nope, it looks like this: Quote Link to comment Share on other sites More sharing options...
cimo Posted December 15, 2008 Report Share Posted December 15, 2008 @cimo: sorry, the images are uploaded to the webspace of my university, maybe the blocked some IPs or something....I will upload them elsewhere as soon as possible!no worries, i just meant that i didn t pay enough attention to the picture.My wrong.have you tried tpo set the default page to another value than 0? Also have you tried to activate the second lcd? Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 15, 2008 Author Report Share Posted December 15, 2008 @ cimo: okay, no problem :)Yep I tried all that, changed LCD_USE_SECOND and the INITIAL_DISPLAY_PAGE, but i still see a similar screen.But I remember when I uploaded the LC App 2 years ago with only one display connected, I saw a quite "graphical" Screen that used fonts etc.I don't really know what else to change in the LC Code Quote Link to comment Share on other sites More sharing options...
cimo Posted December 15, 2008 Report Share Posted December 15, 2008 A simple thought: can you delete the project file before building so yo ucan be sure you are acutally building a new file? Quote Link to comment Share on other sites More sharing options...
TK. Posted December 15, 2008 Report Share Posted December 15, 2008 Thats really strange - MBLC should switch to GLCD mode if the LCD driver notifies that this capability is available:Inside USER_Init (-> main.asm) ;; use LC_STAT.LC_STAT_GLCD as indicator if graphical LCD ;; or character LCD is connected bcf LC_STAT, LC_STAT_GLCD btfsc MIOS_BOX_CFG0, MIOS_BOX_CFG0_USE_GLCD bsf LC_STAT, LC_STAT_GLCD[/code]Accordingly no source code or setup change is required, it should work with the prebuilt .hex files.Especially with setup_midibox_tk.hex, as this is the file I'm using for my own MBLC - when you apply a diff over the setup_*.asm files, you will notice that the only difference is the default value of "TOUCH_SENSOR_MODE"...So - please don't change the source code. Remove your changes (or rename the directory), and start with the original release. Could it be, that you are trying an expired release package which doesn't provide this "GLCD selfdetection" mechanism?And are you using the original pic18f452/midi/mios_v1_9f_pic18f452.hex file, or did you build (and modify) MIOS by yourself?Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
mischa.mole Posted December 15, 2008 Author Report Share Posted December 15, 2008 Hello!The MIOS i've used was always the unchanged one - File pic18f452/midi/mios_v1_9f_pic18f452.hexI have uploaded MIOS and the LC App again from a newly extracted package - same result.It really eems I have a hardware problem somewhere, but why does the test app work then... ??? 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.