Welcome, Guest. Please login or register.

Author Topic: A1200 RTC Alarm under WB3.0  (Read 2235 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline HodgkinsonTopic starter

  • Hero Member
  • *****
  • Join Date: Apr 2006
  • Posts: 1080
    • Show only replies by Hodgkinson
    • http://www.myspace.com/em_radiation *****and ***** www.booni.info
A1200 RTC Alarm under WB3.0
« on: December 01, 2007, 06:02:39 PM »
Hi folks,
I’m tinkering with the idea of using the "ALARM" output pin from the RTC IC in my A1200 to shut down a to-be-added ATX PSU. Does anyone know whether setting the alarm in the clock in WB actually sets the time on the RTC IC itself, or does the system just compare the RTC time to the set alarm time? On a more practical note, does having the alarm turned off in WB also turn the alarm off on the RTC IC (Heh, if it didn’t the system might start doing some of XP's tricks...)?

The idea is that I could then set the A1200 to shut itself down at a set time (Wouldn't that be cool...?), and, perhaps, with a little program to set the alarm time to the clock time, turn the A1200 off via software.
Having all the serial, parallel, expansion, and clock ports occupied means I can't just write to a port, I’ve got to steal a unused output from elsewhere...

Comments appreciated,
Hodgkinson.

PS. Does anyone use a "Head-park" program for their HDD prior to cutting the power? Is it recommended or is it unnecessary? Or, as I've been reading, does it depend on whether the HDD platter arm swings by itself in the non-data area of the disk when power is removed?
Main A1200D: WB3.0, 3.1 ROMs, 2GB HDD, Blizzard 1230IV (64MB RAM + FPU) and a whole load of custom heatsinks... :flame:
 

Offline adolescent

  • Hero Member
  • *****
  • Join Date: Sep 2003
  • Posts: 3056
    • Show only replies by adolescent
Re: A1200 RTC Alarm under WB3.0
« Reply #1 on: December 01, 2007, 06:10:02 PM »
What about the floppy port?  The programs on Aminet use the SEL2 line of the external floppy port.  

I've never used a head parking program on any computer.  
Time to move on.  Bye Amiga.org.  :(
 

Offline HodgkinsonTopic starter

  • Hero Member
  • *****
  • Join Date: Apr 2006
  • Posts: 1080
    • Show only replies by Hodgkinson
    • http://www.myspace.com/em_radiation *****and ***** www.booni.info
Re: A1200 RTC Alarm under WB3.0
« Reply #2 on: December 01, 2007, 06:12:42 PM »
Actually, yeah, thats the one port im not using, and I doubt i'd manage to lay my hands on enough external drives to get to that point before I go to Uni next year. Programs on Aminet? Any suggestions which ones?

Thanks,
Hodgkinson.
Main A1200D: WB3.0, 3.1 ROMs, 2GB HDD, Blizzard 1230IV (64MB RAM + FPU) and a whole load of custom heatsinks... :flame:
 

Offline LoadWB

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
    • Show only replies by LoadWB
Re: A1200 RTC Alarm under WB3.0
« Reply #3 on: December 01, 2007, 06:32:40 PM »
I was under the impression that modern drives park the heads automatically, a result of using voice coil actuators.

WD Caviars do, at least.
 

Offline HodgkinsonTopic starter

  • Hero Member
  • *****
  • Join Date: Apr 2006
  • Posts: 1080
    • Show only replies by Hodgkinson
    • http://www.myspace.com/em_radiation *****and ***** www.booni.info
Re: A1200 RTC Alarm under WB3.0
« Reply #4 on: December 01, 2007, 06:37:48 PM »
A ~200MB 3.5" drive that I recently took to bits does...Anyone any ideas re IBM laptop drive model number DTNA-22110?
Main A1200D: WB3.0, 3.1 ROMs, 2GB HDD, Blizzard 1230IV (64MB RAM + FPU) and a whole load of custom heatsinks... :flame:
 

Offline rkauer

  • Hero Member
  • *****
  • Join Date: May 2006
  • Posts: 3263
    • Show only replies by rkauer
Re: A1200 RTC Alarm under WB3.0
« Reply #5 on: December 01, 2007, 07:34:27 PM »
 Any true IDE drive have the "auto park" feature. Only ancient RLL drives don't (like those hd founds in pc-xt).
Goodbye people.

I\'ll pop on from time to time, RL is acting up.
 

Offline Castellen

Re: A1200 RTC Alarm under WB3.0
« Reply #6 on: December 01, 2007, 07:50:31 PM »
Regarding the WB clock program, I'm fairly sure it only compares the system time to an alarm time (in memory) and alerts you.  Since the alarm output from the RTC is not used at all, I doubt the clock program sets the hardware alarm.

Programming the RTC is easy enough, the datasheet gives all the register details you need, so it's just a matter of writing a small application to take the alarm time from the user and set the registers accordingly.  You could even do it in Arexx/RexxMUI if you wanted to be lazy.


The interface to the ATX power supply is another question.  I'm not sure of the behaviour of the RTC alarm output.  It's open collector, so will obviously sink any current on the output in alarm state, but no idea how long for.  Not sure how the ATX power supply wants it's "off" signal either.  You might need a transistor or relay to interface the two to avoid logic level clashes or whatever.


As for HDD head parking, if your disk is less than about 20 years old, it'll do this automatically.  Manual head parking for voice coil actuator disks is equally as useful as screensavers for LCD monitors :-)
Unless your HDD is about the same size as a small ocean liner and uses stepper motors to set the head position...
 

Offline A6000

  • Sr. Member
  • ****
  • Join Date: Nov 2007
  • Posts: 443
    • Show only replies by A6000
Re: A1200 RTC Alarm under WB3.0
« Reply #7 on: December 01, 2007, 08:40:02 PM »
One possibility is to use the RTC alarm output to switch the ATX PSU on, switching off could be done by a scheduled task.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: A1200 RTC Alarm under WB3.0
« Reply #8 on: December 01, 2007, 08:48:41 PM »
What exactly is this RTC alarm you're talking about?
 

Offline Castellen

Re: A1200 RTC Alarm under WB3.0
« Reply #9 on: December 01, 2007, 09:59:38 PM »
@Piru
The RP5C01 real time clock has a built in alarm output function (i.e. an alarm clock in hardware).  It just compares the "alarm" time with the current time and activates an output signal if they match.
It's not a feature used by the Amiga.  The output pin is not connected to anything usable by the rest of the system.

@A6000
Yes, that's probably possible as well.  I think the alarm function still operates with the RTC in backup mode.
Not sure why you might want to have your computer start at a particular time, but the possibility is there.
 

Offline HodgkinsonTopic starter

  • Hero Member
  • *****
  • Join Date: Apr 2006
  • Posts: 1080
    • Show only replies by Hodgkinson
    • http://www.myspace.com/em_radiation *****and ***** www.booni.info
Re: A1200 RTC Alarm under WB3.0
« Reply #10 on: December 02, 2007, 07:03:50 PM »
Thanks for the replies.
On the basis of me having absolutely no progamming experiece with Amigas, I think i'll have a look at the floppy drive appoach for turning the system off. Looking the the RTC chip on the Blizzard 1230, actually getting to the IC pins could be a issue.
Oh, re the output, I think it might say somewhere that its a audio tone of some frequency. Wouldn't be too difficult to rectify and smooth the signal and use it to control the ATX PSU, though.

Re the SEL2 line on the external floppy port, im a bit consered with regards to how the system detects which floppy drives are present. Espicially if I decide to add a DF1 to the system. Besides, how come SEL3 wasn't used?

Re HDD's with stepper motors...I did actually take one apart a few years ago...We've still got the platters somewhere as keepsakes...

Hodgkinson.
Main A1200D: WB3.0, 3.1 ROMs, 2GB HDD, Blizzard 1230IV (64MB RAM + FPU) and a whole load of custom heatsinks... :flame: