MSX real time clock chip

بواسطة PingPong

Prophet (3549)

صورة PingPong

30-07-2010, 15:56

MSX2 and later features a clockchip alarm function. How can be used for?
Does this function send an interrupt to CPU when alarm fire up?

Login أوregister لوضع تعليقاتك

بواسطة Hrothgar

Champion (479)

صورة Hrothgar

30-07-2010, 20:54

I never understood the use of this feature. You can do something like this in BASIC:

10 set time"20:00:55":set time"20:01:00",a
20 on interval=50 gosub 40:interval on
30 goto 30
40 get time t$:get time ta$,a:?t$,ta$
50 if t$>=ta$ then gosub 70
60 return
70 play "s14m25t150o6f6r6f6","s14m25t150o2c6r6f6","s14m25t150o4d6r6d6":return

I wouldn't know what an interrupt should call though. As far as I see it's just a stored variable that you have to query manually.

What are the chances anybody ever set up his MSX next to his bed and left it running to wake him the next morning at 07:00 with such a BASIC program? IMHO these few bytes were better spent storing a few extra sprite registers in the MSX2 mode Crazy

بواسطة Sonic_aka_T

Enlighted (4130)

صورة Sonic_aka_T

30-07-2010, 21:06

No, there's no interrupt, but one of the pins on the PSG does go high IIRC. I think you could hook up a LED or a relay to turn on your coffee maker back in the days... Wink

بواسطة Sonic_aka_T

Enlighted (4130)

صورة Sonic_aka_T

30-07-2010, 21:07

What are the chances anybody ever set up his MSX next to his bed and left it running to wake him the next morning at 07:00 with such a BASIC program? IMHO these few bytes were better spent storing a few extra sprite registers in the MSX2 mode CrazyActually, my MSX served as my alarm clock for many many years! Big smile

بواسطة PingPong

Prophet (3549)

صورة PingPong

31-07-2010, 00:42

Umh, checking the datasheet, i see that the alarm pin is not an interrupt pin, only a 16 or 1 Hz square wave generator. Probably this is a not- connected-to-anywhere pin

بواسطة NYYRIKKI

Enlighted (5590)

صورة NYYRIKKI

31-07-2010, 22:02

No, the alarm pin is not in use on MSX.

... but now that you mentioned it, maybe I could hook this pin & MSX mainboard to ACPI compiant powersupply and put some music disk in to floppy drive... this way I could wake up every morning together with my MSX. Eek!

بواسطة NYYRIKKI

Enlighted (5590)

صورة NYYRIKKI

31-07-2010, 22:15

i see that the alarm pin is not an interrupt pin, only a 16 or 1 Hz square wave generator.

Actually you can select what you want to output from this pin by software... There are 3 possibilitys: 1Hz, 16Hz or ALARM signal... (controlled by registers #D & #F)

بواسطة PingPong

Prophet (3549)

صورة PingPong

01-08-2010, 00:40

i see that the alarm pin is not an interrupt pin, only a 16 or 1 Hz square wave generator.

Actually you can select what you want to output from this pin by software... There are 3 possibilitys: 1Hz, 16Hz or ALARM signal... (controlled by registers #D & #F)

Just asked because of my secret hope..... the ability to use the clock chip has a high resolution timer to drive via interrupt the z80. But no hope. Tongue