So, I use the external EEPROM...
MarkS
Posts: 342
to store a program, correct? After loading, the two I/O pins are free to be used, again, correct?
Question...
How do you disconnect the EEPROM after the program is loaded? For the application I'm doing, all I/O pins will be outputs. How do I keep from trashing the data in the EEPROM? A diode will not work in this case, as it would block the I/O line(s) during the boot load. What am I missing?
Question...
How do you disconnect the EEPROM after the program is loaded? For the application I'm doing, all I/O pins will be outputs. How do I keep from trashing the data in the EEPROM? A diode will not work in this case, as it would block the I/O line(s) during the boot load. What am I missing?
Comments
You'd need some means of enabling / disabling access to the the Eeprom. !Reset can enable it and a 'first pulse' from any I/O not used until after booting is complete could be used to disable access.
Alternatively it may be possible to do it by keeping the clock line to the Eeprom high which could be done using simple diode mixing and the enable/disable access logic.
Added, posts crossed in the ether : Write Protect alone won't be good enough. The Eeprom could interpret the signals as a 'read command', output data and interfere with the Propeller output, pulling a high line low.
I'm making a large (understatement!) Tetris game. It will consist of a 10 x 20 grid of 4" x 4" cells. One Prop (20 in total) will control the LEDs for a single row, consisting of 10 red, 10 green and 10 blue LEDs. Each Prop will only be responsible for its row, but they will all need to communicate so that they know when a piece is about to drop through their row and it's orientation and position.
Post Edited (MarkS) : 12/12/2007 3:21:42 AM GMT
The I2C protocol uses addresses so put the other props on unused addresses.
You could have RTC, I/O expanders, serial LED drivers etc all on these two pins.
Gavin
Thanks for the info. I need to read up on the I2C protocol. I've never dealt with it before and haven't the slightest clue as to how it works. All I know is that it will work in this application.
Could be, or those using them aren't here or speaking out on how they achieved it.
I have a design to use a PICAXE/PICmicro communicating on the I2C data line which will work alongside I2C. Providing I2C clock is never asserted the Eeprom should never do anything nor interfere with what's on the data line. The Propeller and micro can communicate using a bi-directional serial protocol. A particular long low on the data line which will not occur during normal Eeprom access is used to tell the micro it is about to be communicated with.
To re-use the I2C lines there are two things you need to achieve -
1) Changing I2C clock and data lines must not cause the I2C devices to perform any adverse unintended operation.
2) I2C devices must not interfere with clock and data lines when they are not being specifically controlled.
> I need 30 of the I/O pins for LEDs and two for an I2C bus to other Props. There is no way around this. All of the pins will be needed.
Yes, I'm using them. For other devices on the I2C bus.
Are you aware, that there do exist LED-drivers that connect to the I2C-bus?
Also shift-registers that can be used to drive LEDs and thus saving you lots-o-pins?
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
Thanks for the tip!
I was trying to keep the component count low. Searching Digi-Key's site, I found this: TCA62724FMG. If I did it the way I was planning, I'd need 30 MOSFETs, a bunch of resistors and other stuff. Each LED will be mounted on its own small PCB, so I could just add this chip to the PCB. The driver board would then shrink to 10 connectors and the Prop. This will reduce the component count by 2/3 and each of these driver chips cost the same as two of the MOSFETs I was going to use. Moreover, the SCL line will be the same for all 20 rows, so I could do this entire thing with one slave Prop and 21 I/O pins.
Just curious though... How would you use a shift register in this application. A shift register is either cycling one high signal or one low signal along the outputs. How would that work in this application?
Saluti Joerg
I was too brief.
I meant a shift and latch. Shift in the bits with a Clk and a Data and then store them and change the output by a strobe line.
Something like a CD4094BC. Normaly, they can be cascaded.
The type I gave you isn't the perfect solution, but it was the first hit.
Nick
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!
The DIY Digital-Readout for mills, lathes etc.:
YADRO
This circuit has not been tested by me, and me nor my dog will be held liable in the event Polar ice caps melt due to the use of said circuit.
#number of I/O^2-# of I/O
40^2-40=1560
There are some disadvantages, the wiring is more complex, the leds have to be able to withstand reverse voltage, and the control code would not be fun.
Charlieplexing theory www.instructables.com/id/Charlieplexing-LEDs--The-theory/
Post Edited (kevin101) : 12/18/2007 5:07:41 AM GMT
I know this doesn't exactly answer how to use the data lines, but this is another approach to help you reduce part count and I/O count.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
tdswieter.com
One little spark of imagination is all it takes for an idea to explode