summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/ds1994.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/ds1994.cpp')
-rw-r--r--src/devices/machine/ds1994.cpp45
1 files changed, 5 insertions, 40 deletions
diff --git a/src/devices/machine/ds1994.cpp b/src/devices/machine/ds1994.cpp
index 8b379f6ba82..bf0f6eef017 100644
--- a/src/devices/machine/ds1994.cpp
+++ b/src/devices/machine/ds1994.cpp
@@ -9,6 +9,9 @@
*
*/
+// FIXME: convert to device_rtc_interface and remove time.h
+// FIXME: convert logging to use logmacro.h
+
#include "emu.h"
#include "machine/ds1994.h"
@@ -25,12 +28,12 @@ inline void ds1994_device::verboselog(int n_level, const char *s_fmt, ...)
va_start(v, s_fmt);
vsprintf(buf, s_fmt, v);
va_end(v);
- logerror("ds1994 %s %s: %s", tag(), machine().describe_context(), buf);
+ logerror("ds1994 %s: %s", machine().describe_context(), buf);
}
}
// device type definition
-DEFINE_DEVICE_TYPE(DS1994, ds1994_device, "ds1994", "DS1994 RTC + BACKUP RAM")
+DEFINE_DEVICE_TYPE(DS1994, ds1994_device, "ds1994", "DS1994 iButton 4Kb Memory Plus Time")
ds1994_device::ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, DS1994, tag, owner, clock), device_nvram_interface(mconfig, *this)
@@ -768,41 +771,3 @@ void ds1994_device::nvram_write(emu_file &file)
file.write(m_rtc, RTC_SIZE);
file.write(m_regs, REGS_SIZE);
}
-
-/*
-
-app74.pdf
-
-Under normal circumstances an ibutton will sample the line 30us after the falling edge of the start condition.
-The internal time base of ibutton may deviate from its nominal value. The allowed tollerance band ranges from 15us to 60us.
-This means that the actual slave sampling may occur anywhere from 15 and 60us after the start condition, which is a ratio of 1 to 4.
-During this time frame the voltage on the data line must stay below Vilmax or above Vihmin.
-
-In the 1-Wire system, the logical values 1 and 0 are represented by certain voltages in special waveforms.
-The waveforms needed to write commands or data to ibuttons are called write-1 and write-0 time slots.
-The duration of a low pulse to write a 1 must be shorter than 15us.
-To write a 0, the duration of the low pulse must be at least 60us to cope with worst-case conditions.
-
-The duration of the active part of a time slot can be extended beyond 60us.
-The maximum extension is limited by the fact that a low pulse of a duration of at least eight active time slots ( 480us ) is defined as a Reset Pulse.
-Allowing the same worst-case tolerance ratio, a low pulse of 120us might be sufficient for a reset.
-This limits the extension of the active part of a time slot to a maximum of 120us to prevent misinterpretation with reset.
-
-Commands and data are sent to ibuttons by combining write-0 and write-1 time slots.
-To read data, the master has to generate read-data time slots to define the start condition of each bit.
-The read-data time slots looks essentially the same as a write-1 time slot from the masters point of view.
-Starting at the high-to-low transition, the ibuttons sends 1 bit of its addressed contents.
-If the data bit is a 1, the ibutton leaves the pulse unchanged.
-If the data bit is a 0, the ibutton will pull the data line low for 15us.
-In this time frame data is valid for reading by the master.
-The duration of the low pulse sent by the master should be a minimum of 1us with a maximum value as short as possible to maximize the master sampling window.
-
-The Reset Pulse provides a clear starting condition that supersedes any time slot synchronisation.
-It is defined as single low pulse of minimum duration of eight time slots or 480us followed by a Reset-high time tRSTH of another 480us.
-After a Reset Pulse has been sent, the ibutton will wait for the time tPDH and then generate a Pulse-Presence Pulse of duration tPDL.
-No other communication on the 1-Wire bus is allowed during tRSTH.
-
-There are 1,000 microseconds in a millisecond, and 1,000 milliseconds in a second.
-Thus, there are 1,000,000 microseconds in a second. Why is it "usec"?
-The "u" is supposed to look like the Greek letter Mu that we use for "micro". .
-*/