Carsten Posted December 13, 2018 Report Share Posted December 13, 2018 (edited) Hi everyone, short introduction of myself: I´m Carsten and a big fan of Synth DIY in general. I build many eurorack modules and a MOTM modular with 30+ modules. Its maybe some 15 years ago that i build a SID V1 completely on breadboard, programming Pics with JDM programmer and so on. In real life i pursue a little shop and fixin TV sets and Hifi on a daily basis. Long time i had an eye on the V4 and now i pulled the trigger and sourced parts and actualy build it. Everything is workin fine so far. I always liked VFD displays and saw some pictures of espacially mr. hawkeye´s seq with these. So it seems possible to get the same. I bough some Futaba VFD and had to experience that these are not HD44780 compatible and needs a custom driver or special lines in the code to work correct. So i set up a toolchain per the explanation in the wiki and tried to compile from the source code, at first without any modifications on that. The hex file compiles and i get an output that i can flash to the core. Problem with that new compiled hex is: the frontpanel will not work anymore but the core could be accessed via Mios Studio and the seq does all requested functions. When i flash back the precompiled official all things work as expacted. I have the custom frontpanel configuration file placed in the root of the card like described. My hope was that i could learn to modify the display driver to use VFD´s and make the necessary changes in future firmwares myself. But unfortunately im not able to do so. I have no experience of programming code other than atari 800 Basic that i tried some 25 years ago. In other words i need help please. best regards Carsten Edited December 30, 2018 by Carsten Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted December 13, 2018 Report Share Posted December 13, 2018 Hi Carsten, Welcome to MIDIbox! VFDs are awesome, aren't they? Unfortunately, i've stopped upgrading my VFD v4, as it runs a really old core, and i will upgrade that main rig to a v4+ with OLEDs soon. While i still love VFDs, the new Matias keys are just teh awesome! :). My old v4 is unfortunately "stuck" with a really old SEQ firmware and cannot be easily upgraded, as it still runs on a STM32F1 and had some manual patches to enable both VFDs. I never ported/repatched the newest firmware versions after some time, because i was just happy with the functionality and memory got more scarce on the STM32F1. I remember, that it was quite tricky to get both Futaba VFDs working - there should be an old thread around here somewhere with some patches in it, that you could try. An Atari 800XL was my entry drug, too, "GRAPHICS 8"! :) Many greets and have fun! Peter Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted December 14, 2018 Report Share Posted December 14, 2018 Searched for the posting and found it, puuh, 8 years already, time flies! Maybe it helps, there is a diff attached in the posting. Good luck! Many greets, Peter Quote Link to comment Share on other sites More sharing options...
Carsten Posted December 14, 2018 Author Report Share Posted December 14, 2018 Hello Peter, thank you for your help, i was hoping that you reply to my post. So i stumbled upon your older post before and tried to understand what you did, but i could not find the lines of code that you changed! Befor i get to changes on the display, i need to sort out the problem with compiling from the original source code. I dont know why the frontpanel is not working after i recompiling from source. Do i make some changes elswhere to get that working? The core is STM32F4 with wilba frontpanel configuration. And yes the V4+ is intriguing, but i chose the V4 before. I understand this as a longer term project so i have no rush, meanwhile i took some standard display to finish the build and start using that seq. Thanks and kindest regards Carsten Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted December 15, 2018 Report Share Posted December 15, 2018 Hi Carsten, no problem - once you've managed to set the compilation toolchain up - this should work at some point in time, you could use the toolchains provided for windows or linux, one of them will work, you could try to apply this patch to app_lcd.c which resides in trunk/modules/app_lcd/clcd. The lines with a "-" should be removed, the lines with a "+" should be inserted instead. Then recompile and cross your fingers :). What i basically did was switch the display addressing mode from 8-bit to 4-bit and also added some delays, which was required as the Futaba VFDs asked for different timing. Unfortunately, i cannot guarantee that it will work, it has been many years! [hawkeye@impulse /home/code/midibox/mios32/trunk/modules/app_lcd/clcd]$ svn diff app_lcd.c Index: app_lcd.c =================================================================== --- app_lcd.c (revision 1124) +++ app_lcd.c (working copy) @@ -54,7 +54,7 @@ display_available |= (1 << mios32_lcd_device); // initialize LCD - MIOS32_BOARD_J15_DataSet(0x38); + MIOS32_BOARD_J15_DataSet(0x28); // 4-bit mode MIOS32_BOARD_J15_RS_Set(0); MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 1); MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 0); @@ -110,7 +110,7 @@ MIOS32_LCD_CursorMapSet(cursor_map); #endif - APP_LCD_Cmd(0x38); // experience from PIC based MIOS: without these lines + APP_LCD_Cmd(0x28); // 4-bit mode... experience from PIC based MIOS: without these lines APP_LCD_Cmd(0x0c); // the LCD won't work correctly after a second APP_LCD_Init return (display_available & (1 << mios32_lcd_device)) ? 0 : -1; // return -1 if display not available @@ -136,10 +136,30 @@ } // write data - MIOS32_BOARD_J15_DataSet(data); + u8 t = data; + t &= 0xf0; + MIOS32_BOARD_J15_DataSet(t); // high nibble MIOS32_BOARD_J15_RS_Set(1); + MIOS32_BOARD_J15_RW_Set(0); MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 1); +#ifdef MIOS32_DONT_USE_DELAY + for(int delay=0; delay<250; ++delay) MIOS32_BOARD_J15_RW_Set(0); // ca. 250 uS Delay +#else + MIOS32_DELAY_Wait_uS(250); // exact 250 uS delay +#endif MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 0); + + t = data << 4; // low nibble + MIOS32_BOARD_J15_DataSet(t); // high nibble + MIOS32_BOARD_J15_RS_Set(1); + MIOS32_BOARD_J15_RW_Set(0); + MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 1); +#ifdef MIOS32_DONT_USE_DELAY + for(int delay=0; delay<250; ++delay) MIOS32_BOARD_J15_RW_Set(0); // ca. 250 uS Delay +#else + MIOS32_DELAY_Wait_uS(250); // exact 250 uS delay +#endif + MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 0); return 0; // no error } @@ -163,12 +183,33 @@ return -2; // timeout } - // write command - MIOS32_BOARD_J15_DataSet(cmd); + // write data + u8 t = cmd; + t &= 0xf0; + MIOS32_BOARD_J15_DataSet(t); // high nibble MIOS32_BOARD_J15_RS_Set(0); + MIOS32_BOARD_J15_RW_Set(0); MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 1); +#ifdef MIOS32_DONT_USE_DELAY + for(int delay=0; delay<250; ++delay) MIOS32_BOARD_J15_RW_Set(0); // ca. 250 uS Delay +#else + MIOS32_DELAY_Wait_uS(250); // exact 250 uS delay +#endif MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 0); + + t = cmd << 4; // low nibble + MIOS32_BOARD_J15_DataSet(t); // high nibble + MIOS32_BOARD_J15_RS_Set(0); + MIOS32_BOARD_J15_RW_Set(0); + MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 1); +#ifdef MIOS32_DONT_USE_DELAY + for(int delay=0; delay<250; ++delay) MIOS32_BOARD_J15_RW_Set(0); // ca. 250 uS Delay +#else + MIOS32_DELAY_Wait_uS(250); // exact 250 uS delay +#endif + MIOS32_BOARD_J15_E_Set(mios32_lcd_device, 0); + return 0; // no error } Good luck and happy holidays! :-) Many greets, Peter Quote Link to comment Share on other sites More sharing options...
Carsten Posted December 18, 2018 Author Report Share Posted December 18, 2018 Thank you Peter for answer and for claryfying this, i think i´m in the right direction regarding that changes. My toolchain on mac should be workin since i get a flashable output which i can comand thru MIOS console but not with fronpanel. Do i have to tell the fresh build softwarefile that it should look for a HW file or is that a standard routine? The combination mios studio and core is very invitable. Best Carsten Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted December 20, 2018 Report Share Posted December 20, 2018 Hi Carsten, the sequencer automatically loads the MBSEQ_HW.V4 file at startup - and the file must be existent in the root directory of your SD card. You should be able to browse the SD card from MIOS Studio even without working displays, then you should see the file in the root directory (this makes sure that your SD card access works) and should also be able to edit in from within the filebrowser, if changes are required. You should be able to get your frontpanel working without displays this way, too. If you have a wilba frontpanel look in the wilba directory and download a MBSEQ_HW.V4 from here: http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fsequencers%2Fmidibox_seq_v4%2Fhwcfg%2F Many greets, Peter Quote Link to comment Share on other sites More sharing options...
Carsten Posted December 30, 2018 Author Report Share Posted December 30, 2018 (edited) Hello Peter, thank you again for your time! I stumbled across this post: http://midibox.org/forums/topic/19286-solved-cant-make-two-oled-lcds-working-together/ and realised that the text scramblin and behavior is similar to that of the VFD´s. TK mentions a CLCD_PP display mode. It took a little time to trail and error this Futaba VFD ( M402SD10 ) problem and i solved it. There are no changes in the app_lcd required. It needs 1 Diode hardware wise and the undocumented lcd_type 0x02 in the bootloader. Made all changes back and forth to verify this, it works right away and is repeatable. Although me can´t explain the workin mechanism behind it like TK could but i want to document what i did: flashed the bootloader and set the LCD type via: set lcd_type to 0x02 (?push/pull mode?, not documented in bootloader v1_018 help), than i added a diode on J15_S from 5V to lcd VDD to lower that (thanks @norbim1 for the suggestion). After flashin seq_v4_094b the sequenzer boots with full screen and boot logo without any scrambling. Now i can move on and integrate the CV AOUT and put this badboy in to a case. Edited December 30, 2018 by Carsten Quote Link to comment Share on other sites More sharing options...
Antichambre Posted December 30, 2018 Report Share Posted December 30, 2018 @Carsten If you need blue filter film like that, I've got it somewhere here. I can send to you... Best regards Bruno Quote Link to comment Share on other sites More sharing options...
Carsten Posted December 30, 2018 Author Report Share Posted December 30, 2018 Thank you for your kind offer Bruno. But i like to go with the green scheme. And indeed i´ve being thinkerin where to get green film. Quote Link to comment Share on other sites More sharing options...
Antichambre Posted December 30, 2018 Report Share Posted December 30, 2018 Of course everything else is green ;) Maybe better to make some test, lee filters can provide a sampler book for free. You just have to ask them: https://leefilters.uservoice.com/knowledgebase/articles/75181-where-can-i-get-a-swatch And their product are easy to find in any Audiovisual Pro web shop. They are made for studio lighting. You will be able to find the perfect one for your taste, or the most adapted one. Best Bruno Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted December 31, 2018 Report Share Posted December 31, 2018 @Carsten well done, looking very good! Also thanks for documenting it, this will be helpful for people installing similar displays and experiencing the same problems! Have a good end-of-the-year and many greets, Peter 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.