IOBus - Real time clock

178 views
Skip to first unread message

John Galt

unread,
Jun 4, 2024, 2:13:16 PMJun 4
to Altair-Duino
anyone have the pcb for sale?

i tried to have one made and some how i can't make that happen.

thanks.

Tom Lake

unread,
Jun 4, 2024, 8:04:09 PMJun 4
to Altair-Duino
I'm selling a complete one on eBay but since you're in this group, you can have it for $30.00 + $10.00 s/h instead of $65.00.
I might have a blank board around here somewhere. If I do you could have it for the cost of shipping (about $10.00)
If you're interested, PM me.

John Galt

unread,
Jun 5, 2024, 12:11:55 AMJun 5
to Altair-Duino
sent a PM... I think?

John Galt

unread,
Jun 11, 2024, 12:10:36 PMJun 11
to Altair-Duino
Just wanted to thank Tom again.

Thomas Lake (Tom)

unread,
Jun 11, 2024, 12:23:50 PMJun 11
to John Galt, Altair-Duino
You're certainly welcome! Do you have it working?


From: altair...@googlegroups.com <altair...@googlegroups.com> on behalf of John Galt <furba...@gmail.com>
Sent: Tuesday, June 11, 2024 12:10 PM
To: Altair-Duino <altair...@googlegroups.com>
Subject: Re: IOBus - Real time clock
 
--
You received this message because you are subscribed to a topic in the Google Groups "Altair-Duino" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/altair-duino/MgpI4ruog8U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to altair-duino...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/altair-duino/a4ceff6a-a871-44dc-af17-9ea14b2371ban%40googlegroups.com.

John Galt

unread,
Jun 11, 2024, 12:53:48 PMJun 11
to Altair-Duino
Not yet I'm waiting on the new metal case release. if a new pcb is coming with that unit along with a I/O Bus pcb then i want to be ready to jump :D

 I'm Currently putting together a disk drive unit, have been collecting the parts and outputting the case for it.

John Galt

unread,
Jul 4, 2024, 1:58:27 AMJul 4
to Altair-Duino
have the rtc clock working as of today.
also have the led output register working.

I hooked up the disk drive and i had it trying to access the drive however i ran into an issue with using the monitor and i have no ready to burn disc images.

brian...@gmail.com

unread,
Jul 4, 2024, 3:17:53 PMJul 4
to Altair-Duino
Do you happen to have a blank board still? I'd love to make one of these.

On Tuesday, June 4, 2024 at 8:04:09 PM UTC-4 Tom Lake wrote:

John Galt

unread,
Jul 4, 2024, 8:15:51 PMJul 4
to Altair-Duino
I bought mine from Tom, i think it was his last. he had it fully assembled which was awesome.

Tom Lake

unread,
Jul 5, 2024, 7:14:19 AMJul 5
to Altair-Duino
I'll check and let you know. If not, they're cheap to have made ($2.00 for five boards, + $17.80 for shipping to the USA). I just send the Gerber ZIP file to JLCPCB and they handle the rest.


On Thursday, July 4, 2024 at 3:17:53 PM UTC-4 brian...@gmail.com wrote:

Chris Davis

unread,
Jul 5, 2024, 9:24:24 AMJul 5
to Altair-Duino
Don't ignore the "Global Direct" shipping option.  As low as $1.50!  I still get the boards in 12-14 days.

Screenshot 2024-07-05 at 8.23.18 AM.png

brian...@gmail.com

unread,
Jul 6, 2024, 1:55:56 AMJul 6
to Altair-Duino
I guess that's what I'll do. If you don't mind me asking, where did you source the capacitors, connector, and battery holder from?

John Galt

unread,
Jul 7, 2024, 2:25:30 AMJul 7
to Altair-Duino
This was a interesting fight.

i was programming the RTC using MBASIC and everything would work correctly using the interpreter but
it would go insane when using the bascom complier.

I know from the documentation you have to check the ready status of the RTC in order to get a reading however 
there seems to be a bug in bascom or something because no matter what i did; checking the ready status in the interpreter worked fine but compiling basic lead to things crashing or giving readings that made no sense.

thus after tearing my hair out for a few hours i finally gave up and just put a FOR LOOP as small as possible to allow the RTC to be ready to read data.

I put together 2 simple programs SETTIME which allows you to set the time and the date and day of the week
and a 12H TIME check utility.

TIME.BAS
---------------
10 PM=0

20 ' READ SECONDS
60 OUT 96,129 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
70 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
80 D=INT(D/16)*10+(D AND 15)
90 S=D

100 'READ MINUTES
140 OUT 96,131 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
150 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
160 D=INT(D/16)*10+(D AND 15)
170 M=D

180 'READ HOURS
220 OUT 96,133 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
230 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
240 D=INT(D/16)*10+(D AND 15)
250 H=D

260 'READ DAY
270 OUT 96,135 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
280 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
290 D=INT(D/16)*10+(D AND 15)
300 DAY=D

310 'READ MONTH
320 OUT 96,137 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
330 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
340 D=INT(D/16)*10+(D AND 15)
350 MONTH=D

360 'READ WEEKDAY
370 OUT 96,139 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
380 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
390 D=INT(D/16)*10+(D AND 15)
400 WEEKDAY=D
 
410 IF WEEKDAY=1 THEN WEEKDAY$="Sunday"
420 IF WEEKDAY=2 THEN WEEKDAY$="Monday"
430 IF WEEKDAY=3 THEN WEEKDAY$="Tuesday"
440 IF WEEKDAY=4 THEN WEEKDAY$="Wednesday"
450 IF WEEKDAY=5 THEN WEEKDAY$="Thursday"
460 IF WEEKDAY=6 THEN WEEKDAY$="Friday"
470 IF WEEKDAY=7 THEN WEEKDAY$="Saturday"

480 'READ YEAR
490 OUT 96,141 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
500 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
510 D=INT(D/16)*10+(D AND 15)
520 YEAR=D

530 IF (H>12) THEN H=H-12:PM=1
540 IF (H=12) THEN PM=1
550 IF (H=0) THEN H=12
560 IF (PM=0) THEN PRINT "The current time is: " H":"M":"S" AM"
570 IF (PM=1) THEN PRINT "The current time is: " H":"M":"S" PM"
580 PRINT "The current date is: " WEEKDAY$" "MONTH"/"DAY"/"YEAR
590 END




SETTIME.BAS
----------------------
10 INPUT"Enter current time (24 hour) Hours,Minutes,Seconds)? ",H,M,S
15 INPUT"Enter current MONTH(1-12),DAY(1-31),YEAR(00-99),DAY OF WEEK(1-7) ?",MONTH,DAY,YEAR,WEEKDAY
20 GOSUB 600
30 END
600 REM ------ SET CURRENT TIME TO H:M:S
610 OUT 97,0:OUT 96,142: REM CLEAR WRITE PROTECT BIT
620 OUT 97,128:OUT 96,128:REM STOP CLOCK
630 R=2:D=H:GOSUB 700 ' SET HOURS
640 R=1:D=M:GOSUB 700 ' SET MINUTES
650 R=0:D=S:GOSUB 700 ' SET SECONDS
651 R=3:D=DAY:GOSUB 700 ' SET THE DAY
652 R=4:D=MONTH:GOSUB 700 ' SET THE MONTH
653 R=5:D=WEEKDAY:GOSUB 700 ' SET THE WEEKDAY
654 R=6:D=YEAR:GOSUB 700 ' SET THE YEAR
660 RETURN
700 REM ------ WRITE TO CLOCK REGISTER R
710 OUT 97,INT(D/10)*16+(D MOD 10)
720 OUT 96,128+(R AND 31)*2
730 RETURN


these give you some nice command line utilities similar to MS-DOS.

I'm working on a analog clock but it will use the FABGL ANSI COLOR TERMINAL for display.
i can make one for the GEOFF Terminal later.

John Galt

unread,
Jul 7, 2024, 2:51:30 AMJul 7
to Altair-Duino
Forgot the roll over check for TIME.BAS

255 ' READ SECONDS ROLL OVER CHECK
256 OUT 96,129 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
257 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
258 D=INT(D/16)*10+(D AND 15)
259 IF D<S THEN GOTO 20

John Galt

unread,
Jul 7, 2024, 3:08:43 AMJul 7
to Altair-Duino
if you want to just test the led register blinky lights quick to make sure they work.


BLINK.BAS
------------------
10 ' MAKE THE FRONT LIGHTS BLINK
20 '1,2,4,8,16,32,64,128
30 WHILE INKEY$=""
40 OUT 255,1:GOSUB 300
50 OUT 255,2:GOSUB 300
60 OUT 255,4:GOSUB 300
70 OUT 255,8:GOSUB 300
80 OUT 255,16:GOSUB 300
90 OUT 255,32:GOSUB 300
100 OUT 255,64:GOSUB 300
110 OUT 255,128:GOSUB 300
120 WEND
125 OUT 255,0
130 END
300 FOR I=1 TO 50:NEXT I: RETURN

Thomas Lake

unread,
Jul 7, 2024, 5:45:09 AMJul 7
to brian...@gmail.com, Altair-Duino
I usually use DigiKey and for any parts they don't have, I go to Mouser.


From: altair...@googlegroups.com <altair...@googlegroups.com> on behalf of brian...@gmail.com <brian...@gmail.com>
Sent: Saturday, July 6, 2024 1:55 AM

To: Altair-Duino <altair...@googlegroups.com>
Subject: Re: IOBus - Real time clock
--
You received this message because you are subscribed to a topic in the Google Groups "Altair-Duino" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/altair-duino/MgpI4ruog8U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to altair-duino...@googlegroups.com.

John Galt

unread,
Jul 7, 2024, 1:26:46 PMJul 7
to Altair-Duino
Here is a simple analog clock i made for the RTC backplane

It is easy to modify for different graphics terminals. you can even make a text version.

This is setup to work with the FABGL ANSI Terminal. You need a 4:3 monitor otherwise the clock will appear a little squished.

It will work under MBASIC or you can compile it with BASCOM and it will work smoother.

You can add anything to it, even set an alarm if you want and have it play a song.

I had problems getting things to work with BASCOM as far as checking the seconds 7th bit flag to see if the RTC was ready 
so i fudged it with a for/next loop.

in assembler I'm sure it would work correctly but something was preventing it from working when compiling.

i tried to make the program as easy to follow as possible.

DSCN6081.JPG

with the 3 programs i posted you will have a nice base of utilities for telling time.

CLOCK.BAS
-------------------
10 ' Make a Analog Clock 7/7/2024 FABGL ANSI TERMINAL By John Galt
15 ' SETUP THE GRAPHICS FUNCTIONS FOR THE ANSI TERMINAL
20 DEF FNPEN$(R%, G%, B%) = CHR$(27)+"_GPEN"+STR$(R%)+";"+STR$(G%)+";"+STR$(B%)+"$"
30 DEF FNBRUSH$(R%, G%, B%) = CHR$(27)+"_GBRUSH"+STR$(R%)+";"+STR$(G%)+";"+STR$(B%)+"$"
40 DEF FNPIXEL$(X%, Y%) = CHR$(27)+"_GPIXEL"+STR$(X%)+";"+STR$(Y%)+"$"
50 DEF FNDRAWL$(X1%,Y1%,X2%,Y2%)=CHR$(27)+"_GLINE"+STR$(X1%)+";"+STR$(Y1%)+";"+STR$(X2%)+";"+STR$(Y2%)+"$"
60 DEF FNRECT$(X1%, Y1%, X2%, Y2%) = CHR$(27)+"_GRECT"+STR$(X1%)+";"+STR$(Y1%)+";"+STR$(X2%)+";"+STR$(Y2%)+"$"
70 DEF FNFILLRECT$(X1%, Y1%, X2%, Y2%) = CHR$(27)+"_GFILLRECT"+STR$(X1%)+";"+STR$(Y1%)+";"+STR$(X2%)+";"+STR$(Y2%)+"$"
80 DEF FNELLIPSE$(X%, Y%, W%, H%) = CHR$(27)+"_GELLIPSE"+STR$(X%)+";"+STR$(Y%)+";"+STR$(W%)+";"+STR$(H%)+"$"
90 DEF FNFILLELLIPSE$(X%, Y%, W%, H%) = CHR$(27)+"_GFILLELLIPSE"+STR$(X%)+";"+STR$(Y%)+";"+STR$(W%)+";"+STR$(H%)+"$"
110 DEF FNPATH$(POINTS$) = CHR$(27)+"_GPATH"+POINTS$+"$"
120 DEF FNFILLPATH$(POINTS$) = CHR$(27)+"_GFILLPATH"+POINTS$+"$"
130 DEF FNSCROLL$(X%, Y%) = CHR$(27)+"_GSCROLL"+STR$(X%)+";"+STR$(Y%)+"$"
140 DEF FNCLR$ = CHR$(27)+"_GCLEAR$"
150 DEF FNCURSORON$ = CHR$(27)+"_E1$"
160 DEF FNCURSOROFF$ = CHR$(27)+"_E0$"
170 DEF FNCLRTERM$ = CHR$(27)+"_B$"
175 HOME$=CHR$(27)+"[H"
176 CLS$=CHR$(27)+"[2J"
180 PRINT CLS$;FNCURSOROFF$;FNCLR$;
190 O=0:PIE=3.141592:PM=0
195 ' DRAW THE CLOCK FACE WITH BORDER AND TICKS.
210 X%=256
220 Y%=192
230 W%=170
240 H%=170
250 PRINT FNPEN$(255,255,255);HOME$;
260 PRINT FNELLIPSE$(X%, Y%, W%, H%);HOME$;
310 X%=256
320 Y%=192
330 W%=175
340 H%=175
350 PRINT FNPEN$(255,255,255);HOME$;
360 PRINT FNELLIPSE$(X%, Y%, W%, H%);HOME$;
400 FOR i = 0 TO 60
410 x = COS(i * pie / 30) * 85
420 y = SIN(i * pie / 30) * 85
430 ass = i MOD 5 = 0
440 x1 = x * (.95 + ass * .1)
450 y1 = y * (.95 + ass * .1)
460 'LINE (x + 160, y + 100)-(x1 + 160, y1 + 100)
470 X1%=x + 256
480 Y1%=y + 192
490 X2%=x1 + 256
500 Y2%=y1 + 192
510 PRINT FNPEN$(255,255,255);HOME$;
520 PRINT FNDRAWL$(X1%, Y1%, X2%, Y2%);HOME$;
530 NEXT
550 ' MAIN LOOP START
600 WHILE INKEY$=""
620 GOSUB 7000 ' READ TIME
775 ' DRAW THE SECONDS HAND
780 IF (O <> S) THEN GOTO 5000
790 IF (O=S) THEN GOTO 6000
800 X = COS(r) * 70
810 Y = SIN(r) * 70
830 X1%=256
840 Y1%=192
850 X2%=X+256
860 Y2%=Y+192
866 PRINT FNPEN$(0,0,0);HOME$;FNDRAWL$(PREVSECX1%, PREVSECY1%, PREVSECX2%, PREVSECY2%);HOME$; 'ERASE
880 PRINT FNPEN$(255,0,0);HOME$;FNDRAWL$(X1%, Y1%, X2%, Y2%);HOME$; 'REDRAW
882 PREVSECX1%=X1%
883 PREVSECY1%=Y1%
884 PREVSECX2%=X2%
885 PREVSECY2%=Y2%
886'DRAW THE MINUTES HAND
890 x = COS((M * 2 + S / 30 - 30) * pie / 60) * 60
900 y = SIN((M * 2 + S / 30 - 30) * pie / 60) * 60
920 X1%=256
930 Y1%=192
940 X2%=X+256
950 Y2%=Y+192
969 PRINT FNPEN$(0,0,0);HOME$;FNDRAWL$(PREVMINX1%, PREVMINY1%, PREVMINX2%, PREVMINY2%);HOME$; 'ERASE
970 PRINT FNPEN$(255,255,255);HOME$;FNDRAWL$(X1%, Y1%, X2%, Y2%);HOME$; 'REDRAW
976 PREVMINX1%=X1%
977 PREVMINY1%=Y1%
978 PREVMINX2%=X2%
979 PREVMINY2%=Y2%
980 ' DRAW THE HOURS HAND
982 x = COS((H * 10 + M * 4 / 30 - 30) * pie / 60) * 40
990 y = SIN((H * 10 + M * 4 / 30 - 30) * pie / 60) * 40
1010 X1%=256
1020 Y1%=192
1030 X2%=X+256
1040 Y2%=Y+192
1055 PRINT FNPEN$(0,0,0);HOME$;FNDRAWL$(PREVHORX1%, PREVHORY1%, PREVHORX2%, PREVHORY2%);HOME$; 'ERASE
1060 PRINT FNPEN$(255,255,255);HOME$;FNDRAWL$(X1%, Y1%, X2%, Y2%);HOME$; 'REDRAW
1071 PREVHORX1%=X1%
1072 PREVHORY1%=Y1%
1073 PREVHORX2%=X2%
1074 PREVHORY2%=Y2%
1080 ' REDRAW THE CENTER HUB MOVE THIS TO AFTER THE NEW HOURS, MINUTES, SECONDS IS REDRAWN
1100 X%=256
1200 Y%=192
1210 W%=5
1220 H%=5
1240 PRINT FNPEN$(255,255,255);HOME$;FNELLIPSE$(X%, Y%, W%, H%);HOME$; 'REDRAW
1270 WEND
1280 PRINT FNCLR$;FNCLRTERM$;FNCURSORON$;HOME$;
1300 END
5000 'ADJUST THE ARC OF THE SECONDS HAND TICK AND MINUTES AND HOURS
5010 O=S
5100 R=(S-15)*PIE/30
5150 DD=1
5200 GOTO 800
6000 R=R+.01
6050 DD=0
6100 GOTO 800
7000 ' READ THE TIME FUNCTION
7001 ' READ SECONDS
7010 OUT 96,129 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT CHECKING THE 7TH BIT DID NOT WORK RIGHT
7020 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
7030 D=INT(D/16)*10+(D AND 15)
7040 S=D
7050 'READ MINUTES
7060 OUT 96,131 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT CHECKING THE 7TH BIT DID NOT WORK RIGHT
7070 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
7080 D=INT(D/16)*10+(D AND 15)
7090 M=D
7100 'READ HOURS
7110 OUT 96,133 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT CHECKING THE 7TH BIT DID NOT WORK RIGHT
7120 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
7130 D=INT(D/16)*10+(D AND 15)
7140 H=D
7150 IF (H>12) THEN H=H-12:PM=1
7160 IF (H=12) THEN PM=1
7170 IF (H=0) THEN H=12
7171 ' READ SECONDS AGAIN ROLL OVER CHECK
7172 OUT 96,129 ' DELAY REQUIRED TO KEEP READ FROM FLIPPING OUT
7173 FOR DELAY=O TO 1:NEXT DELAY:D=INP(97)
7174 D=INT(D/16)*10+(D AND 15)
7175 IF D<S THEN GOTO 7000
7180 RETURN

Reply all
Reply to author
Forward
0 new messages