Intel 4004 Microprocessor

In 1969, Nippon Calculating Machine Corporation approached Intel to design 12 custom chips for its new Busicom 141-PF printing calculator. Intel engineers suggested a family of just four chips, including one that could be programmed for use in a variety of products, setting in motion an engineering feat that dramatically altered the course of electronics.

Intel designed a set of four chips known as the MCS-4. It included a central processing unit (CPU) chip—the 4004—as well as a supporting read-only memory (ROM) chip for the custom applications programs, a random-access memory (RAM) chip for processing data, and a shift-register chip for the input/output (I/O) port.

Intel purchased the rights from Nippon Calculating Machine Corporation and launched the Intel® 4004 processor and its chipset with an advertisement in the November 15, 1971, issue of Electronic News: ”Announcing A New Era In Integrated Electronics.”

That’s when the Intel® 4004 became the first general-purpose programmable processor on the market—a “building block” that engineers could purchase and then customize with software to perform different functions in a wide variety of electronic devices.

The Intel® 4004 microprocessor circuit line width was 10 microns, or 10,000 nanometers. Today, the circuit features of Intel® microprocessors range between 45 and 32 nanometers. By comparison, an average human hair is 100,000 nanometers wide.

Reading differential voltage

Some ADCs in the market allow you to read differential voltage. How is this different from single ended voltage? Single ended voltage is the potential difference between a node and ground. Differential voltage is the potential difference between two nodes. A use case of measuring differential voltage is to measure the current flowing in a circuit by measuring the voltage across a shunt resistor.

You’ve picked the ADC you want to use, in my case LTC2990 and in the datasheet it shows the differential voltage range as -0.3V to +0.3V. But this is not the only thing spec you need to design for! Be sure to check what common mode voltage can the sensor allow on the differential voltage measuring pins. Usually it won’t be more than Vcc (supply voltage of the sensor chip).

Lets take an example. You want to measure the current going into a Li-ion cell with voltage range 2.8V to 4.2V. Say the max current that can be used for charging the cell is 1.5A. You spec your shunt resistor at 0.2 ohm, so that the differential voltage does not exceed 0.3V. Your LTC2990 ADC chip is running on a Vcc supply of 3.3V. Will your design work? The answer is no. It is because the common mode voltage can go upto 4.2V on the differential pins which is greater than the supply voltage (3.3V) of the ADC chip.

Virtual box shared folder

I always run into a problem attaching a shared folder to my Ubuntu virtual box machine. This is what works for me.

1. Make sure you have the latest version of guest additions installed.
2. Add a shared folder using the virtual box menu and auto mount it
3. Turn on the virtual machine. Browse to /media/sf_*sharedfoldername*
4. By default with auto-mount, the shared folder will have permissions assigned to vboxsf. You need to add your current user and maybe also root to the vboxsf group so they get access to the shared folder
5. usermod -aG vboxsf <youruser>
usermod -aG vboxsf root
6. Restart virtual machine
7. Now you should have access to the shared folder under /media/sf_*sharedfoldername*


Beaglebone Black using SD card as extra storage

These instructions are to use an SD card as extra storage on your beaglebone black. The beaglebone boots from internal memory and has micro SD card available for storage.

I used a Ubuntu operating system (running inside Virtual Box) to format the SD card and create the uEnv.txt file that tells the BBB not to use it as a booting device, but as external storage. My host comuputer operating system is Windows 7.

A. Format the SD card – Follow these steps

1. Insert the microSD into a USB hub on computer
2. Mount the SD card in virtual box
3. Open Disks utility
4. Click Format and format the drive

B. Create uEnv.txt on SD card
1. Open the the volume with the file explorer and create a new file in it named uEnv.txt
2. Right Click > Create Document > Empty File
3. Open uEnv.txt and fill it with the following 4 lines of code:

mmcroot=/dev/mmcblk1p2 ro

C. Configure beaglebone to attach SD card on boot
1. Insert microSD in beaglebone and open ssh terminal, connect to beaglebone
2. nano to /etc/fstab file. You might need to provide chmod administrative write access for the file
3. Add the following line of code to the file

/dev/mmcblk0p1    /media/card     auto     auto,rw,async,user,nofail  0  0


D. Restart beaglebone

Resizing Virtual Box HD

Host machine running Windows 7
VB machine running Ubuntu
Task at hand: Increase disk space of VB machine1. Open up command prompt in host machine
Navigate to C:\Program Files\Oracle\VirtualBox

Type the following command:
VBoxManage modifyhd “C:/PATH/VB_HARD_DISK.vdi” –resize SIZE_IN_MB 


2. New hard drive space will be unallocated and has to be merged into the original hard disk. Follow instructions on this article.

— Start from Step 3

SPI and an example application – Programming ATtiny85 with Arduino as ISP

In Non-Engineering Speak
The following post explains a communication protocol used to transfer data between two devices synchronously. Data is transferred serially, which means one bit at a time. Due to its special design, at a particular time, as a device is transmitting a particular bit, it also receives a bit from the other device.

What is SPI?

SPI is a synchronous serial transfer data protocol.

The two devices between which the data is being transferred are called the Master and Slave.
There is a full duplex connection between the two. There can only be one master at a time, but the SPI controllers can take turns being masters.

Master – Initiates connection. Provides clock source – SCK.
Slave – Receives data from Master’s SPI register and sends data to Master’s SPI register, forming a circular buffer.

Both Master and Slave have a 8 bit shift register. Register size can vary depending on the microcontroller, but it should be the same for both Master and Slave.

The SPI interface consists of 3 wires:
1. Serial Clock (SCK)
2. Master In – Slave Out (MISO)
3. Master Out – Slave In (MOSI)
4. (Optional) SS’ – Slave select. (If more than 1 slave)

How does it work?

SPI Connections
SPI Circular Buffer Data Flow Animation


At every clock pulse, a bit is transferred from the master to the slave and a bit from the slave to the master as shown in the animation above. The microcontroller can set be set to transfer the least significant or the most significant bit first.

Application of SPI

In this example, In-Circuit Serial Programming (ISP) uses the SPI protocol to communicate between the ATMega328 microcontroller on the Arduino and the ATtiny85 microcontroller on the breadboard.

Here are some points of caution:

– When programming the AVR, the ISP always operates as the Master, and the target system always operates as the Slave.

– GND should be common.

– To stay in SPI mode, the AVR micro reset line has to be kept active (low).

– Reset has to be pulsed to end Chip Erase cycle.

– ISP should keep the entire target system reset for the duration of programming cycle.

– Target system should not attempt to drive SPI lines while reset is active.

Wiring Diagram



error: Content is protected