Jump to content

LCD Screen Saver


dcer10
 Share

Recommended Posts

Hi,

I tried out this mod today and it works :-)

There was a problem with the switching because

the backlight got it's power from the lcd power supply

After I removed the resistors on the lcd everything worked OK

I also fixed a small software bug, the backlight wasn't switched on at startup

the new version is available here:

http://webs.hogent.be/~032573mh/lcd_standby061102.zip

Maybe we should make a seperate board for this

so that no traces need to be cut on the core pcb (like I did  ::))

Michaël

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 applications

I don't think that TK will reserve a µC pin for this simple feature

also it could confuse newbies if their display would turn off

without knowing what happened...

I will add some pictures of the mod,

any suggestions for the documentation are appreciated...

Michaël

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 pins

you will have to mod the lcd, I will post more on this later !!!!

#1 Cut two traces to isolate the trimpot from Vcc:

display_shutdown1.JPG

#2 Bypass the connections to the trimpot

display_shutdown2.JPG

#3 Connect the trimpot to J14 of the core (see the core schematic for the pin number

display_shutdown3.JPG

I will look into the PWM later  :)

Michaël

Link to comment
Share on other sites

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 startup

What 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 lines

from the example project and it should work

If you want to add this to an existing application like MBSEQ it would be a more difficult

the code should be translated in ASM and you should be sure that the code doesn't conflict

with the application code (use of J14)

I could rewrite this in ASM if necessary, let me know

I wouldn't want to modify MIOS myself, because every time a new release comes out,

the release should be modified for the backlight code

If you really want this you should ask TK...

Michaël

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 execution

in this routine the display is turned on

after that the application is started with a counter that increments every millisecond

if the counter is not reset before the counter reaches it's max value the display is turned off

when a control is moved the display is turned on again and the counter starts again from 0

have 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_TIME

the delay time is IDLE_TIME * 256mS

so it's possible to adjust this for the application

If you would like to modify some apps for testing Id appreciate it

I 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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@Stryd

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

I 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

@dcer10

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 :}

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 feature

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??}.

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 code

Also, 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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...