Posts

Showing posts from 2020

8-bit Computer: Adding the UART modules

Image
Until now, my UART transceiver module existed across three breadboards and was not integrated into the 8-bit computer, see  previous post .  I have now added my UART module to the 8-bit breadboard computer I am building.  I have modified the design slightly by adding an 74LS245 so that the received byte can now be put out onto the databus.  The blue LED bar below shows the current received byte, and the green LED is lit when    Updated schematic The UART TX module remains as previously  described, but the finalised UART RX schematic is updated below.  Notably a 74LS245 chip can now control the output onto the databus. The RX_READY signal of the UART RX module will feed into the status byte (flag register) of the computer, along with the ALU flags and the SENDING bit of the UART TX module. Chip geography In terms of placement of the chips to make as logical and clean layout as possible, I have used the following layout below.  The transceiver spans 2 breadboards, and borrows an AND gat

8-bit Computer: A & B registers and LED outputs

Image
This is part of a series on the build of my 8-bit computer .  Registers and LED outputs Registers are an essential part of a CPU.  In my 8-bit computer build, I want to sneak in as many LEDs ( blinkenlights ) as possible to indicate the 8-bit values held in various registers, not only useful for debugging but also because it looks friggin' cool.  For my A and B registers, which will feed into the ALU, I'm using a 74LS245 as an output latch, and the 74LS377 D-type flip-flop to set the value of the register.  Note that the 74LS377 is an 8-bit version of the 4-bit 74LS173, which I would have to use two of to have an 8-bit register.  The schematic for each register is pretty straightforward, see below: For the LED output, I decided to use these LED bar displays with a 220 Ohm SIL resistor pack.  To save on breadboard space, I decided to try and fit both the A and B register on the same breadboard, along with an LED bar displays for each register.  With the 4 ICs and the 2 LED bar d

8-Bit Computer: Clock Module with Breakpoints

Image
Every 8-bit computer needs a clock module and here is mine.  It is heavily influenced by the Ben Eater clock module , but with some changes.  Firstly, what's the same?  The clock features two 555 clocks, one clock uses an astable 555 configuration and the second clock uses a monostable configuration for single clock stepping.  A third 555 implements a bistable configuration which acts as a selector between the two clocks.  I didn't have a SPDT switch, so used two push buttons instead, which works fine.  The circuitry for the 555s are shown on the top line of the circuit diagram at the bottom of the post. So what's different with my implementation of this clock module?  Firstly, regarding the logic for clock selection. I replaced the AND, OR and NOT logic gates that Ben uses with just NAND logic gates.  This was driven by a desire to use fewer ICs and because I didn't have any OR chips to hand!  In fact, if you just want to select between the clock source without a HALT

IoT Home Power Monitor with two components (and an ESP8266)

Image
I was looking at my electricity meter the other day when I noticed a red LED flashing every so often.  Looking closer I saw that it flashed for every 1/1000 of a kWh of electrical energy consumed.  Quite quickly I was running over the house, switching on various electrical items in different combinations, and counting roughly how many seconds between the red LED pulses.  Clearly the faster the flashing LED, the more quickly electricity is being used.  I was excited (because I get excited about such things), that I could potentially measure my electricity usage in real time by just watching this LED pulse.  From here it would be a snap to post this data to a server and provide remote domestic logging of power usage. I decided to use an ESP8266 NodeMCU (ESP-12E) as a powerful microcontroller to time the intervals, and very simple way of connecting to my home WiFi.  The light detection circuit is below and is embarrassingly simple: one light-dependent resistor, one resistor (1 MOhm, more

8-Bit Computer: UART Transceiver for breadboard computer

Image
You art UART I have an increasing fascination with building 8-bit computers from TTL chips, sparked by the excellent Ben Eater series on YouTube , and deepened by a variety of examples on Hackaday .  In the process of designing/building my own 8-bit computer, I wondered how easy it would be to implement a UART transceiver purely out of basic 7400 series ICs...    The finished design: UART Transceiver built from 7400 series ICs. 

SN76489 Arduino MIDI player

Image
I've been thinking about retro 8-bit computers recently and came across the audio chip SN76489  ( datasheet ), which has been used in the BBC Micro , Sega Genesis and Master System (among many others ).  The chips are capable of generating 3 independent frequencies simultaneously, as well as a 4th channel for noise.  They seemed easy enough to interact with, using a write pulse to load commands into the chip in a parallel-fashion.  I thought it would be fun to hook one up to an Arduino and play some retro game MIDI files through them!  It would be easy to take a few and make a MIDI synthesizer out of them too. All code for this project can be found at my Github here:  https://github.com/shepherdingelectrons/SN76489_player It's easy to pick up a few cheaply from the usual sort of places, so I bought a pack of 5, and then had a read through the datasheet , which is always fun!

Assembler for Ben Eater's 8-bit computer

Image
I've been thinking about 8-bit computers recently and came across the most excellent breadboard 8-bit computer series by Ben Eater .  Absolutely terrific stuff, fantastic break down of the subject and a clear and talented educator.  Like many, it got me pondering building my own 8-bit computer, modifying the original design to my specifications and writing custom opcodes and microcode.  Thinking about how to convert assembly language easily to machine code for such a custom computer, I wondered if there were any assemblers out there for assembling custom ASM.  It turns out there are, and the one I've been playing with is called... customasm .

EAGLE useful tips

Image
Eagle is a pretty useful piece of software for designing circuit schematics and PCBs.  I don't use it often enough to get really good at it however, and there are certain things in Eagle that I find myself having to "google" every time I want to do it!  So without further ado, this is my growing list of Eagle tips, in no particular order:

ATtiny Mario handset

Image
This is part 2 of my ATtiny Mario project - part one is here  -  a Mario-type game I made for the ATtiny85 AVR as a fun way of learning about the chip.  After writing the software, I decided I wanted a nice housing for the mass of wires on my breadboards and thought it would cool to put it into a NES-style controller, which is what this post will discuss.

ESP8266 low power DHT11 temperature and moisture remote sensor

Image
I have a problem with moisture in my loft.  After planning some intervention, I wanted a way to remotely monitor the humidity and temperature up there, and to visualise the data on a server.

ATtiny Mario

Image
ATtiny85 Mario Challenge! The ATtiny85 microcontroller is a capable but compact AVR.  However with only 8K of program memory, 512 bytes of EEPROM, 512 of SRAM and only 8 pins (3 of which are dedicated to the usual suspects of Vcc, GND and RESET), it best suited to performing tasks where memory demands are not large, and only a few pins are required for interfacing.