Shop OBEX P1 Docs P2 Docs Learn Events
Shutting down eeprom with mosfet switch. — Parallax Forums

Shutting down eeprom with mosfet switch.

BasherBasher Posts: 25
edited 2012-11-07 15:44 in Propeller 1
Can anyone see an obvious problem with using a switch made from a couple of mosfet transistors to shut down the power to the configuration eeprom after it has booted up the propeller thereby freeing up pins 28 and 29 as inputs. I'm a bit concerned that feeding signals to the eeprom's pins while it has no power might damage it or that it might still interfere with the signals I'm feeding to the prop. I remember spending hours troubleshooting an intermitant problem with a breadboard circuit once before I realised that I hadn't connected up the power pin of a cmos logic ic. It seemed that as long as one of the inputs was high it would draw its power through that input and the circuit would work but when all the inputs were low there was no power and I got odd results. Is the eeprom likely to do the same kind of thing?

Comments

  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-11-07 13:12
    Yes, though all power would be through the pull-up resistors, so it wouldn't get much power, Your best bet would be to have an analog bus switch to turn off the power and the two data lines, and put the pull-ups on the EEPROM-side of the analog switch.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-07 13:15
    Turning off the power to any device (including an EEPROM) while providing signals to any inputs of the device can damage the device or possibly provide (inadequate) power to the device causing it to appear to function, possibly incorrectly.
  • tonyp12tonyp12 Posts: 1,951
    edited 2012-11-07 13:38
    Would you not waste a Prop pin by turning on/off a mosfet?

    If you leave pin28 (clock) high all the time, you should be able to use pin29 pretty safely.
  • BasherBasher Posts: 25
    edited 2012-11-07 13:45
    Thanks for the replies. I had a feeling that would be the answer.
    I tend to plan my projects by looking to see what components I have the most of in my parts draws and I've got a LOT of tiny surface mount mosfets because I had to buy a minimum amount. :smile:.

    I see I've also got a few 74HC4066N's so I'll try using one of those. If I'm switching off the data lines do I actually need to switch off the power to the eeprom would it save much power?
  • BasherBasher Posts: 25
    edited 2012-11-07 13:55
    What I want to do is monitor 13 bits of the address bus of a z80 plus the 8 bit data bus and output VGA on 8 pins of the propeller.
    I want the address bits to be in order so I can manipulate the address easily once in the propeller. So I'd have a spare pin I'll need it for the analogue switch as well, but I'll need pins 31, 30, 29 and 28
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-07 14:06
    You are framing your problem in a very narrow context by asking for help with retasking the eeprom lines. Isn't your problem the lack of I/O? If you provide details of what you are trying to do then I'm sure we will come up with a much better solution than trying to mangle the eeprom. The last thing you would want is if the Prop didn't boot because of problems on the eeprom lines. So what I/O are you using?

    EDIT: I see you've just posted some details, good.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-07 14:17
    Basher wrote: »
    What I want to do is monitor 13 bits of the address bus of a z80 plus the 8 bit data bus and output VGA on 8 pins of the propeller.
    I want the address bits to be in order so I can manipulate the address easily once in the propeller. So I'd have a spare pin I'll need it for the analogue switch as well, but I'll need pins 31, 30, 29 and 28
    What speed do you want to run at? A long time ago I used I2C bus I/O chips connected to a Z80 to monitor it but of course I2C is too slow to monitor in real time except I also used an I/O pin to override the crystal oscillator and clock the Z80 under software. Anyway, maybe a couple of nice simple 74HC245s (better pinout than 244s) muxed back into 8 I/O? Even this would save at least 3 I/O. You could even include the data bus.
  • BasherBasher Posts: 25
    edited 2012-11-07 14:49
    I want to run as fast as possible! :smile:
    This is a bit of a side project to one I've been working on for about 2 years now. I've built a clone of the sinclair zx spectrum using the propeller some Altera cpld's and a 7 inch LCD screen I pulled out of a cheap photo frame. The propeller uses the z80 refresh period to read the display memory and output VGA and a pixel clock signal through a CPLD to the screen. I'm now making a tidier version with a larger CPLD for a lot of the logic.

    2012-06-06 17.50.54.jpg
    2012-06-06 17.53.01.jpg
    2012-06-06 17.53.25.jpg

    What I want to do now is just use the display driver part (propeller and small CPLD's) to monitor a real zx spectrum's address bus and memory write signal to capture each write to display memory and process it in the propeller. I want as many instructions as possible to work on the data inside the propeller before it goes out to the LCD. I'm aiming to remove some of the attribute clash problems the spectrum was famous for. I don't want to waste instructions shifting bits if I can get the address into the propeller on pins that will make it instantly usable.
    1024 x 768 - 107K
    1024 x 768 - 111K
    1024 x 768 - 102K
  • AntoineDoinelAntoineDoinel Posts: 312
    edited 2012-11-07 15:33
    Hi Basher, and welcome.

    Cluso99 used this trick on his RamBlade board:
    http://forums.parallax.com/showthread.php?116893-RamBlade-Prop-SRAM-microSD-addon-to-run-ZiCog-CPM-PropDos-Catalina-etc

    I'm not sure what he used to isolate the eeprom, but most probably it's some single TTL gate from the "little logic" series.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-11-07 15:44
    toinyp12 wrote:
    If you leave pin28 (clock) high all the time, you should be able to use pin29 pretty safely.
    It's the other way around: leave pin 29 (SDA) high and use pin28 (SCL). The reason is that if you leave SCK high, toggling SDA creates START and STOP conditions on the I2C bus. If you leave SDA high, toggling SCL doesn't have any effect on the I2C devices, once a STOP condition has been issued.

    -Phil
Sign In or Register to comment.