Cubess95 Posted May 18, 2012 Report Share Posted May 18, 2012 Hi guys, I have built a midibox close to a midio128 with a 128*64 Graphic LCD with a KS0108B controller. This controller have 2 CS (chip select), but on my project, CS1 & CS2 are not connected to J5C (A8, A9) but to the 19th et 20th pins of the LPC1769. I don't find in wich files i can define the pins. Any helps ? Thx, Cubess Quote Link to comment Share on other sites More sharing options...
TK. Posted May 18, 2012 Report Share Posted May 18, 2012 Hi, the pins are directly programmed into the universal driver: http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fmodules%2Fapp_lcd%2Funiversal%2Fapp_lcd.c Search for MIOS32_BOARD_J28 Currently they can't be changed from external, the source code has to be modified directly. There will be a "weak" function reference in future which will allow to overload the CS pin initialisation and control from external. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Cubess95 Posted May 18, 2012 Author Report Share Posted May 18, 2012 Thx for the response. I see a fault in my first post, the initial port isn't the J5C, i'm working on the LPC1769 so it's the J28. But i think that you corrected my mistake yourself seeing your post. So if I understand you well, i have to change the code here : #elif defined(MIOS32_FAMILY_LPC17xx) int cs; for(cs=0; cs<4; ++cs) MIOS32_BOARD_J28_PinInit(cs, MIOS32_BOARD_PIN_MODE_OUTPUT_PP); #else So I have to change the function "MIOS32_BOARD_J28_PinInit()" by another function I create myself isn't ? Where is the code of this function, so that I can inspire myself with it ? I already seen these lines in the app_lcd.c file but I didn't find where the "MIOS32_BOARD_J28_PinInit()" function is written. Sorry i'm not a programmer even if I know some langages (including C). Regards, Cubess Quote Link to comment Share on other sites More sharing options...
TK. Posted May 18, 2012 Report Share Posted May 18, 2012 The MIOS32_BOARD_* functions for LPC17xx are located here: http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fmios32%2FLPC17xx%2Fmios32_board.c By searching for MIOS32_BOARD_J28 you will also find the exact pinning. Note: this file shouldn't be changed, if you need something similar, copy&paste&rename the functions in your application. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Cubess95 Posted May 19, 2012 Author Report Share Posted May 19, 2012 Ok thx, I just have one more question : Originally, how the CS are connected to J28 ? CS1 is connected to SDA, SC, WS or MCLK ? And for CS2, 3, 4 ? I ask you in the case I can't carry out the programming, so that I can go back to J28. Regards, Cubess Quote Link to comment Share on other sites More sharing options...
TK. Posted May 19, 2012 Report Share Posted May 19, 2012 CS1 = J28:SDA CS2 = J28:SC CS3 = J28:WS CS4 = J28:MCLK Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Cubess95 Posted July 1, 2012 Author Report Share Posted July 1, 2012 (edited) Thanks again Thorsten ! Sorry to answer so late but I've had a lot of work. I have another problem now. I have used an application form the mios32_test directory for the ks0108 to test it. The terminal of MIOS Studio print : "WARNING: your core module hasn't been configured for the KS0108 GLCD! Please do this with the bootloader update application!" Lines above, it's indeed print : "lcd_type: 0x00 (CLCD)" So it seems that my midibox is configured for a character LCD and not a graphic LCD. How can I change this ? I don't understand why it talks about the bootloader. I haven't define any LCD type while I have uploaded the .bin with the LPCXpresso soft from code_red. Edited July 1, 2012 by Cubess95 Quote Link to comment Share on other sites More sharing options...
TK. Posted July 1, 2012 Report Share Posted July 1, 2012 The LCD parameters are stored in the bootloader configuration range and read by the "universal" LCD driver. Advantage: somebody can run any application with the display and doesn't need to recompile the code! (not true for your special case of course...) The configuration details are described at the bottom of this page: http://www.ucapps.de/mios32_bootstrap_newbies.html Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Cubess95 Posted July 8, 2012 Author Report Share Posted July 8, 2012 Hi Thorsten. If I understand you well, I have to open MIOS Studio and type those commands in the terminal. But those commands doesn't work, MIOS Terminal said me it doesn't know those commands. And when I type help, those commands are not in the list. Maybe I'm doing it wrong ? I have noticed that the commands are not always the same. For exemple, i can type "help" with the midio128 app but not with the midibox LC app. The commands describe at the bottom of your link works only in special conditions ? Best regards, Cubess Quote Link to comment Share on other sites More sharing options...
ilmenator Posted July 8, 2012 Report Share Posted July 8, 2012 Make sure you are using the latest version of MIOS Studio! Quote Link to comment Share on other sites More sharing options...
Cubess95 Posted July 8, 2012 Author Report Share Posted July 8, 2012 I was using the Mios Studio 2.2.3, so I have just downloaded the latest version (2.2.4) with your advice, but it seems it doesn't change anything =( Quote Link to comment Share on other sites More sharing options...
TK. Posted July 15, 2012 Report Share Posted July 15, 2012 Please try the following: 1) upload the latest mios32_bootloader application (-> http://www.ucapps.de/mios32_download.html) 2) thereafter enter 'help' in the MIOS terminal -> do you see the commands? Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Cubess95 Posted July 15, 2012 Author Report Share Posted July 15, 2012 I will not be there for 3 weeks but I will try this, thx again. Regards, Cubess 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.