Innlegg

Reverse engineering PCBs with KiCAD 7

In this Article we will be looking at replicating a PCB using KiCAD 7, and it's new Background Bitmap image feature. With the bitmap image feature it is much easier to replicate PCB designs. Before I have used sprint layout and kicad in a complicated process. Capturing images A scanner is hands down the best tool you can use for getting a good result. You can use a camera for smaller boards, but for larger boards you quickly run into problems. Image scaling Because KiCAD 7 not yet have separate x/y scaling, and x and y scaling is not equal usually, you have to scale them separately in a photo editor, like GIMP. When the image is loaded, set the DPI of the image to the same as the settings of the scanner. It is usually 600, but sometimes 1200 (or even 300). When you have set the correct DPI, the ruler tool should yield distances close to the real thing. Find two points on the board in the X direction that you know the distance of.  Use the (GIMP) ruler tool to measure them. Take not

Programming an ATTiny85 for low power fridge alarm

Bilde
This project is about a fridge alarm powered by solar cells, and energy stored in super capasitors. It is mostly about programming the ATtiny85 MCU in Assembly. I wanted to learn more about the AVR core. That is why I programmed using assembly language. The program is very short, and the features of C is not needed. The circuit has an AEM SUCA R2 as power supply, an ATTiny85, one IR diode, one photodiode, a 2n7000 NMOS driving a magnetic transducer. Unfortunately in this testing I don't have a microamps meter. I've been monitoring the voltage decent of two parallel capacitors of total 3000uF. Why AVRA AVRA is an assembler for Atmel AVR microcontrollers. It is simple and effective. It's open source. There are examples here at 043-045 that gets you going. Also lately I've been using Linux more and more, and installing AVRA was just a single command line. The program The flow diagram shown above is the whole program. The program checks the sensors every 8 seconds and

Designing the Videopac SDCart. Pt.3 Arduino and Videpac data transactions

Bilde
Introduction In the last post (Pt.2) we got a game from the sdcart transfered to the Videopac. This was done while holding the system in reset while taking over the databus. This worked but I wasn't happy with having 20 I/Os of data, address, and control going through transievers. In this part 3 we switch to having a single 8-bit buffer on the arduino that the vp can access, and let the videopac control the system bus at all time. Less bus-transceivers, allthough I need to store the menu program on ROM and not SD card. We will look at:  Bustransciever and control  bus activity  Find I/O on the cart port for serial tx Prototyping I'm using Sören Gust's ramcart, the aswcurr assembler and sometimes the o2em emulator. My design is partly based on the ramcart (menu rom and game in ram). Prototyping: Videopac, Arduino nano, 74LS245, 74LS00, and Digilent Digital Discovery 2. Preliminary schematic: The atmega328p and the bustransceiver: Serial TX I/O

Designing the Videopac SDCart. 2: The SD Cart demo

Bilde
Introduction I managed to get several ROM binaries on an SD card to interface and run on the Videopac G7000. Last weekend I made a video about the progress so far. It was not all easy. The damn roms wouldn't run from the SRAM. Some problems were ironed out, but remaining was the problem of which address lines to use. The buses were isolated with three 8-bit transcievers, but two of them might be replaced by resistors. Sören Gust's gold mine recide in the archive.org. It was complete with design files for the G7000 RAM cart where you can connect a PC and transfer a ROM via serial. He also shared his source code and documents on the bios library. The Program Memory Map Often address line A10 is not used in game carts. Lets have a look at the memory map. In the program memory map for the Intel 8048, the first 1kb is reserved for the internal program memory, and the remaining 3kb is external program memory. These are accessed with A11..A0. Port1 pins P0 and P1 can be

Designing the Videopac SDCart. 1: The MCU and system bus.

Introduction We will look at the Videopac's digitial system. It is a cartridge based gaming console. The intention of these blog series is to design an SDcard interface. First I'd like to get to know the system, and I will be focusing on the signals present at the Cartridge port. System specs CPU: Intel 8048 8-bit @ 1,79 MHz Memory: RAM: 64 bytes AV-RAM: 128 bytes BIOS-ROM: 1k bytes Cartridges: 2k, 4k and 8k bytes   The Intel 8048 microcontroller The videopac has a MCU with 1k bytes of BIOS ROM.   27 I/O 8-bit timer/counter  Onboard oscillator/clock circuits Address latch enable (ALE) 96 instructions, 1 and 2 bytes long. The Data and address signals are transfered on the same 8-bit BUS. For each instruction fetch, the processor put the address on the BUS, latch it with the latch ALE strobe, and then read the instruction on the BUS driven by a ROM. The digital design of the Videopac The 8048 MCU has an internal rom preprogrammed with a bios. Th

The Videopac G7000 composite mod

Bilde
   Introduction This is a write-up of my experience with a custom composite mod board for the Videopac G7000 game console, and the mod installation. The write-up is based on my youtube video below (the second one). In this blog post we will demonstrate the installation and picture quality. The sites gamesx and coolretroprojects linked below have installation instructions and schematics. Coolretroprojects sell a board, and they have a nice installation manual in PDF format. Links: http://gamesx.com/wiki/doku.php?id=av%3Ag7000_av#picture_of_g7000_internals http://www.coolretroprojects.com/Mods-Kits.html Videos: Video: Building a circuit for a friend of mine. Video: Installing the composite mod. This is the video you are reading a write-up of right now. Background The Videopac G7000 also known as Odyssey 2, however different internally and different composite mod board for it. The G7000 was introduced to the market in 1978. It has a RF modulator only..

The Beam and Ball Project - Part 2 Servo Control

Bilde
  Software (continued) Servo Control To control the servo the microcontroller need to produce this 50 Hz waveform shown below. The resolution is defined by the microcontroller because the servo is an analog device. There are mainly three ways of doing it. Delays Set output, then do delay. This is a bad way of doing it. The program is halted for every delay. However if you want to mash up some code to test your servo, this is the way to go. Consumes the whole CPU Good and quick technique to test servos. Hardware PWM The most positive about hardware PWM is that the overhead is 0. The CPU usage is practically zero, and only one or two instruction cycles are used to set a new pulsewidth. Running the PWM at 50Hz demands that the PIC16F887 is ran in max 1 MHz due to max prescaler settings. So at the beginning of the project I went with 1 MHz. The 10bit capable Hardware PWM uses a CCPx module, and TMR2. TMR2 is 8 bit, however the remaining two least significant b

The Beam and Ball Project - Part 1 Setup and distance measurement

Bilde
This is a write-up for my YouTube series: Introduction The hardware and designing a function for the distance measurement. So I've always wanted to learn PID Control. It's a closed loop control system used to move and regulate something into a given target. PID control is fairly simple to implement, however the math behind can be intimidating for anyone. I remember back in College that I was put off by all the focus on differential equations. However PID control was a great subject to learn diff-equations, don't get me wrong. The main concept of PID got lost for me a long the way back then. To get me started again what isn' better than doing a fun project that involves this form of control. Here is a link to my Beam and Ball Project series on YouTube. https://youtu.be/R5ryRxh4_7c?list=PLtQOf_JULmrQr-Htio6THf0MxvWWyOdG_ The Hardware  A good way for me to get started was to digg out my trusty EasyPIC5 development board from MikroElektronika from 2008. It has

Commodore 1541C repair

Bilde
I bought a Commodore 1541C drive a while ago. It was sold as a faulty unit. The seller said it was broken, and that it makes chattering noises. The chattering noise is normal at power-up because the head is pulled back by the stepper motor and hits the end-stop, but he did also say that it didn't read disks. I have cleaned the heads, and it does read disks, however the motor never stop! The fault I have now is that the motor spins continuously. I measured motor control signals at the gate-array after the CIA IC, and motor control signal looks ok there. The signal is high at power-on and then goes low (stop) after the start-up sequence as expected. In the schematic below the motor signal from the gate-array comes in on one of the inputs of the inverter UC6. The CR10 is shorted by traces on the PCB, because UC6 is 74LS06 and not a 04 as it says in the schematics. This is because 06 has open-collector outputs, and therefore doesn't need a diode to isolate it from whatever comes

C64 "Searching for $" Serial Buss issue repaired

Bilde
After playing with a C64 i picked up recently and the disk drive that came with it, I notcied that loading failed once in a while.. It was not the disk or the drive, because by trying the drive on my other C64 the drive works. I read online that on the Serial Bus there are buffers with open collector output (7604) and they fail often. I replaced one and, Voilá !

C64 SID trouble

Bilde
SID chips fail all the time and especially the filters fail often. One SID chip is not equal to another. Been experiensing various weirdness with the audio from the C64. Audio seems very sharp but some games sid tunes sounds as if a channel is missing. However the case is not that simple. Listen to the track at about 9 minutes in. Nice and crisp synth sound however the bass lead is missing.. You can hear the same tune but with propper filtered bass lead recordded from a good SID chip here at 6:28: My video above also has a track of Jeroen Tel Robocop. To me it sounds fine. Great Giana sisters is missing some parts of the audio and the wind noise in the very beginning of the game is gone. In the image below I've used a BASIC program called SIDBench , and all channels and waveforms seem fine except when filters are switched on. Below you can see three recordings of audio from running SIDbench on several chips.. Recordings are lined up in Audacity and view mode is Spect

Commodore 64 29y later + composite mod

Bilde
Welcome to my first blog post. This blog will cover my repair and mod adventure of old computers. Mostly the C64. Computer architecture will be discussed later where I look at a simple cpu starting with the accumulator. We will build it with descrete components and make so slow that we can see and feel where information is moving.. This is my first videoe where I brought my trusty old Commodore 64 out of the cupboard, and inspect it for capacitor leaks and corrosion. The RF moduler has been ruined once in the 80s, but no need for that in 2015. The RF output is repurpose as a composite output with a simple modification. The modulator gets a wire from Composite signal to the RF RCA connector. The RF signal was cut from the board.  The pcb and traces in the middle of the pic shows some signs of corrotion, but I'm not sure. However there is exposed traces there. Couldn't find corrotion here, but these caps might need replacing soon. In