Controlling electronics with the Commodore 64 user port - Part 2

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 21

  • @robertsissco2439
    @robertsissco2439 3 года назад +1

    Good intro, I am just getting into electronics and retro computer, so I loved this.
    Also, with that basic program you started showing at 12:30 I couldn't help but think back on the Venture Brothers "It's on, it's off, it's on, it's off" "That's called blinking, boys!"

  • @rdoetjes
    @rdoetjes 4 года назад +4

    That last program can be done even easier in assembler (just wining it now :) )
    LDA #255 ;set Port to output
    STA 57579 ;userport control register as output
    LDA #1 ;set A to 1
    STA 57577 ; show 1 explicitly since we start loop with shifting
    LoopUp:
    ASL ;shift left (multiply by 2)
    STA 57577 ; show led status
    CMP #128 ; is value not 128 then LoopUp
    BNE LoopUp
    LoopDown:
    LSR ;shift right
    STA 57577 ;show led status
    CMP #1
    BNE LoopDown
    JMP LoopUp
    RTS
    You could make the program even smaller if you branch on carry set and not set, instead of explicitly comparing the value and then branching. But this makes it a bit more readable for non-assembler coders.
    And this runs ~1000 times faster than on basic.

    • @Arcticretro
      @Arcticretro  4 года назад +1

      Thanks! Yes, I know. I have programmed assembler like 35 years ago. I need to brush of my old skills :)

    • @TheUtuber999
      @TheUtuber999 Год назад +1

      What about the delay needed to see the animation?

  • @raymondheath7668
    @raymondheath7668 4 года назад

    Good stuff, brings back fond memories

  • @transistorbaluba
    @transistorbaluba 4 года назад +1

    also there is a possible to use a n-channel mosfet-transistor. with out consern for blowing the n n-channel transistor, the n-channel is a voltage-field controlled unit. it is controlled by positiv charge on N-channel-transistor gate.

  • @congestiontv
    @congestiontv 2 года назад

    In the first BASIC example it's quite funny that the pause loops with a value of 1000 actually eats up around a second of CPU time.

  • @nancyroyer8577
    @nancyroyer8577 3 года назад +2

    salut ou avez vous acheté le fil vers user port a 1:26
    hi where did you buy the wire to user port at 1:26

    • @Arcticretro
      @Arcticretro  3 года назад

      In a local shop here. But you find it on ebay and many other places

  • @rdoetjes
    @rdoetjes 4 года назад +2

    It’s better to connect the LED (and resistor) to the collector of the NPN as you would steal 0.7 volts (forwarding voltage) of the transistor from the output. In this case it’s okay but with higher loads like relays you always switch them from the common collector. Just a little tip.

    • @TheUtuber999
      @TheUtuber999 Год назад

      The 0.7 Volts will be dropped regardless of whether it occurs above the LED (emitter side) or below it (collector side), so it shouldn't matter which leg it's connected to. The current passing through the LED will be the same regardless, and likewise have the same brightness. You can test this on a breadboard if you like.

  • @RalphWLundvall
    @RalphWLundvall Год назад

    I used 8 SMD LEDs and wired all 8 lines and ground. I used 470 Ohm resistor network. Set (POKE) DDRB to 255 (all data lines are output). Sent (POKED) 170 and 85 alternately to CRB with a pause between. I used durexforth rather than BASIC. Posted to Instagram.

  • @System-1541
    @System-1541 4 года назад

    Why do you use a transistor between the data line of the user port instead of connecting the data line to the LED directly? Usually I don't see a transistor used in a circuit like this.

    • @Arcticretro
      @Arcticretro  4 года назад

      Because the user port cannot support that much amps. So to be safe, I used transistors. So not to risk damaging the CIA chip.

    • @System-1541
      @System-1541 4 года назад

      @@Arcticretro isn't the voltage you're using coming from the 5v rail on the user port? I'm just wondering if the 5v pin and voltage on the data lines come from a different sources, because they're both 5v.

    • @congestiontv
      @congestiontv 2 года назад

      @@System-1541 The difference for the data line is that the same currents have to pass the switching unit within the CIA chip. Apparently the CIA gets overloaded when driving the amps of an LED. So it's less a question of the source.

  • @StatusFIX
    @StatusFIX 3 года назад

    very cool

  • @Mustakari
    @Mustakari 4 года назад +1

    Please delete these videos until you have learned to do the electronics part properly and re-shoot those parts. Every broken CIA chip is a small tragedy.
    Other than that, great stuff! I wish there was someone to tell me how easy the user port was to use when I was 10 years old.

    • @Tony240zt
      @Tony240zt 2 года назад +1

      Do you care to elaborate a bit more on how the electronics part should be improved? I was about ready to do this same project, but do not wish to risk damaging my CIA

    • @TheUtuber999
      @TheUtuber999 Год назад +1

      @@Tony240zt A 1K current-limiting resistor on the base would probably be a good safeguard.