Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

MO GPOs on at start/exit

General discussion about LCD Smartie.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351

Post Reply
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

MO GPOs on at start/exit

Post by ch424 »

Hi guys

It seems that Smartie turns on GPO 5 at startup and on exiting smartie. I've noticed this because I have a buzzer connected to GPO5 and it drives me insane.... I get it to turn off by having
$Chr(254)W$Chr(5)
on the first screen. Is there a better way around this, and how do I make smartie not turn it on on exit?

Would it be possible to add configureable GPO default states in the next/upcoming release/s?

Thanks for any info/help!

ch424
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

Check your actions...
Is there any suspicious command ? :o
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Post by ch424 »

Not that I can see. I just have:
$ScreenChanged = 1 then $dll(menu,8,0,0)
$MObutton(S) = 1 then $dll(menu,7,GotoScreen(9),$dll(menu,9,s,0))
$MObutton(A) = 1 then $dll(menu,9,p,WALastTrack)
$MObutton(B) = 1 then $dll(menu,9,n,WANextTrack)

Happens on two different computers, both running version 5.3.2.17, with config files built up independently.

Does it not do the same on your MO display?

ch424
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

Ch, I recently debugged what smartie sends as GPOs. I hooked a computer up to view the code smartie sends down. There is no command that would turn on GPO 5.

J
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Post by ch424 »

Aha, thanks. Do you have the complete list please? Then I can see where my bug is.

Oh, I'm the full ch424 btw :D I can't remeber where it came from, but it's the whole thing! ;)

ch424
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

Oh..... sorry. I dont have the debugging commands from smartie. They were on my old computer that is now in the trash.

J
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Post by ch424 »

OK, I've just attached smartie to another computer and it definately sends 254,86,1 then 254,86,2 all the way up to 254,86,8

So repeat my original question, is there a better way around this than my fix?

Thanks for any help,

ch424
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

This is reposted from mattcr0:
*turn off each GPO (8x command 86)
*turn off block cursor (84)
*clear display (88)
*underline cursor off (75)
*auto scroll off (82)
*autowrap off (68)
*auto transmit keypresses on (65)
*auto repeat keypress mode off (96)
*backlight on forever (66,0)
*contrast to {whatever you set in the MO control dialog} (80,x)
*backlight brightness to {whatever you set in the MO control dialog} (152,x)
*set custom char 1 to degrees symbol (78)
*set custom chars 2-4 to bargraph symbols (3x 78)
*set custom chars 3-8 to blank (4x 78)
The 86 command turns all the gpo's off not on.

J
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

Yup, Smartie turns all GPOs OFF at startup and at shutdown. I've just been analysing the serial output for other reasons.

Command 86 (ie "V") turns GPOs OFF
Command 87 (ie "W") turns GPOs ON

Note that OFF means that the GPO pin floats, ie it is neither pulled low nor pulled high - it goes to a high-impedance state. When turned ON, GPO pins are pulled low.

Depending on how the buzzer is connected, it could possibly activate when the GPO pin floats. I suspect you may have connected the buzzer incorrectly. Buzzer (+) should go to +5V, and buzzer (-) should connect to the GPO pin. Check the Matrix Orbital LCD manual for details of how to wire LEDs, buzzers etc to the GPOs.

Matt.
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Post by ch424 »

Arrggg! Brilliant! Thanks people, I just read the datasheet wrong! Duh!

I'll fix it tomorrow. Would the developers consider making this configurable? If you're gonna have fans on the GPOs, it'd be nice to have them running when smartie quits, rather than all switching off and things getting toasty ;)

Thanks again

ch424
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

Ch424, have you thought of incorporating a Temp sensor so it could run independantly of smartie if you want it to?

Just a thought.

J
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Post by ch424 »

Cheers J, yes I had thought of it but I decided I could do that as a stand-alone project instead of integrating it into this -- it seemed a bit too much effort considering that smartie can read MBM anyway.

However, I am seriously considering adding a new function for PWM fan control, so with a plugin smartie could send a PWM value to the LCD, which it could store in EEPROM and keep running even before and after smartie had quit...

Perhaps in the form
254,102,[gpo],[8bit pwm value]
or
254,102,[gpo],[% value]
or
254,102,[gpo],[value 0-255]

Any thoughts on that?

ch424
_X7JAY7X_
Hardware Genie - Plugin Author
Posts: 374
Joined: February 16th, 2005, 10:24 pm
Location: Michigan

Post by _X7JAY7X_ »

Are you using the PWM pin or are you making an output pin PWM? The % would be the best I think, then the fan would be a speed from 0 - 100. Why are you setting a value in the eeprom? Do you want the fan to turn on whenever the lcd is powered, not neccessarily ever connected to smartie.

J
ch424
Posts: 30
Joined: March 21st, 2006, 6:43 pm
Location: Oxford, UK

Post by ch424 »

Added it the % way. Works right down to 20% on the coolermaster fan I'm testing with. Couldn't be bothererd to look up how to do eeprom with C, so I've just made it default to 100%.

Schematics and stuff coming soon, I promise!

ch424
Zuke
Posts: 3
Joined: February 10th, 2006, 8:45 pm

Post by Zuke »

Very sorry to resurrect a dead topic, but it looks like this maybe helpful for my other topic.
Quote:
*turn off each GPO (8x command 86)
*turn off block cursor (84)
*clear display (88)
*underline cursor off (75)
*auto scroll off (82)
*autowrap off (68)
*auto transmit keypresses on (65)
*auto repeat keypress mode off (96)
*backlight on forever (66,0)
*contrast to {whatever you set in the MO control dialog} (80,x)
*backlight brightness to {whatever you set in the MO control dialog} (152,x)
*set custom char 1 to degrees symbol (78)
*set custom chars 2-4 to bargraph symbols (3x 78)
*set custom chars 3-8 to blank (4x 78)
Is this in the config? Could I tell it to turn ON the GPOs on start? Mine shut off the fans whenever LCD SMartie starts up![/quote]
Post Reply