Archive for September, 2006

Distance Measurement Sensor

GP2Y0A21YK is General Purpose Type Distance Measuring Sensors from Sharp. (see the product page). Sharp Infrared (IR) radiation Distance Measuring Sensor use Infrared signal to measure object distance from 10 to 80 cm with analog output.
Features

Less influence on the color of reflective objects, reflectivity
Line-up of distance output/distance judgement type
Distance output type (analog voltage) : [...]

Servo Motor Control

Servos
Servos are DC motors with built in gearing and feedback control loop circuitry. And no motor drivers required. They are extremely popular with robot, RC plane, and RC boat builders. Most servo motors can rotate about 90 to 180 degrees. Some rotate through a full 360 degrees or more.
However, servos are unable to [...]

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 [...]

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 [...]

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 [...]

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 to [...]

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, Simulator for 8051
Installing FlashMagic, ISP [...]

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 X2 [...]