cimo Posted August 23, 2007 Report Share Posted August 23, 2007 hiso, i ve happily built a new core (thanks sasha!) and connected my GLCD 128X64, but at startup of the LC application nothing happens just a blank screen, same with MB64E and with the LCD test app.In the LC application i ve only changed the code as follow;#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)-Is this all i have to change in the code to tell the box i have a GLCD connected?-Will MB64E accept a GLCD 128X64 ? Where should i change the code?-the definition of pins is different in the mbhp_glcd.pdf and in the datasheet of my GLCD, i assumed thatR/S is D/I (H:display data L:display instruction)oris R/S ---- /RES (Reset signal) ?CS1 ---- CSACS2 ---- CSBCS3 not connetedCS4 not connetedtxxxsimone Quote Link to comment Share on other sites More sharing options...
cimo Posted August 24, 2007 Author Report Share Posted August 24, 2007 ... the GLCD works with the lcd7_KS1080_V1_9 app so all connections are correct and i am obviously missing something in the code... ie: where do i choose the LCD type??txxsimone Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 24, 2007 Report Share Posted August 24, 2007 I don't know MB64 very well, but there's a good chance that it uses the 'auto interface get' which means you need to use the PIC ID to select it... Quote Link to comment Share on other sites More sharing options...
cimo Posted August 24, 2007 Author Report Share Posted August 24, 2007 hi and thanks fo rthe inputit sounds still too obscure to me, i ve made a little search but i can t really figure out what is the "auto interface get" and alsoyou need to use the PIC IDdoes it mean i have to change the PIC ID ? cheerssimone Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 24, 2007 Report Share Posted August 24, 2007 There are two ways for MIOS to determine how it should drive your LCD... It can be hardcoded into the application, or the application can use a special function which automatically gets your LCD type based on the PIC ID. http://www.avishowtech.com/mbhp/idgen.html ;) Quote Link to comment Share on other sites More sharing options...
cimo Posted August 25, 2007 Author Report Share Posted August 25, 2007 ####BINGO!#### Quote Link to comment Share on other sites More sharing options...
cimo Posted August 26, 2007 Author Report Share Posted August 26, 2007 ok now i have the two GLCDs hooked up and working, just that the resolution is now 256X64 so that in the right corner there is a 16X64 stripe of pixels unused...Where can i change the resolution of the output to the GLCD? if it is not possible can i change the offset so that i can center the image?I think it has to be done at the MIOS level because i can see that the stripe on the right appears before that MBLC is launched, that means that the MBLC app is not involved in the screen setup .. right? this LC stuff rocks!! if i can tweak it at my will we re gonna have a funny winter together!! :Ptx TK and thanks to all the MBers for the support Quote Link to comment Share on other sites More sharing options...
cimo Posted August 26, 2007 Author Report Share Posted August 26, 2007 hiwell, i ve found out that the whole area (256X64) can be used by the application but it is not initialized by MIOS!! That means that i can move icons and chars on the "extra area" (the last 16 columns of pixels) but the area not covered by any icon or letter will be with all the pixels lit on.If you have any suggestion how to deal with that you are very welcome but for the moment i can keep on with the rest of the code i need and leave this as it is as i am only in testing mode.. txsimone Quote Link to comment Share on other sites More sharing options...
cimo Posted August 26, 2007 Author Report Share Posted August 26, 2007 hisorry for my blurbing but maybe i can come out with something useful for others... ... i think i got the point, maybe: i think that the way it is setup by TK, for a 240X64 GLCD all the icons and chars cover the whole display.Now if i move things around the screen then i get scrambled pixels where there is nothing to be print, so if i have different setups on the 4 different pages, i have to organize the elements so that they will cover the whole area otherwise there are traces of the elements of the previous page left there.... it doesn t make too much sense to me, why doesn t the screen resets every time i change page? is the unconnected reset pin involved in this mistery? mmmmThe other screen related thing i am working around is the adaptation of the elements to the new resolution (256X64) so that they will fit nicely and symmetrically, for example i moved the smpte element on the right screen so it is not split and that works ok, also the knobs are ok, sitting very nicely.Still i need to fix the host messages, using the distance between chars is not enough i need to find out where the app creates the layout and add some 1 or 2 spaces between each channel..as usual any input is welcomesimone Quote Link to comment Share on other sites More sharing options...
cimo Posted August 27, 2007 Author Report Share Posted August 27, 2007 ..anybody knows how to deal with the convpix.pl script? it seems like it doesn t like too much files saved with IconPX (windows), IconPainter (Java over OSX) and Gimp (OSX) won t save xpm format for some plugin error.. there is no mention to the convpix script in the forum, neither in google.. ??? ???simone (still dealing with scrambled pixels) Quote Link to comment Share on other sites More sharing options...
cimo Posted August 27, 2007 Author Report Share Posted August 27, 2007 not really state of the art but a good start:so the knobs can easily be moved (although i need to resize the icons for now there are spaces in between them) but the host messages and horizontal meters need to be fixed, now they are centered but not really aligned with the icons, what i need to do is putting a space in between each channel, that should work:;; print host messages at position 2/1 (4 pixels between chars) SET_GLCD_HOST_MSG LC_SMALL_FONT, 2, 1, 4now we have 7 chars each channel (6+1 space) multiplied 8 makes 56 minus 1 (the last channel doesn t need space i suppose) then it is 55, that remember me something ;) .55 chars of 4 pixels each (the chars are 5 pixels wide but the distanse is set to 4) it makes 220 pixels, it starts at x=2 so there should be 18 pixels left on the right side.If i can add 1 extra space in between each channel (and believe me i will find out how to do it) it ll be 6+2=8 X8=64 X4=256 and that also remembers me of something.. no way to use 5 pixels wide chars, it doesn t work, nevermindNow let s take the knobs icons:;; print knobs at position 8/4 (28 pixels between icons) SET_GLCD_KNOB LC_KNOBS_ICONS, 8, 4, 28 they are 48 pixels wide (and 24 high) but they are originally placed at 28 pixels of distance and the first one starts at x=8 so it is 28X8=224 +8=232 ,8 pixels left we keep them on the right side so they are centred in the display.With a resolution of 256X64 it can be easy: icons 32X24 (why not 32X32?) they will cover the whole width of the display (32X8=256).end of the blurbing.. Quote Link to comment Share on other sites More sharing options...
cimo Posted August 29, 2007 Author Report Share Posted August 29, 2007 Next step:Actually the original icons are 32X24 and not 48X24 so placing them at x=0 at 32 pixels of distance should fill the display horizontally but it doesn t, they are displayed as 28X24 (??) with 4 pixelsAnyway here comes the solution: as stated in lc_glcd.inc;; don't print if LCD_SMPTE_BEATS_FONT_H is 0and;; don't print if LCD_MTC_FONT_H is 0etc etcand;; --------------------------------------------------------------------------;; This function is called by LC_GLCD_LEDStatusUpdate when;; "90 72 7F" has been received;; --------------------------------------------------------------------------LC_GLCD_Print_BEATS ;; force display mode to BEATS bcf LC_STAT, LC_STAT_SMPTEso if you dont want these elements to be displyed just set H(second value)=0 and not erase the entire entry, as i did :P MIOS is a text adventure wasn t it?As for convpix.pl and xpm editors the only solution i ve found is to edit the .xpm edit it graphically, save it then open the original file and the edited one in a normal text viewer (SMULTRON in this case) and compare the 2 files: when and if you get there you ll easily see what you have to do.It works! EDIT: my second page adapted to the new resolution Quote Link to comment Share on other sites More sharing options...
cimo Posted September 1, 2007 Author Report Share Posted September 1, 2007 yuuuuuuhuuuu 256 clean columns finally, i had to change something in the source code of MIOS and assemble it but finally it resets all the columns...next step is adding an extra space between each channel/host message Quote Link to comment Share on other sites More sharing options...
stryd_one Posted September 1, 2007 Report Share Posted September 1, 2007 i had to change something in the source code of MIOSA custom driver for your custom LCD is the trick here :)Rather than modifying MIOS_GLCD0.inc, you can copy it's contents into your app_lcd.inc (some minor editing is required) and set your PIC ID to use a custom LCD. All set :)PS we just chatted about this but I put it here also for others to refer to ;) Quote Link to comment Share on other sites More sharing options...
cimo Posted September 1, 2007 Author Report Share Posted September 1, 2007 hii tried that and i got a bunch of errors, so i think i will keep it as it is and dig on it later on.....anyway i came to think that if the GLCD0 driver is written for the KS0180 types and the KS0180 driver deals with 64X64 "pieces" then it is not that strange to have MIOS dealing with a 256X64 resolution.If you are wondering if i, mr nobodycoder, am daring to say that i have my own opinion about MIOS source code and TK s work, well yes it s just an opinion and ;D ;D ;D"I have been given USER status ONLY in order to BE HELPED out - my opinions are NOT rules and you can feel free to tell me where to shove them" ;D ;D ;D -that was a nice one btw-now seriously: i understand that 240X64 is the next step in commercial GLCD after 128X64 but the 2X 128X64 is a cheap and elegant solution for those who have found the non-alignment stuff on a 8 channel MBLC with 240X64 GLCD the reason why to stick to the 2x 2X40 CLCD setup.At this point my only question would be: if i set the function MIOS_GLCD0_ClearInnerLoopto clear all the 256 columns instead of only 240 will that take so much more CPU cycles as to justify the default settings (x=240) ?As a last thought i have to admit that touching the MIOS source code scared me to hell but it s been the only easy way out, maybe not so elegant and code-wise but as somebody said, reverse engineering is the best way to get the whole idea of how MIOS work.here the new pics of page0 and page3: Quote Link to comment Share on other sites More sharing options...
TK. Posted September 2, 2007 Report Share Posted September 2, 2007 Thanks for pointing out this issue! There is no reason why only 240 columns are cleared, so I did the change in MIOS V1.9f (just update to this version)Best Regards, Thorsten. 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.