Commodore 2000K
25 December 2021CDI 450 TimeKeeper fix
16 January 2022Merry Christmas Retrofixers!
You got it right, today we're building a Christmas tree for C64, don't worry it's not difficult and now let's see how to do it.
Let's take a look at the scheme.
This is very simple, we find the user port of the C64 where only the +5V the GND and 8 I/O pins are connected.
The I/O pins are connected to the leds via a 1K resistor, the resistance is very high and the leds would work better with a 470ohm one but the C64 doesn't have much current available and in order not to overload it it's better not to overdo it!.
If we wanted more power we should use transistors and power the board externally.
The J1,J2 connectors are used only to be able to separate the connector part from the one with the shaft body and the two connections have been made only to be able to make a single pcb without having to pay for 2 different ones.
Yes, some pcb producers, if more diagrams are made on the same board, consider it as different and there is a surcharge!.
As can be seen here to the side, the shaft can be orientated with respect to the connector.
But what happens if I connect it?!
Nothing, if we don't write 2 lines on our C64/128 to set the user port, these LEDs will remain in an undefined state, i.e. they could remain on or off for a while, depending on what is set on the CIA register.
LET'S
GO
TO
CODES
This is a simple program to turn on only the first led of the door:
10 POKE 56579,255: REM SET ALL 8 PORTS AS OUTPUT 20 POKE 56577,1:REM SET USER PORT BIT0 (TURNS FIRST LED ON)
Simple isn't it?! Now let your imagination run wild and let's create the effects to display on our Christmas tree!
In the Commodore 2000K video at the end there is the part of the construction of this circuit, I will follow the code to chase the leds.
In a next video I will show some other effects.
10 POKE 56579,255 20 FOR X=0 TO 7 30 POKE 56577,2^X 40 NEXT X 50 GOTO 20
Here you can download the C64 program with 10 tree effects
Instructions:
On startup the user door is reset and the tree lights are off.
By pressing a key from 0 to 9 an animation can be performed.
To change the effect, first exit the selected program using the <- key (left arrow)
Subscribe to the channel to help me create new content, comment if you like these videos and maybe suggest what you would like to see again. Thank you all and best wishes for these holidays.