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!"
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.
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.
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.
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.
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.
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 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.
@@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.
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.
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
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!"
Thanks :)
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.
Thanks! Yes, I know. I have programmed assembler like 35 years ago. I need to brush of my old skills :)
What about the delay needed to see the animation?
Good stuff, brings back fond memories
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.
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.
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
In a local shop here. But you find it on ebay and many other places
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.
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.
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.
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.
Because the user port cannot support that much amps. So to be safe, I used transistors. So not to risk damaging the CIA chip.
@@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.
@@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.
very cool
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.
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
@@Tony240zt A 1K current-limiting resistor on the base would probably be a good safeguard.