Changing CS pin KS0108
#1
Posted 18 May 2012 - 16:56
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
#2
Posted 18 May 2012 - 17:19
the pins are directly programmed into the universal driver: http://svnmios.midib...ersal/app_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.
Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.
#3
Posted 18 May 2012 - 18:24
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);
#elseSo 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
#4
Posted 18 May 2012 - 21:18
http://svnmios.midib.../mios32_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.
Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.
#5
Posted 19 May 2012 - 12:45
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
#6
Posted 19 May 2012 - 16:43
CS2 = J28:SC
CS3 = J28:WS
CS4 = J28:MCLK
Best Regards, Thorsten.
Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.
#7
Posted 01 July 2012 - 17:46
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 by Cubess95, 01 July 2012 - 17:48.
#8
Posted 01 July 2012 - 18:31
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...ap_newbies.html
Best Regards, Thorsten.
Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.
#9
Posted 08 July 2012 - 11:40
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
#10
Posted 08 July 2012 - 15:17
#11
Posted 08 July 2012 - 17:20
#12
Posted 15 July 2012 - 15:47
1) upload the latest mios32_bootloader application (-> http://www.ucapps.de...2_download.html)
2) thereafter enter 'help' in the MIOS terminal -> do you see the commands?
Best Regards, Thorsten.
Buy TK a Beer Disclaimer: buying TK a beer gets you absolutely nothing in return likesuchas firmware enhancements, technical advices and MIDIbox troubleshooting assistance.
#13
Posted 15 July 2012 - 17:48
Regards,
Cubess
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



