I thought it was time for an update on the progress of my 6303 computer build, now officially named Retro63. To complete the build I have added a keyboard. I looked around at the readymade options but decided to go DIY for the moment. To keep things simple I used a Arduino Nano to scan the matrix of keys (there is an existing library to use for this). The 6303 is simply presented with 7bit ascii and a data available flag. Initially I am scanning for the keypress flag but can easily change over to have it create an interrupt each time a key is pressed.
To keep things together I build a simple wooden frame for the keyboard and processor board to sit in. The only other hardware change is the addition of a simple buzzer driven from a processor port.
With the keyboard working my focus changed to getting a basic monitor program up and running. You can see this booting in the following video.
The monitor functions are:-
modify current memory address
move one address forward or backwards
jump to memory address
execute program at current memory address
There are also quite a lot of sub-routines to make doing ‘stuff’ easier.
The next iteration of the monitor will include the ability to load and save via the serial port but I’m not planning a lot beyond that – I may well in time implement one of the existing monitors others have written but that is a way off currently.
I have been a little distracted by the arrival of the new Pi Pico for the last couple of days, thinking about how I can usefully use one on the Retro63 project !
I decided to step up a complexity level for my Christmas project this year and have a go at building a Retro Computer. Initially I was going to do something based around the 1802 processor but as I already have one of these running I thought to try something a bit different. Having grown up very much as a Z80 person I have never done much with 6800 series processors so decided now was a good a time as any to rectify this omission! After a bit of looking around I landed on the 6303 from Hitachi, this is essentially a Motorola 6803. This has an extended 6800 compatible command set with a bit of RAM and peripheral IO all on a single chip. The 6303 is also a lot easier to source and work with than the original 6800 making it a good choice. Addionally I had found a couple of examples of other 6303 DIY computers online which helped a lot in terms of filling the gaps in the official documentation.
To avoid creeping features, for once I spent a bit of time thinking about what I wanted the computer to do and more importantly what it didn’t need to do. For instance I wanted to interface some form of keypad and display, but did not need much additional IO beyond that. The same with memory 8K RAM & 8K EPROM would be fine, no need to cater for further expansion. the 6303 includes a basic serial interface so no need to include a separate UART chip. initially I was going to include a separate 6 digit display but swapped to the 16×2 line LCD you can see in the finished computer when I realized I could just fit it on the board, with the interface logic underneath.
EPROM 8K (E000 – FFFF), 16K selectable via onboard links
On CPU 1x5bit 1x8bit (inc a serial port)
External 1 x 8 bit input (for keyboard interface)
External 1 x 8 bit output, connected to LCD
Power 5V at less than 100mA
To make initial code development a easier i’m using a 28C64 EEPROM rather than a traditional ERPOM. This has greatly reduced test cycle time over using an EPROM!
In terms of the physical build I decided early on to use strip board,
initially I was looking to use a Vero wiring pen to make the interconnections but in the end opted for more tradition link wires all be it with PTFE insulated cable. This does not melt if you accidently catch it with the soldering iron making things a lot easier when as the wiring gets more congested.
Given I was building this over Christmas when getting replacements is hard I was very focused on not accidently damaging any ICs through wiring errors, to this end unusually for me I was very disciplined in checking for continuity and shorts before plugging anything in! This combined with proving out bits as I finished them meant I was relatively confident of the existing build each time I wired in new a element. The only real problem I had was with the LCD display which turned out to be a faulty display rather than an error on my part – I ended up stripping it out and wiring up to a Arduino to confirm this. It is also fair to say having a good digital scope was a big help, particularly getting the reset timing sorted out (mode selection on 6303 takes place as part of the reset sequence so getting the timing right is important).
I have been using an online assembler called asm80 to write test software, this is a great tool supporting development of a number of 8bit processors including an IDE and emulator. At some stage I do need to move on a different assembler as asm80 does have a few eccentricities in terms how it emulates 6800 code (in fairness it was originally written for the Z80) and does not support the extended 6801 codes available on the 6303. That said asm80 is very easy to use so I will stick with it for now.
The next stage is to sort out a basic keypad, most likely based around an Arduino or PIC, to avoid putting the scanning overhead on the 6303. After that I want to develop / adapt a simple monitor program, mainly this will act as a bootstrap to facilitate loading software via the built in serial port. Finally once I have firmed up on the size of the keypad, clearly some form of enclosure is needed – something custom made in wood I suspect.
Daniel’s bits, bytes & pieces , this was a really useful block documenting Daniel’s build of a 6303 based computer, first got me looking at a 6303 as the processor choice
asm80 support a number of 8 bit processors providing assembler, IDE and emulator
I was recently sent a Piksey Atto by it’s creators at BnBe club. The Atto is the Latest in their range of small Arduino IDE compatible micro-controllers. You can see the earlier Piksey Pico in my last post on the binary clock. The Atto is a real step down in size from the Pico measuring just 20 x 13mm. While there are other very small Arduino compatible micro-controllers they are often limited by choice of processor and / or connections. With the Atto the makers have opted to use the same processor as the Arduino Leonardo (ATmega32U4) this ensures good level of capability and importantly simple installation – no additional config or 3rd party drivers needed just select the Leonardo in the IDE.
To get as much IO as possible 3 sides are used for connections. The Atto has castellation holes making it flexible to use both on prototyping boards and PCBs.
To make access to the end connections a little simpler I made a small adapter board from bits I had to hand.
Communication with the Arduino IDE was as promised very straight forward and I had the usual blink example working without a problem – note, the Atto does not have an onboard LED so you have to connect to your own to see Blink working.
Next was to decide an application for the Atto. IOT applications are an obvious route given it’s size but I had recently seen Arduino Nano code for a mini Tetris game and so for a bit of fun thought this would show off the size of the Atto well and be a bit different. You can see the finished results below and the to the right.
I had to make a couple of changes to IO assignments in the s/w as the Leonardo uses different pins for I2C to the Nano, the only other job was ‘tuning’ the buttons. The Tetris game connects to the buttons via a single analog pin using dividing resistors to give a different analog reading for each key combination. I had not seen this before and although not strictly needed here is simple way to squeeze a bit more IO out when you are short. For more on this see the following link http://fritzing.org/projects/arduino-5-buttons-keypad .
All in all the Atto is useful addition to the range of Arduino compatible micro-controllers, for me using the Leonardo processor is great step up from the competition, taking away the need for extra 3rd party drivers. It’s size does mean a couple of compromises, no onboard power regulator (there is still an external 5V connection pin) and no LED but I am happy to take these given it’s small size.
I seem to have got a little fixated on clocks over the last couple of months, but rather than go down a simple route I have tried to use parts I already had ‘in-stock’. For example this picture is of a binary clocking using some phosphor neon’s I had in a draw rather than led’s to indicated the time, but more of that later in the post.
My first lockdown clock build on the face of it is just a simple digital clock but rather than use a display with the driver built in I got the 8266 to do everything. Then to really mess things up I used a 8266 with not quite enough IO so added PIC programmed to act like a 2 to 4 line decoder for the digit selection. Then as the analog input line was still spare I added auto brightness control. The 8266 connects to the internet once a day to correct any time drift. The only cheat is the flashing colon, with no IO to left this it’s driven from a simple 2 transistor flip-flop.
Next back to green phosphor neon’s, I was having a bit of play with them to understand potential driver circuits for a nixie clock I am planning when I had the idea they would make a good indicators for a binary clock … This would also be an opportunity develop the clock elements for the planned nixie clock as the nixie tubes themselves were still on their way from Eastern Europe !
Again looking around for bits I had immediately available I landed on developing a ‘re-usable’ clock source design using an ESP01, building on the s/w I had used for the earlier digital clock. This outputs the ‘time’ once a second via the ESP01’s serial port as a simple text string. A bit of added complexity was to correct for summertime, again it is updated from an a NPT server once a day or manually via a push button. The serial time feed is read into a second micro-controller that sorts out the binary display. For this I used a Piksey Pico Arduino compatible uP that I had got a while before from a Kickstarter. These have the advantage of being smaller than a Nano but still have slightly more accessible IO.
In the process of testing the clock I did mange to destroy an ESP01 – they really do not run for long on 12V and one Piksey ( a lose wire touched the 115Vdc rail !), but you can see the finished results below. I think the indicators are a really pleasing green much more subtle that using these newfangled led things….
The video shows the start up sequence with the uppermost orange neon flashing until the wifi connects then you see the whole display update as the Piksey starts to get updates from the ESP.
The next plan is to put it in some form of display case to avoid accidental electric shocks !
Looking around I realized I have collected quite a lot of Pi Xmas trees over the years. Clearly setting them up individually would take quite a lot of Pi’s, but could I get them all working from a single Pi ?
It was immediately apparent some sort of fiddling would be needed as the Pi 3d tree on it’s own uses all the available IO !
Accepting this would be viewed from the front I was able to save a number of IO lines by ignoring the leds on the back of the 3d tree. This still left me short by about 8 lines so I added an MCP23017 I2C port expander to give to make up the difference.
As you can see the result is not pretty but it works, albeit with a little blue-tack and packing tape holding things together.
This was also an opportunity to use the RasPiO Breaboard Pi Bridge, with all the IO broken out in numerical order this really helped me keep my sanity.
Having seen Andrew was launching a new tree this Christmas with the added twist of a bit of surface mount soldering I thought, yes this is a must for the 2019 decorations.
Then I thought this is calling out for a bit of Raspberry Pi pimping.
As supplied all the led’s as connected in parallel with a simple on off switch / battery. First I isolated the track connections then connected them to individual GPIO lines on a PiZero, which I mounted with couple of stand-offs on the back of the PCB frame.
Next is was just down to a bit of Python. After some experimenting I arrived at a pleasing random flicking effect. The trick here is that slow fades do not work because the PWM routines in Gpiozero are all software controlled so you get annoying flashes when Linux decides to go off and do something else.
The initial consumer review was nice but, there was a compliant that the flicking could get annoying so I re-purposed the on-off switch to select between flicking and static in s/w. Finally I added a further push to allow the Pi to be shutdown cleanly.
My Pi test-bed dates back to the first Pi I got 2012, upgraded with each new release of h/w. Other than the Pi the only other change in that time has to modify the mounting when Pi’s with mounting holes first arrived on the scene !
The room I work in gets very hot in summer so with all the discussions around how hot the new Pi4 gets I decided to add a DIY fan ‘hat’. I probably should have made this on the 3d printer but as I had some plain prototyping board to hand it seemed a good idea to show how a very cheap ‘no complicated tools needed solution’ could be made.
I started by cutting out a 65mm x 55mm rectangle of prototype board, using the Pi as a template I then marked out and drilled (with a 3mm bit) the 4 corner holes.
The fan I used came from ebay, it is a 12v 40mm PC fan costing about £2.50. Here I am running it from 5 volts, while this means it will run slowly it does have the advantage is that is effectively noiseless.
Next I marked out the positions of the fan mounts a main cut out. Lastly using the Pi as a template again marked out the cutout for the PI header.
Prototype board can easily crack, to reduce this risk I made sure the cutouts followed the matrix hole positions and then used a 2mm drill to ‘extend’ extend them. I could have been a bit neater doing this but it worked out ok. Any ridges I carefully filed down with a needle file. The tip here is to make sure you support the board on a flat surface.
Lastly I mounted the fan on the board with four 2mm nuts & bolts. To attach the ‘fan hat’ to the Pi I used 10mm spacers from ‘stock’.
The fan came with a 2 pin connector that I connected directly to 5V and Gnd on the Pi header.
The fan does not seem to move much air but importantly it ensures a continuous ‘disturbed’ airflow over the main chips on the Pi. With a room ambient of around 25C the Pi processor temp sits at 44-45C (Pi lightly loaded), disconnecting the fan this went up to 65C within a few minutes.
With a bit of extra filing I could improve access to the header pins but as I mainly use this Pi for s/w development my need to access the header is limited.
Following a number soldering sessions during the week I finished the TEC-1D build over the weekend. The next stages was to check out the oscillator circuit and the keyboard circuit. The former as there was a warning that not all variants of the chip would work. the latter because I was re-using a chip I initially got about 40 years ago for simple computer I built out of discrete TTL. All was well with both so I inserted the remaining chips and powered up.
This went without a hitch with the monitor program running as expected. Next I mounted the TEC-1 on a slopping enclosure.
From here I spent a happy couple of hours running through simple code examples from
Working boxed TEC-1D
the Talking Electronics Magazine.
Next I started to try a few things out on my own, the main difficultly here is that the information is all spread across 6 issues of the magazine including references to future material that I suspect was never published – the magazine only ran for 15 issues. to complicate things a little more there were at least 3 different monitor programs produced.
So my plan is to try and tees out the strands of information into a single list of functions and calls you can make from the monitor programs. I also need get an EPROM programmer so I can try out the last JMon monitor variant. but that is for the future. For now I am just enjoying playing with my new computer !
Boo the cat is very interested in Z80 machine code programming
Over Christmas while randomly scrolling through my Twitter feed I saw some discussion about the TEC-1 computer. This is a single-board kit dating from the early80s based around the Z80. Instructions on how to build it were published in the computer Australian hobbyist electronics magazineTalking Electronics. The Magazine only ran for 15 issues which is a pity as it had the idea of giving away a blank PCBs for one of the projects featured with every issue and did not have any advertising!
Anyway digging around to find out a bit more about the TEC-1 I discovered that a retro computer club in Australia had got permission to reproduce the TEC-1 PCBs and that there were a few left on eBay. Also amazingly although the magazine only ran for a limited time Talking Electronics as a webshop for kits is still up and running and while the kit for the Tec 1 is no longer available you can download pdf’s of all the magazines.
Given that the Z80 was my introduction to assembly language coding I decided this would be a great early 2019 project to tackle along side my other Raspberry Pi and Arduino activities. So a month or so later I have the bare board and have started to source the parts for it.
Scarily I have managed to find quite a number of the parts in my stocks of bits from long forgotten projects. The rest I have been able to find through eBay and people like Bitsbox.
Trying different switches
I am looking forward to start the build in earnest this week and hopefully post a blog update with some parts soldered on next weekend !
It’s been a good while since I have posted any blog updates, no excuse just distracted by life in general. This is quick weekend project at my daughters request. Concerned that some of the plants in her student flat would struggle in the cooler weather she requested a temperature display. Looking around the options I remembered my first Kickstarter was also set up to display temperature along with time. So a quick hack to remove the time element, change the board mounted DS18B20 sensor to cabled version and add max / min logging and it’s ready to take down to her.
Using it with a Pi2B is a bit of overkill but I am gradually changing out existing projects to Pi3s so have a few ‘spare’ hanging around.
The hardest bit was stopping one of the cats helping – I just managed to apprehend Pinky as she ran off with an ESP8266 board which clearly looked like a mouse to her !
I’m guessing the next request will be to add some form of push notification, if the temperature drops to a certain point but that is for another day.
The code is available on my GitHub site if you are interested.