Archive for the 'Microcontrollers' Category

EEPROMs Interfacing

24LC512 is a 64K x 8 (512 Kbit) Serial Electrically Erasable PROM (EEPROMs), from Microchip Technology Inc. (see the product page). It has been developed for advanced, low-power applications such as personal communications and data acquisition. This device also has a page write capability of up to 128 bytes of data. This device is capable [...]

Real Time Clock Interfacing

DS1307, a 64 x 8, Serial, I2C Real-Time Clock, is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially through an I2C, bidirectional bus. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. It a product of Maxim/Dallas Semiconductor, see the product [...]

I²C Bus Interfacing

I²C bus (Inter-Integrated Circuit) is a bidirectional, half duplex, two-wire, synchoronous bus, originally designed for interconnection over short distances within a piece of equipment. The I2C bus uses two lines called Serial Clock Line (SCL) and Serial Data Lines (SDA). Both lines are pulled high via a resistor (Rpu) as shown in Figure below. The [...]

Analog-to-Digital Interfacing

The ADS7841 is a 4-channel, 12-bit sampling Analog-to-Digital Converter (ADC) with a synchronous serial interface. The resolution is programmable to either 8 bits or 12 bits. It is a product of Burr-Brown form Texas Instrument, see the product page. This ADC give the 12-bit Binary Code Decimal (BCD) output value therefore the maximum value is [...]

LCD interfacing

This is an example how to interface to the standard Hitachi-44780 LCD using an 8051 microcontroller and SDCC as C Compiler. I use a standard 16-character by 2-line LCD module, see schematic below. Here, I use 4-bit interfacing. Schematic: 4-bit interfacing 16×2 LCD Source Code (For SDCC) – lcd.h – test_lcd.c Related Links – How [...]

Installing MIDE-51 and SDCC and for Win32

This page is an installation guide for someone who are interested in developing 8051 microcontrllor with C-language. All of tools I selected are freeware or opensource with no limitation of number of lines of your code. Contents Installing MIDE-51, Editor for 8051 Installing SDCC, C Compiler for 8051 Installing ASEM-51, Assembler for 8051 Installing JSIM-51, [...]

Introduction to SDCC: Small Device C Compiler

SDCC is a Freeware, retargettable, optimizing ANSI – C compiler that targets the Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08 based MCUs. Work is in progress on supporting the Microchip PIC16 and PIC18 series. AVR and gbz80 ports are no longer maintained. The entire source code for the compiler is distributed under [...]

Philips P89V51RD2 Microcontroller

I am using Philips P89V51RD2 as 8051 Microcontroller Unit (MCU). And I have been developing my code with Opensouce C Compiler SDCC. Please visit my Tools page for software preparation guides. The P89V51RD2 is a 80C51 microcontroller with 64 kB Flash and 1024 bytes of data RAM. A key feature of the P89V51RD2 is its [...]

Introduction to 8051 Microcontroller

The 8051 is an 8 bit microcontroller originally developed by Intel in 1980. It is the world’s most popular microcontroller core, made by many independent manufacturers (truly multi-sourced). There were 126 million 8051s (and variants) shipped in 1993!! A typical 8051 contains: CPU with boolean processor 5 or 6 interrupts: 2 are external 2 priority [...]