Nicolas Welte wrote: > I have a (German language) book for the C64 that describes a I2C interface on > the cassette port, it is used to implement a real time clock interface. Since > the I2C electrical interface is almost the same as the C64 serial bus, Only if you use short wiring; the bus isn't terminated correctly. > it should be possible to drive I2C devices just with software. Of course you > would lose the possibility to use standard serial port devices then, but for > playing around with I2C it should be fine. The only problem is speed: If the > C64 is master, there isn't a problem, but if you want to use it as an I2C bus > logger or slave device, the maximum bus speed of 100 or even 150kHz might be > too much. You're absolutely correct on the data-logger part, but a slave may be very slow. I2C acknowledges every single bit, so the bitrate is effectively determined by the slowest device on the bus. For instance, I played with an I2C 'analyzer', which attached to the paralell port of a PC. It could act like slaves and masters too, at the 400kbit/s 'unofficial' standard. However, when accessed as slave, it streched the clock for more than 3ms between each byte being sent. Furthermore, I just finished my (C-based) driver for the 87LPC76x-series of Low-Pin Count processors. These things have a bit-oriented I2C interface (meaning that every single bit has to be handled by software; a byte-wise interface would've been a lot better). Because these processors aren't really fast, you'll never be able to get a 100kbit transmission rate. Having a software-based master talking to a hardware-based slave is no problem, a hardware-based master talking to a software-based slave works fine as well. Things start to get icky if you have a software-based master talking to a software-based slave, or a hardware-based master talking to several software-based slaves at the same time. As a side note, the I2C bus is rather limited because of its master-slave setup, which is the reason that most I2C busses are used as multi-master bus these days. Hardware support is *required* for a multi-master setup, otherwise things go terribly wrong. I spent the better part of the last 3/4 year developing I2C drivers for Philips, so I hope I know where I'm talking about.. > But I doubt that this limit is ever reached in real-life, micro > controller operated applications. It is. I've seen a few demonstrations about the I2C bus running at +/- 6Mbit/s. -- Martijn van Buul - Pino@dohd.org - http://www.stack.nl/~martijnb/ Geek code: G-- - Visit OuterSpace: mud.stack.nl 3333 Kees J. Bot: The sum of CPU power and user brain power is a constant. - This message was sent through the cbm-hackers mailing list. To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tml.hut.fi.
Archive generated by hypermail 2.1.1.