Amiga.org
Amiga computer related discussion => Amiga Hardware Issues and discussion => Topic started by: motorollin on March 07, 2007, 07:31:37 PM
-
I've found a Serial Interface Real Time Clock Module (http://www.epsontoyocom.co.jp/english/product/rtc_set.html). I'm wondering if there's any way to interface it with the serial port on an Amiga. I might then be able to write a simple Blitz Basic app to read the time and date from the serial port and set the Amiga's clock.
Would anybody have any idea if this is possible?
--
moto
-
Why would you want to? Is your onboard RTC dead? Or does your miggy not have one?
-
The battery on my A4000 was removed before I bought it, and I refuse to put a soldering iron anywhere near it to solder a lithium battery in.
--
moto
-
Right; so your on-board RTC is probably running just fine; you just need something to hold the time for you?
Is the "SAVE" button greyed out in Prefs/Time? If not your RTC is working fine and you only need a battery.
You could ofcourse also sync time with a internet based time source; your miggy would keep time until switched off..
-
Tahoe wrote:
Right; so your on-board RTC is probably running just fine; you just need something to hold the time for you?
Correct.
Tahoe wrote:
Is the "SAVE" button greyed out in Prefs/Time? If not your RTC is working fine and you only need a battery.
Yes, but as I said I don't want to solder a bettery to the motherboard.
Tahoe wrote:
You could ofcourse also sync time with a internet based time source; your miggy would keep time until switched off..
I have done this, but I don't always want to connect to the Internet because it causes problems with WHDLoad.
--
moto
-
The serial interface on the clock modules you referenced use a synchronous serial interface. The serial port on the Amiga is asynchronous. You'd be better of using the parallel port and use bit-banging.
-- Peter
-
shoggoth wrote:
You'd be better of using the parallel port
With that chip, or a different one?
shoggoth wrote:
and use bit-banging.
I have no idea what that means :-)
--
moto
-
shoggoth wrote:
and use bit-banging.
I have no idea what that means :-)
Heh! Bash on the hardware!
Read/write to the parallel port hardware directly, rather than going via an API...
- Ali
-
It would be hundreds of times easier to solder a NiMH barrel battery (not the silly lithium coin batteries, you're just asking for trouble) in place on your motherboard than messing with an external RTC. I've done this on my A4000 and had no problems at all, and it's been in place for years.
-
RTC? Why not just go with serial to GPS or atomic clock?
-
Why not go for an NTP client application which updates your clock over the net every time you power on?
http://aminet.net/package/comm/tcp/facts
No soldering and I am sure you've already got a network.
-
@InTheSand
OIC, that's what I was planning to do with Blitz.
@Others who have suggested NNTP or soldering battery...
I've already explained why I don't want to do those.
--
moto
-
@motorollin
The "serial" in the name of this chip doesn't refer to the RS-232 serial port. It uses a data/clock bus. Therefore it would be simplier to connect data in (DI), data out (DO) and clock (CLK) lines to the parallel port and access the parallel port registers directly (because parallel.device lets you only read/write data as bytes through the Dx lines, it doesn't give you separate control over the parallel port signals). This is called hardware banging.
-
Are DI, DO and CLK the only lines which need to connect to the parallel port? And is it as simple as powering the chip and connecting those lines to the port?
--
moto
-
Hi,
Yes, connecting DI, DO, CLK and ground to the parallel would be all you need to do. Power the chip from a 5V power supply, using perhaps a connection from your Amiga's power supply or a micropower regulator and a battery pack to retain the time when the power is off!
Another option but more involved would be to use a micrcontroller to interface to the chip and send the time to your Amiga via the serial port. This would have a lower CPU overhead.
-
Great, thanks for the info!
--
moto
-
I don't always want to connect to the Internet because it causes problems with WHDLoad
The X-Surf is not a card which creates the spurious interrupts that are supposed to interfere with WHDload. Put it this way I've used my A4000 with X-Surf card constantly connected to my network using Miami for over 8 years with no issues.
-
also the ariadne 1 network card does not mess with whdload... numerous times I had genesis online and played whd games....
-
It works fine as long as you dont receive any traffic (no interrupts are generated). Try pinging the amiga whilst playing.
/Patrik
-
motorollin wrote:
@Others who have suggested NNTP or soldering battery...
I've already explained why I don't want to do those.
What about using a pair of probe clips (http://rswww.com/cgi-bin/bv/rswww/searchBrowseAction.do?D=probe%20clip&Nr=AND%28avl%3auk%2csearchDiscon_uk%3aN%29&Ntk=I18NAll&Nty=1&Ntt=probe%20clip&Dx=mode%20matchpartial&Ntx=mode%20matchpartial&N=0&name=SiteStandard&forwardingPage=line&R=0424175&callingPage=/jsp/search/search.jsp&BV_EngineID=ccdfaddkgidehddcefeceeldgondhgi.0&cacheID=uknetscape) to hook onto the +5v and GND pins of the RTC chip to attach the new battery? (IIRC, it needs a resistor to limit the charging current between the battery and the +5v, the A4000 schematics should show the value needed )
If you're still thinking of using an i2c RTC chip, have a look at i2clib (aminet) (http://aminet.net/package/hard/hack/i2clib40), it has simple interfaces for parallel,serial and floppy ports, and the shared library takes care of all the bit banging.