Phatline Posted February 22, 2015 Report Posted February 22, 2015 (edited) I have my own application based on MIOS32, i want to connect 3x 2x40LCDs What I found out: I can wire them paralell except one Wire "E", which stands for "enable signal, start data read/write" The E-Wire for the first 2 2x40 LCDs are located @ J15a & J15b looks like this: (found that under ng: http://www.ucapps.de/midibox_ng_manual_lcd.html) well i dont use ng... and this shematic for 2x 2x40 LCD http://www.ucapps.de/mbhp/mbhp_lcd_2x2x20_mios32.pdf app_lcd give me some tips... http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fmodules%2Fapp_lcd%2Funiversal%2Fapp_lcd.c #elif defined(MIOS32_FAMILY_LPC17xx) # define APP_LCD_NUM_EXT_PINS 4 // at J28 what in my app.c means: #include <app_lcd.h> #define APP_LCD_NUM_EXT_PINS 3 //up to 4 extra LCD can be connected, here i use 3 now what about those 4x extra Pins @ J28 - take a look at the shematic: 2 better find the PIN1: The only Pins I see are: SDA, SC MCLK WS I dont want to damage my LCDs by "just try it out" - Question is: where to connect which "E"-Line? (but maybe i am on the complete false train...) I found in app_lcd.c: // pulse the RC line after a serial data shift .... #elif defined(MIOS32_FAMILY_LPC17xx) APP_LCD_ExtPort_PinSet(2, 0); // J28.WS APP_LCD_ExtPort_PinSet(2, 1); // J28.WS //serial datashift.... for(i=0; i<8; ++i, data <<= 1) { MIOS32_SYS_LPC_PINSET(2, 13, data & 0x80); // J28.SDA = ser MIOS32_SYS_LPC_PINSET_0(2, 11); // J28.SC = 0 (Clk) thankz Edited March 1, 2015 by Phatline Quote
TK. Posted February 22, 2015 Report Posted February 22, 2015 See http://www.ucapps.de/midibox_ng_manual_lcd.html Under "3..6 CLCDs" you will find the required bootloader configuration + a schematic Best Regards, Thorsten. Quote
Phatline Posted February 24, 2015 Author Report Posted February 24, 2015 thankz, very much, complettely overread Quote
Phatline Posted February 25, 2015 Author Report Posted February 25, 2015 (edited) no need for those extra transistor and Pots... it runs without problems, the transistor is warm, not hot. Edited March 1, 2015 by Phatline Quote
Phatline Posted February 28, 2015 Author Report Posted February 28, 2015 (edited) looks like I cant use the 3rd Display normal: A: Thats right, you have to select a Display first. "MIOS32_LSCD_DeviceSet (0); MIOS32_LCD_CursorSet(0, 0); MIOS32_LCD_PrintFormattedString("MUTE Drum1 HOLD Drum1 MUTE Drum2 HOLD Drum2 MUTE Bass MUTE Chord"); give me: [39512.470] Hard Fault PC = 54554d20 ok what the Function Describtion says, that i Have to setup the lcd as GLCD: s32 MIOS32_LCD_TypeIsGLCD ( void ) Returns 1 if the currently selected LCD type is a GLCD, otherwise 0 Note: GLCDs are determined by checking the mios32_lcd_parameters.lcd_type setting - if bit #7 is set (>= 0x80), the LCD is a GLCD do i have to change the local mios-config-file in some way? A: Change it with the Bootloader app and Mios-Studio - and its don: Upload the Bootloader.hex, open Mios-Studio, typing in Mios-Terminal: lcd_type CLCDlcd_num_x 3 lcd_num_y 1 lcd_width 40 lcd_height 2 store Now i see that all 3 Displays are Working (hardware is ok) aha there are special commandos for GLCDs: maybe this will help: A: Definitvly a good start MIOS32_LCD_DeviceSet (0); MIOS32_LCD_Clear(); MIOS32_LCD_GCursorSet (0, 0); MIOS32_LCD_PrintFormattedString("DEVICE 0"); MIOS32_LCD_DeviceSet (1); MIOS32_LCD_Clear(); MIOS32_LCD_GCursorSet (0, 0); MIOS32_LCD_PrintFormattedString("DEVICE 1"); MIOS32_LCD_DeviceSet (2); MIOS32_LCD_Clear(); MIOS32_LCD_GCursorSet (0, 0); MIOS32_LCD_PrintFormattedString("DEVICE 2"); 3rd Display is blank (by the way the 3rd displays first Row is filled with Black Rectangels (like a PIC without Bootloader...) A: The 3rd LCD has to be initalized first: "MIOS32_LCD_DeviceSet (2); MIOS32_LCD_INIT(0);" - more see next post --- what brings me to the point that this 3x Display Setup in Bootloader mod must be overwritten when i upload my code....so search in a nother way...: A:NO, Bootloader is fine. MIOS32: each LCD has a separate driver which is selelected from the Makefile with an environment variable: modules/app_lcd/$MIOS32_LCD - the source code of all drivers is stored in the repository. The "universal" driver is used by default (to developers: 'export MIOS32_LCD=universal') and allows to select the most favourite LCDs during boot phase (and runtime). Users would typically specify the LCD type and dimensions with the bootloader update application which is available in the MIOS 32 download section. Do I have to change this "universal" to something other? or is GLCD also "universal" and i have to change something somwhere other? A: NO, Universal is fine. Edited March 1, 2015 by Phatline Quote
Phatline Posted February 28, 2015 Author Report Posted February 28, 2015 (edited) ok got it: - i have to initalze every LCD/device once - then i have access to it - stripped down code: #include <mios32.h> #include "app.h" void APP_Init(void){ MIOS32_LCD_DeviceSet(0); MIOS32_LCD_Init(0); MIOS32_LCD_DeviceSet(1); MIOS32_LCD_Init(0); MIOS32_LCD_DeviceSet(2); MIOS32_LCD_Init(0); } void APP_Background(void){ MIOS32_LCD_DeviceSet (0); MIOS32_LCD_Clear(); MIOS32_LCD_CursorSet(0, 0); MIOS32_LCD_PrintFormattedString("DEVICE 0"); MIOS32_LCD_DeviceSet (1); MIOS32_LCD_Clear(); MIOS32_LCD_CursorSet(0, 0); MIOS32_LCD_PrintFormattedString("DEVICE 1"); MIOS32_LCD_DeviceSet (2); MIOS32_LCD_Clear(); MIOS32_LCD_CursorSet(0, 0); MIOS32_LCD_PrintFormattedString("DEVICE 2"); } void APP_MIDI_NotifyPackage(mios32_midi_port_t port, mios32_midi_package_t midi_package){} void APP_SRIO_ServicePrepare(void){} void APP_SRIO_ServiceFinish(void){} void APP_DIN_NotifyToggle(u32 pin, u32 pin_value){} void APP_ENC_NotifyChange(u32 encoder, s32 incrementer){} void APP_AIN_NotifyChange(u32 pin, u32 pin_value){} Edited March 1, 2015 by Phatline Quote
Phatline Posted February 24, 2018 Author Report Posted February 24, 2018 i need 6x LCDs on a STM core... How to handle that on STM32F4? - there is no J28! where/how to change the E-Line Pinout softwareside, i have connected them to J5A pins (i already changed the number of LCDs in bootloader app...) Quote
Phatline Posted March 2, 2018 Author Report Posted March 2, 2018 (edited) On 22.2.2015 at 8:58 PM, TK. said: See http://www.ucapps.de/midibox_ng_manual_lcd.html Under "3..6 CLCDs" you will find the required bootloader configuration + a schematic Best Regards, Thorsten. J28 for E-Extra-Lines...so this shematic: 6x2x20..... but this is for LPC17, now i have the same problematic with the STM32, what Connector is standart?, do i have to change something Mios side? (or only bootloader?) thx mike Edited March 2, 2018 by Phatline Quote
latigid on Posted March 2, 2018 Report Posted March 2, 2018 (edited) J10B.D8: serial data (was J28.SDA on a MBHP_CORE_LPC17 module) J10B.D9: serial clock (was J28.SC on a MBHP_CORE_LPC17 module) J10B.D10: SR strobe (was J28.WS on a MBHP_CORE_LPC17 module Well, this is the pinning to use the Disp Driver breakout board (595 chip side/CS lines). But J10B should give 8 CSs I think. Edited March 2, 2018 by latigid on Quote
Phatline Posted April 9, 2018 Author Report Posted April 9, 2018 for me it doesnt work out with j10b direct connection to displays http://www.ucapps.de/mbhp/mbhp_lcd_nx2x20_mios32.pdf the documentation uses doutx4 shiftregister at j28 which doesnt exist on core32f4... docu also not saying where to handle pinning software side. Quote
gerald.wert Posted April 10, 2018 Report Posted April 10, 2018 It may need the 595 to shift to 5v unless you have 3.3v displays. Quote
gerald.wert Posted April 11, 2018 Report Posted April 11, 2018 I do not see it documented anywhere for the stm32f4. I believe you are going to have to define it. have you tried this in mios studio console: testlcdpin e3 1 -> sets E3 to ca. 3.3V set this first so you get voltage testlcdpin e3 0 -> sets E3 to ca. 0V Set this to toggle the pin voltage off to verify your pin This should be working on the E1 and E2 pins for sanity check on J15. You should be able to look around with your meter for what pin is being enabled and disabled if it is configured already. I believe it is not and you will need to configure it in the code and compile for the additional functionality you are after. If you look in the SVN at: /trunk/mios32/stm32f4xx/mios32_board.c http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Fmios32%2FSTM32F4xx%2Fmios32_board.c I think you will find what you need to update there. It looks as E 3 and E 4 is not set there. You just need to determine your pin assignments and set them. Someone a little more familiar may be able to say if you need to set something anywhere else as well. I believe you will have to also add in E 5 and E 6 since you want 6 displays but that is just adding the additional lines of code for the enable lines. Not sure if you will need to make those changes anywhere else in the code as well. There is still the question of if you need to shift the voltage from 3.3 to 5 volts as well. once you have the pins you want working you will know better if you need to do that once you have enable lines working. A 74hct08 or 74hct245 may be better than a 595 since you are only looking at a 4 additional displays you should not have to multiplex the enable lines via a 595. There are plenty of available pins you can use for enable lines already. You could use a small transistor as well for the voltage conversion but the ic is likely to do a better job and take up less space. Transistor my be viable while you are testing things to get that first display working. I am a beginner on the programming so can not help you much more there. 1 Quote
Phatline Posted April 20, 2018 Author Report Posted April 20, 2018 thx for the testpin hint ... lcds still not working ... cant test them, have to made new cable, but dont have any connectors anymore... this will have to wait.... but got 16xOLEDs working on the stm32f4 (also with the knowledge with the testpin) Quote
gerald.wert Posted April 20, 2018 Report Posted April 20, 2018 Your welcome, it is good to have the tools to test things. You can spend a lot of time going in a circle without good tools! Quote
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.