MSX real time clock chip

By PingPong

Prophet (4096)

PingPong's picture

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 or register to post comments

By Hrothgar

Champion (479)

Hrothgar's picture

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

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

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

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

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

By PingPong

Prophet (4096)

PingPong's picture

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

By NYYRIKKI

Enlighted (6033)

NYYRIKKI's picture

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!

By NYYRIKKI

Enlighted (6033)

NYYRIKKI's picture

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)

By PingPong

Prophet (4096)

PingPong's picture

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