Jump to content
  • entries
    87
  • comments
    46
  • views
    71,242

Atari Clock & RTC pt.2

k-Pack

743 views

Part 1 ended with the Arduino/RTC/RS232 shield able to send the time and date to the Dell. The next step was to hook the unit up to the 850 and read the data using Bob Term. Once the Baud rate, translation and duplex were set to 9600bps, ASCII and Full, the time and date were updated every second, just like on the Dell.

blogentry-37655-0-08528200-1458326537_thumb.jpg

As I watched the stream of data being printed to the screen I said to myself, "This is going much to smoothly. I bet the RS232 device handler and clock are going to use the same memory." I won the bet.

An AUTORUN.SYS file was created that would load the handler and then the clock. Manually setting the clock with CLOCK2.BAS was successful but got a device not found error when opening a channel to the R: device. Messing around with the AUTORUN file made it possible to open "R1:" but crashed when closing the channel.

A BASIC program was written to print the value of MEMLO to determine the shared memory and find a new location for the clock code.

MEMLO.BAS
10 ? PEEK(743)+(PEEK(744)*256)

A couple of system setups were tested and the following was observed.

MEMLO:
HEX DEC
DOS 2.5 $1CFC 7420
DOS 2.5 and Clock $2340 9024
DOS 2.5 and RS232 $2362 9184



This proved that the clock and RS232 handler were trying to use the same memory from $2200 to $2362 and compiling the clock at $2400 should solve the problem.

At this time I would personally like to thank Jonathan Buckheit for a well written article. The technical information contained in his article from ANTIC 31 was invaluable. I would also like to say a couple of words about ANTIC not including the assembly code listing on that issue's disk, but won't.

The assembly code was typed in, excluding most of the comments using MAC65. It was saved to disk as CLOCK.M65. Several errors in my typing were corrected the first time it was proof read and then two changes were made during the second round of proof reading.

ORIGIN = $2400
DOSII? .BYTE 1 ; because I am using DOS2.5

It compiled to CLOCK.SYS without error (the first time).

Then line 210 of CLOCK2.BAS was change to point to the new location and saved as SETCLOCK.BAS. A boot disk was set up to autorun CLOCK.SYS and then set the time using SETCLOCK.BAS. Success!!!!

The last step was to create an AUTORUN.SYS file to load in the R: handler, load in the clock and then load in the SETCLOCK.BAS to manually set the clock. SETUP.COM from the DOS2.5 disk was used to create an AUTORUN.SYS file to load the RS232 handler and then renamed it LOADRS.SYS. Then another AUTORUN.SYS file to load the basic program SETCLOCK.BAS was created. Renamed that file RUNSETCL.SYS.

The three files were then combined using the DOS copy command.
Copy
LOADRS.SYS,AUTORUN.SYS
COPY
CLOCK.OBJ,AUTORUN.SYS/A
COPY
RUNSETCL.SYS,AUTORUN.SYS/A

It worked. The RS232 loaded, the Clock loaded and the SETCLOCK.BAS loaded. After entering the hours, minutes and seconds, the time was displayed and the seconds incremented. A channel to the "R:" device was open and closed without a lockup.

This .ATR file includes a README.TXT that contains descriptions of the files created for this project(so far).

clock rs.atr

I'm feeling confident that the SETCLOCK.BAS program can be modified to OPEN a channel to the RS232 port and get the time from the RTC. Only when it has been accomplished will I be 100% sure.



0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   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...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...