• Apple II (gs )peripheral card debugging with power-cord unplugged

    From Anthony Ortiz@21:1/5 to All on Wed Aug 31 15:08:10 2022
    So I've been fooling around with my fpga on a peripheral card doing reads and writes to the bus, trying to get the timing just right, but it's such a pain to power off the apple ii, remove the peripheral card, plug in the usb cord to the fpga, flash the
    new vhdl update, unplug usb cord, put the card back in the slot and power up the apple II again, ad nauseum. To simplify things I decided to use an external usb power with an on/off switch and plug the usb cord into that and leave the cord plugged into
    the fpga while it's in the apple ii slot. I have to make sure to have either the usb port or the apple ii off when the other's on, or else there'll be a lot of smoke.

    As I finished flashing an update to the fpga card, I happened to glance at my oscillosope which was connected to my fpga and I saw it generating a wave form, a 1mhz signal that can only be generated if phase0 was actively feeding it, but the apple II was
    off! I was scratching my head... Surely the motherboard clock can't still be working with the apple ii powered off, can it? So I unplugged the power cord from the apple ii and... the waveform was still there! At that moment I realized that the USB
    powering the fpga was also feeding power to the apple ii via the 5v line, and that must be powering the clock. It must also be powering the ROM (and maybe RAM?) because I was able to read from it just fine.

    I wanted to ask you guys out there in the know... is this okay or am I at risk of damaging something? Assuming it's okay, can I rely on debugging it this way with the apple ii power off, or will the timing be different with the apple II on thus making
    any debugging while off pointless?

    Many thanks in advance.

    Anthony

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charlie@21:1/5 to Anthony Ortiz on Thu Sep 1 16:33:10 2022
    On 8/31/2022 6:08 PM, Anthony Ortiz wrote:
    So I've been fooling around with my fpga on a peripheral card doing reads and writes to the bus, trying to get the timing just right, but it's such a pain to power off the apple ii, remove the peripheral card, plug in the usb cord to the fpga, flash
    the new vhdl update, unplug usb cord, put the card back in the slot and power up the apple II again, ad nauseum. To simplify things I decided to use an external usb power with an on/off switch and plug the usb cord into that and leave the cord plugged
    into the fpga while it's in the apple ii slot. I have to make sure to have either the usb port or the apple ii off when the other's on, or else there'll be a lot of smoke.

    As I finished flashing an update to the fpga card, I happened to glance at my oscillosope which was connected to my fpga and I saw it generating a wave form, a 1mhz signal that can only be generated if phase0 was actively feeding it, but the apple II
    was off! I was scratching my head... Surely the motherboard clock can't still be working with the apple ii powered off, can it? So I unplugged the power cord from the apple ii and... the waveform was still there! At that moment I realized that the USB
    powering the fpga was also feeding power to the apple ii via the 5v line, and that must be powering the clock. It must also be powering the ROM (and maybe RAM?) because I was able to read from it just fine.

    I wanted to ask you guys out there in the know... is this okay or am I at risk of damaging something? Assuming it's okay, can I rely on debugging it this way with the apple ii power off, or will the timing be different with the apple II on thus making
    any debugging while off pointless?

    Many thanks in advance.

    Anthony

    I don't know if it is okay or not but it got me curious so I got out my
    old scope and tried to replicate what you are doing only with my Carte
    Blanche II card.

    I first connected my probe to phase0 pin of the Apple IIgs slot and to
    ground on the slot. I then removed my USB connection to the Carte
    Blanche II.

    Powered up the IIgs and got a wave with some ringing but less than what
    I see in your pictures (my scope is an old analog scope).

    Turned off the IIgs. No signal on scope.
    Plugged in USB. Still no signal on scope.
    Tried programming the Carte Blanche II. It won't program without the
    IIgs power on and still no signal on scope.

    For what it is worth. I leave my USB connected all the time and program
    the FPGA or Flash the non-volatile memory over and over without turning anything on/off.

    Is your USB connection to a USB chip on your board or is it a USB to
    JTAG cable?

    Charlie

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael J. Mahon@21:1/5 to Anthony Ortiz on Thu Sep 1 21:37:32 2022
    Anthony Ortiz <anthonypaulo@gmail.com> wrote:
    So I've been fooling around with my fpga on a peripheral card doing reads
    and writes to the bus, trying to get the timing just right, but it's such
    a pain to power off the apple ii, remove the peripheral card, plug in the
    usb cord to the fpga, flash the new vhdl update, unplug usb cord, put the card back in the slot and power up the apple II again, ad nauseum. To simplify things I decided to use an external usb power with an on/off
    switch and plug the usb cord into that and leave the cord plugged into
    the fpga while it's in the apple ii slot. I have to make sure to have
    either the usb port or the apple ii off when the other's on, or else
    there'll be a lot of smoke.

    As I finished flashing an update to the fpga card, I happened to glance
    at my oscillosope which was connected to my fpga and I saw it generating
    a wave form, a 1mhz signal that can only be generated if phase0 was
    actively feeding it, but the apple II was off! I was scratching my
    head... Surely the motherboard clock can't still be working with the
    apple ii powered off, can it? So I unplugged the power cord from the
    apple ii and... the waveform was still there! At that moment I realized
    that the USB powering the fpga was also feeding power to the apple ii via
    the 5v line, and that must be powering the clock. It must also be
    powering the ROM (and maybe RAM?) because I was able to read from it just fine.

    I wanted to ask you guys out there in the know... is this okay or am I at risk of damaging something? Assuming it's okay, can I rely on debugging
    it this way with the apple ii power off, or will the timing be different
    with the apple II on thus making any debugging while off pointless?

    Many thanks in advance.

    Anthony


    It can be dangerous to connect two power supplies together without
    isolation precautions.

    Each supply feeding the card can be isolated by connecting a diode in
    series with the +5v lines on the card.

    To minimize voltage drop, Schottky diodes should be used, connected like an
    OR gate, to prevent backfeeding one supply from the other.

    More complex FET-based approaches can be used to minimize voltage drops,
    but diodes should be sufficient to allow you to operate safely.

    --
    -michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anthony Ortiz@21:1/5 to All on Fri Sep 2 18:50:12 2022
    Is your USB connection to a USB chip on your board or is it a USB to
    JTAG cable?

    Charlie

    It's a JTAG cable that supplies power to the fpga. It seems the Carte Blanche isn't powered this way.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charlie@21:1/5 to Anthony Ortiz on Sat Sep 3 11:08:38 2022
    On 9/2/2022 9:50 PM, Anthony Ortiz wrote:
    Is your USB connection to a USB chip on your board or is it a USB to
    JTAG cable?

    Charlie

    It's a JTAG cable that supplies power to the fpga. It seems the Carte Blanche isn't powered this way.

    Right, my Carte Blanche II is powered by the Apple.

    Possibly you could have your peripheral board work that way (with
    appropriate isolation as Michael J. Mahon mentioned). I can't imagine
    it being much fun having to take out the board every time you have to
    program it. Also you can program the FPGA directly for a quick check of
    a change in code without overwriting the the flash memory chip.

    Charlie

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)