mess Posted November 2, 2006 Report Share Posted November 2, 2006 Hi,I tried out this mod today and it works :-)There was a problem with the switching becausethe backlight got it's power from the lcd power supplyAfter I removed the resistors on the lcd everything worked OKI also fixed a small software bug, the backlight wasn't switched on at startupthe new version is available here:http://webs.hogent.be/~032573mh/lcd_standby061102.zipMaybe we should make a seperate board for thisso that no traces need to be cut on the core pcb (like I did ::))Michaël Quote Link to comment Share on other sites More sharing options...
Artesia Posted November 2, 2006 Report Share Posted November 2, 2006 Maybe if approved, these little features could be added to the offical board & firmware releases ?Otherwise if lots of little, but universally useful tweaks and addons are available... but not in the main MIOS pallete.. it will be a nightmare making sure you remember to use the right bits & add the right code chunks to have your features available. Quote Link to comment Share on other sites More sharing options...
mess Posted November 2, 2006 Report Share Posted November 2, 2006 I can see the advantages of implementing this in MIOS:lower overhead, official support...The problem is that it is difficult to provide a generic solution for this...Most pins of the core are allready allocated for the official applicationsI don't think that TK will reserve a µC pin for this simple feature also it could confuse newbies if their display would turn offwithout knowing what happened...I will add some pictures of the mod,any suggestions for the documentation are appreciated...Michaël Quote Link to comment Share on other sites More sharing options...
Artesia Posted November 2, 2006 Report Share Posted November 2, 2006 indeed.. well if all the official i/o's are accounted for, then provide it as a 'option #b' function which can be enabled by changing a flag in the firmware.as for hardware, adding the circuit modifycation as a wire jumper patch or two.. which are routed normally for standard opperation.. or diverted for extended function ..wouldnt confuse things too much ..it could be made to look just like another one of the mandatory wire links, which are already present on the board. Quote Link to comment Share on other sites More sharing options...
dcer10 Posted November 3, 2006 Author Report Share Posted November 3, 2006 I would love to see this become a part of the official PCB and MIOS release, I think its not really going to be that confusing to have it as an option for people. Perhaps it could be that it needs a seperate pcb for the pin problem, and that this little add on module can simply be turned on or off in the application code? I think that TK needs to be involved in this discussion to really say if its got a future officially or if this will land up as something people need to hunt down from this topic??In any case, I like it an will be doing it as soon as someone publishes the modification to the PCB and the associated code inserted into MIOS :) Who is best suited to do that? BTW, I really like moebius's suggestion of the fade out, that would be awesome to see!!Any testing needed? (Hand up in anticipation)All the best,John Quote Link to comment Share on other sites More sharing options...
Artesia Posted November 3, 2006 Report Share Posted November 3, 2006 yes & yes pwm fade out would be sweet :) Quote Link to comment Share on other sites More sharing options...
mess Posted November 3, 2006 Report Share Posted November 3, 2006 I've made some pictures of the core pcb mod:!!!! make sure that your backlight doesn't light when you disconnect the backlight connections, if the display still works when disconnecting these pinsyou will have to mod the lcd, I will post more on this later !!!!#1 Cut two traces to isolate the trimpot from Vcc:#2 Bypass the connections to the trimpot#3 Connect the trimpot to J14 of the core (see the core schematic for the pin numberI will look into the PWM later :)Michaël Quote Link to comment Share on other sites More sharing options...
dcer10 Posted November 3, 2006 Author Report Share Posted November 3, 2006 Thats cool :} Great pictures too!So this will work with the app you posted?Im keen to try it as soon as my new PCBs arrive!What would be the process of adding this to an existing app or mios itself?All the best,John Quote Link to comment Share on other sites More sharing options...
mess Posted November 3, 2006 Report Share Posted November 3, 2006 So this will work with the app you posted?Yup, it works just fine :)make sure to use the latest version, the older one didn't initialise the backlight on startupWhat would be the process of adding this to an existing app or mios itself?It would depent on the application: If it's a user C application you could add the linesfrom the example project and it should workIf you want to add this to an existing application like MBSEQ it would be a more difficultthe code should be translated in ASM and you should be sure that the code doesn't conflictwith the application code (use of J14)I could rewrite this in ASM if necessary, let me knowI wouldn't want to modify MIOS myself, because every time a new release comes out,the release should be modified for the backlight codeIf you really want this you should ask TK...Michaël Quote Link to comment Share on other sites More sharing options...
dcer10 Posted November 6, 2006 Author Report Share Posted November 6, 2006 Hiya mess,I'd be keen once I get my new boards to try it out on one. If you would like to modify some apps for testing Id appreciate it. How does it handle waking up? First input is ignored and sets the screen on, second input normal? I was thinking a good one perhaps would be the midimon which Im going to build soon as I'd like to just leave it on, so in that case I would see the screen only when I want and perhaps have a 10-15min setting for the lcd to sleep??If that goes well I'd like it in all the apps I use, but I would probably want different settings in respect to the delay before sleep on all of them ie on the SID, a much longer time.Would it be easy for me to upgrade applications or mios in the future bearing in mind I cant code to save my life?All the best,John Quote Link to comment Share on other sites More sharing options...
mess Posted November 6, 2006 Report Share Posted November 6, 2006 How does it handle waking up? First input is ignored and sets the screen on, second input normal? If you look at the code there's a routine called init()this is called after MIOS is running, before program executionin this routine the display is turned onafter that the application is started with a counter that increments every millisecondif the counter is not reset before the counter reaches it's max value the display is turned offwhen a control is moved the display is turned on again and the counter starts again from 0have a 10-15min setting for the lcd to sleep??I've just compiled a new version that can handle such long delay times,you can change the delay time in main.h, there's a constant named IDLE_TIMEthe delay time is IDLE_TIME * 256mSso it's possible to adjust this for the applicationIf you would like to modify some apps for testing Id appreciate itI will look into translating the code into assembler this week,it's impossible for me to tell wich applications will work with this.This is my first asm hacking so we will have to see...the standby code works already nicely with my DSEQ32 project ;D Quote Link to comment Share on other sites More sharing options...
stryd_one Posted November 6, 2006 Report Share Posted November 6, 2006 Lemme know if you need a hand with the ASM port mess. I reckon you'll be right though - here's a hint - write in C, compile, and look at the output, and steal :) heheh Quote Link to comment Share on other sites More sharing options...
dcer10 Posted November 6, 2006 Author Report Share Posted November 6, 2006 Hiya mess,I am forever impressed with the enthusiasm displayed by people such as yourself in this community to help others and expand the project and their abilities, my hat is off to you sir!!!If you do get the ASM code working, would it be soemthing a non programmer could then move into other applications? Im interested in this being a standard feature on all of my midiboxes should it all work out. Also I was thinking, would this mean that a core without your code already uploaded would not be able to use the LCD at all? Im only thinking of initial code uploads. I have another core so its not a big deal, but maybe someone doing their first core might get confused :}Another potential thing to think about would be the ability to turn this feature off in the asm or in a menu if possible {the asm would be easier yes??}.Also, would the PWM aspect for fade out {not in} be possible to get working or too hard? That would be something to see!Let me know how you are going with it all, no matter how long it takes. My cores should be here in the next couple of weeks so Ill be ready for a full test then.PS: I had a look at your DSEQ32 project in the wiki and it looked awesome!Keep up the good work!!!!All the best,John Quote Link to comment Share on other sites More sharing options...
stryd_one Posted November 6, 2006 Report Share Posted November 6, 2006 would it be soemthing a non programmer could then move into other applications?Cut'n'Paste :) Quote Link to comment Share on other sites More sharing options...
mess Posted November 6, 2006 Report Share Posted November 6, 2006 @StrydLemme know if you need a hand with the ASM port mess. I reckon you'll be right though - here's a hint - write in C, compile, and look at the output, and stealI really should work on my ASM skills, I understand what's going on but to write it from scratch :(If you want to give it a try here's the C code: if (app_flags.IDLE) { if (idle_counter==0) { idle_counter = IDLE_TIME; //turn off display MIOS_LCD_Cmd(LCD_OFF); app_flags.LCD_DISABLE = 1; //turn off backlight PORTDbits.RD4 = 0; } //GP counter is incremented every mS if (!MIOS_GPCounterGet()) { idle_counter--; } } else { //only enable if display was disabled if (app_flags.LCD_DISABLE) { //turn on display (with cursor) MIOS_LCD_Cmd(LCD_ON_CURSOR); app_flags.LCD_DISABLE = 0; //turn on backlight PORTDbits.RD4 = 1; } //reload counter, turn IDLE flag back on idle_counter = IDLE_TIME; app_flags.IDLE = 1; } I will PM you the asm output@dcer10If you do get the ASM code working, would it be soemthing a non programmer could then move into other applications? Im interested in this being a standard feature on all of my midiboxes should it all work out. Also I was thinking, would this mean that a core without your code already uploaded would not be able to use the LCD at all? Im only thinking of initial code uploads. I have another core so its not a big deal, but maybe someone doing their first core might get confused :}If you upload unmodified firmware to a modified core the lcd will work but the backlight won't...It's just a few lines of code the switch it on if you don't use the standby featureAnother potential thing to think about would be the ability to turn this feature off in the asm or in a menu if possible {the asm would be easier yes??}.Turning this feature on/off in code at compile-time should be no problem.It could be done in a menu but this would require more effort the modify the CS codeAlso, would the PWM aspect for fade out {not in} be possible to get working or too hard? That would be something to see!I don't know how a software PWM is going to affect performance... I will look into it after we get the standby working without fadeout... PS: I had a look at your DSEQ32 project in the wiki and it looked awesome!Thanks, projects like this one are the perfect distraction when I'm stuck with the seq :-)Michaël 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.