Jump to content
Electronics-Lab.com Community

The PIC & The ATX PSU


FH16

Recommended Posts

Here it is the simplified way to turn on an ATX PSU, If you jumper the pin13 and pin 14 the PSU will turn on.
For this purpose I use an MCU from Microchip the famous PIC16F84A (PIC16F84A-04/P).

The schematic

JP2 = Pin9 from PSU
JP3 = Pin7 form PSU
JP4 = Pin14 from PSU

The Source Code

'****************************************************************
'* Name : atxpsu.BAS              *
'* Author : vilias Iliadis Ilias              *
'* Notice : Copyright © 2004 vilias              *
'* : All Rights Reserved              *
'* Date : 16/12/2004              *
'* Version : 1.0              *
'* Notes : for any uptade please e-mail me [email protected]        *
'* :                 *
'****************************************************************

temp var byte
b2 var byte
b2=0
trisa = 0
trisb = 1
porta.0 = 1
porta.1 = 0
porta.2 = 0

main:
BUTTON PORTB.1,1,0,0,B2,1,pressed
goto main

pressed:

      temp = porta.0
      porta.0 = porta.1
      porta.1 = temp
      porta.2 = porta.1

goto main

The question
Now I

post-4285-14279142007811_thumb.gif

Link to comment
Share on other sites


Neat!

A few things worth noting...

Pin 9 is +5VSB. This pin supplies +5v so long as the mains power is connected -- even if the machine is powered down. Well, unless you turn off that switch on the back of the PSU, that is. (You apparently know this; I'm just clarifying for the benefit of others.)

Your software could easily be modified to 'press' the power button on startup. With normal ATX machines, if the power goes out, the machine will not come back on when the power comes back, making them unsuitable for things like servers. With this modification, the machine will come right back to life as soon as power is restored. Some motherboards have this feature in their BIOS setup, but not all of them. Indeed, you could easily add a switch which controls whether this feature is active or not.

As for your idea for monitoring the voltages, what you'll need is an analogue-to-digital converter (ADC). Some versions of the PIC chip have ADC inputs built in, but the 16F84 isn't one of them. You can still use it if you get an outboard ADC and connect it to the PIC. Check especially the websites of Texas Instruments, Maxim, and Analog Devices, all of which manufacture many chips suitable for this purpose.

Keep in mind that for all but the 3.3v rail, you will need to use a voltage divider to scale the voltage to the point where it's within the 0-5v range of most ADCs. That's not very difficult, though. (Yes, it's a good idea to scale the 5v rail, too, since if the output is high, it could quite easily go above the 5v upper limit of the ADC.)

As for adding the LCD display, there are plenty of resources available on the web which explain how to do this. With all of the features you're planning on adding, though, you may find yourself running out of I/O pins. There are ways to use a serial shift register like the 74HC164 to reduce the number of I/O pins you'll need to attach the LCD.

Link to comment
Share on other sites

Thank you sec, but I just want to use an old ATX PSU as standart stabilized psu with an lcd (or led display) for reading the voltage's from the psu.
I can connect an lcd on the pic, i can take the voltage's from the psu but I can't write the code, i m not good programmer and i need help for it.
Thanks again and sorry for my bad English once more.

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...
×
  • Create New...