Sharing a RTC without sharing EEPROM
Duane Degn
Posts: 10,588
I'm using Rayman's Propeller Touchscreen Platform as a graphics slave to another Propeller. I want both propellers to have access to a real time clock using I2C lines using pins 28 & 29.
The problem I foresee is the two different EEPROMs (one on each board) have the same address (even different addresses wouldn't help at start up) so if I start both boards at the same time the two different I2C signals will mess each other up and neither Prop will get loaded with its program.
One option I see is to start the Props a few seconds apart from each other. Start Prop 1; make sure Prop 1 sets pins 28 & 29 to inputs for a few seconds while Prop 2 to starts. The two Props will be communicating over pins 30 & 31 so they could set "I2C in use" flags back and forth over the serial connection.
I realise as I "preview" my post that I wouldn't have access to either EEPROM. There would have to be some sort of switch so only one EEPROM was acessed at a time. This is looking like a bad idea.
Is there an easier way to do this? I wonder about passing the time over the serial connection but I'd like to use the time stamp features in some of the SD objects that access the RTC automatically. I'd rather not have to code for the time exchange over serial.
I bet there isn't an easy way to do this. But I thought I'd ask. Any ideas?
Duane
The problem I foresee is the two different EEPROMs (one on each board) have the same address (even different addresses wouldn't help at start up) so if I start both boards at the same time the two different I2C signals will mess each other up and neither Prop will get loaded with its program.
One option I see is to start the Props a few seconds apart from each other. Start Prop 1; make sure Prop 1 sets pins 28 & 29 to inputs for a few seconds while Prop 2 to starts. The two Props will be communicating over pins 30 & 31 so they could set "I2C in use" flags back and forth over the serial connection.
I realise as I "preview" my post that I wouldn't have access to either EEPROM. There would have to be some sort of switch so only one EEPROM was acessed at a time. This is looking like a bad idea.
Is there an easier way to do this? I wonder about passing the time over the serial connection but I'd like to use the time stamp features in some of the SD objects that access the RTC automatically. I'd rather not have to code for the time exchange over serial.
I bet there isn't an easy way to do this. But I thought I'd ask. Any ideas?
Duane
Comments