View Full Version : suspend switch

June 5th, 2003, 10:21 AM
I'm working to build a uirt2a for my htpc with an all-in-one M/B (a Sapphire with A3 ati chipset). On the M/B there is a suspend switch that make the pc in standby mode (suspend to ram); it work great, in 5 sec i have the system power down and 5 sec ready to work. My question is: how can connect the uirt2a to that switch so via remote can control it? i'm null in schematics ecc. ecc. I have to connect the out4 and GND? the same remote code can put the pc in standby mode?
Sorry for my english.

June 6th, 2003, 07:47 PM
normaly you can do this in software - have you tried the power-modi within girder?
if it doesnt work you normally can use the power-switch for it (should be configurable within the bios). then you have to connect the power-switch-outputs to the mainboards.
if these 2 possibilities dont work you can use your solution :-)

as i understood: you have a seperate switch for the suspend facility?
then you can connect for example the - pin of out 3 to the positive pin of the connector of your mainboard (r13 has to be 0 ohm).
if you dont know which of the 2 pins on your mainboard is positive, simply try both - normally nothing happens if you chose the wrong one.

if your board dont pull the contact to ground you may damage your mainboard/uirt - this should not happen - but dont hold me responsible for it :-)

i can have a look at your mobo-docu - post a link to the pdf here

June 7th, 2003, 12:06 PM
Hi Normen,

I would prefer to realize the suspend "by hardware" (if it is possible).

I checked the M/B as you requested: there are 2 separeted pins for the SUSPEND, one is the positive and one is the negative.

Another question: I read in "UIRT2 version A description" (URL http://users.skynet.be/sky50985/Uirt2a.htm) the following sentence:

It also has four buffered output ports wich can be controlled by Girder. They can also be controlled by the PIC directly when Girder is not running or even when the PC is powered down: an IR code can be stored in the PIC and the corresponding output can be pulsed, toggled ,set high or low. This is what we use to power up the PC through WOL or the power button connector. The PC can also be reset by connecting one of these outputs to the reset button.

But I didn't understand if:
1) there are 4 different buffered output BUT it is possible to use ONLY one of these outputs to store the remote IR button code


2) there are 4 different buffered output AND it is possible to use every output for different IR codes (e.g. the 1st for power up, 2nd for power down, 3rd for suspend, 4th for reset). And in this case, it is possible to use the same key (so the same IR code) for suspend/resume? (note that my M/B use the same button for suspend resume the system)

the first time I press the key associated to this IR code (and the system is up, Girder running), the system suspend; what happens if I press the same key again (and the system is suspended)?

Thanks in advance for your help and please excuse my bad english (my teacher always said that I speak english like a spanish cow :-) )


June 8th, 2003, 09:17 PM
this is a little bit tricky

first of all:
the handling of this 4 ports a handled differntly depending wether girder (uirt plugin not executet within girder to be more exactly) is running or not.

girder not running (or pc in power down or uirt-plugin not executet within girder, uirt supplied with standby-voltage from wol-connector e.g.)
you have 4 "programm-slots" - each of them can hold a different ir-code.
an incoming ir-code can execute a set high/low, toggle or pulse
the ir-codes have to be different! what you cant do: use programm-slot-1 to set the output-port 3 to high and the programm-slot 2 to set the output-port 4 to low (for example) with the same ir-code. only the first one will be executet.

girder running
nearly everything is possible (i dont know any limitations) - you can programm the handling within girder.

as i understand your problem:
you have a switch to suspend your mb and to wake it up again.

what you can do:
learn the desired ir-code into programm-slot 1 (can be done with the uirt-girder-plugin) and use this programm-slot 1 to pulse out4 (in the uirt-Plugin its called PortB.2) for 1000 ms.
to do this: start girder, install+enable the uirt-plugin, add a command, mark this new command, choose uirt-driver within the plugin-tab, press settings, press PIC Config... - there you have to learn the code, choose portb.2 , activate pulse, set the pulse/antirepeat to 1000 and after all click on programm flash.
you can delete this command if you want so (it wont be used anymore)
until now its programmed in the flash - if the learned ir-code is received (while girder is NOT running) it will pulse the out 4 (and this will wake up your pc while in standby-mode).

when you want to standby your pc and dont want use girder with the uirt-plugin this is everything you have to do (you can press the same key on your remote to standby your pc).

normally you are running girder with uirt-plugin enabled.
then you have to add a command learn the same ir-code as for startup (another one wont make sense, because its doing exactly the same) and use this for standby.
you have to: add a command, learn the a.m. ir-code to this command, chose uirt-driver within plugins, press settings, under actions choose modify pic port pin, under gpio choose portb.2, choose pulse, set duration to 1000 and press apply.

if you have done this you can press the key on your remote->your pc wakes up. within windows (girder in autostart loading the right gml-file automatically) girder would standby your pc with the same key.
if you press the key while starting windows (so girder is not running) the same thing will happen as you press the switch on your case (depends on you mb).

you have to connect the out 4 to the positive pin of your standby switch. its no problem to use the case-standby-switch and the out 4 simultaniously at this pin.

eventually you can use the power-switch of your pc to wake it up if the startup of windows doesnt satisfy you - what happens if the pc is in standby and you press the power switch on your case? if it wake up correctly it can be better to use this one to wake your pc and the standby-switch for getting him into standby. test it :-)

June 9th, 2003, 01:10 PM
Hi Normen,

thank you very much for response.
I test if the power button wake up the pc after a suspend operation and
say you later.

thanks a lot. :wink:

June 14th, 2003, 04:55 AM
Yes Normen, the system wake-up after a power button press,
so I use sw for putting the system in suspend mode and the hw for wake it up! That's right? :-)

Many thanks

June 18th, 2003, 09:56 AM
i think, thats the best way
your pc will wake up - even if it is not in sleepmode