Need help with penguin real time clock
I am trying to interface a DS1307 RTC with one of the new improved REV B fixed penguins. The problem is the I2C bus does not appear to be happy when I piggyback the RTC and the 24FC128 EEPROM. The penguin works perfectly both before and after I remove the RTC. Likewise the DS1307 works perfectly both before and after the piggyback. I tried to tie SCL high with both a 10K and 4K7 resistor with no improvement. (The RTC usually requires SCL tied high apparently not the EEPROM)
The problem is after I piggyback the RTC to the 24FC128 the main board can not access the EEPROM. The boards LED powers on, the 7 segment display is totally on (8 & dp), but I am not able to load a program with the Basic Stamp Editor.
I have added DS1307 RTC's to a BOE BOT, SumoBot, and a propeller with no problem, so I'm sure it is something simple that I am overlooking.
Any suggestions.
The problem is after I piggyback the RTC to the 24FC128 the main board can not access the EEPROM. The boards LED powers on, the 7 segment display is totally on (8 & dp), but I am not able to load a program with the Basic Stamp Editor.
I have added DS1307 RTC's to a BOE BOT, SumoBot, and a propeller with no problem, so I'm sure it is something simple that I am overlooking.
Any suggestions.
Comments
http://forums.parallax.com/showthread.php?115631-My-DS1307-on-the-PDB-work-well-with-a-BS2pe-but-I-can-t-make-it-to-work-with-a
http://forums.parallax.com/showthread.php?62873-Ds1307
When I do piggy back the chips the I2C bus seems to lock up. I know the MSOP version of the 24FC128 only uses one address line instead of the normal 3, but they should still be on different addresses. The RTC is 1101000 and the EEPROM 1010000.
http://forums.parallax.com/index.php
Chris says, "The demo is also running on a BS2, but you could use any BASIC Stamp Microcontroller you want."
Maybe this information will help.
http://forums.parallax.com/showthread.php?77867
Also attached is a Penguin REVB schematic showing the 24 WC 128 J EEPROM. Note R1 and R16 that affect SDA. Vdd is on pin 8.
The EEPROM is access by the microcontroller running the PBasic interpreter to load tokens. I haven't seen the I2C bus used by the underlying hardware used directly from PBasic.
In addition I read the docs for I2CIN and it only allows you to specify the SDA pin. The SCL pin is SDA+1. The penguin's free pins are 5 and 11. So to use I2C you'll have to bit bang the protocol. That's OK as there is code out there to do that.
I'll try to clarify my question, I want to get the RTC onto the I2C bus and not use the only 2 available pins. It is very easy to bit bang the protocol, I think that's why there is confusion with this question.
I don't want to just get a real time clock going.
That said the problem is that the DS1307 and the EEPROM don't seem to work together like they should. I can not even begin to worry about the software needed because as soon as the 2 chips are connected the bus locks and you can not even load software.
Whats the point of an I2C bus if you can not use all 128 devices. You maybe right and I won't have any way to get to the RTC in PBasic. I will need to be able to access RA0 and RA1. I'll worry about software after I get the hardware working.
The chip and crystal piggy backed took up no extra space and not even an external wire. Plus, if you have an I2C bus up and running why run two, unless you have 256 peripherials.
http://forums.parallax.com/showthread.php?129971-Programming-BS2px-with-SCL-amp-SDA-Lines&p=980851#post980851
It's probably not the simple conclusion you're looking for, i.e. merely piggyback an I2C device on the eeprom and access through PBASIC. However, Mike describes some options which could be followed if you want to do some development. It could be a very good learning experience!