Simple 8051 Programming and Digital Design With VHDL

Introduction Embedded systems are task specific systems often with real time computing constraints used to control devic

Views 32 Downloads 0 File size 573KB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

Introduction Embedded systems are task specific systems often with real time computing constraints used to control devices. Made for versatile capabilities, are found within a larger system thus the name embedded, like in phones, automobiles, washing machines etc. Integrated Circuits (IC) or chips are semiconductor wafer circuit packaging for deployed and implementation in electronics designs. A single chip could thousands or millions of transistors, resistors, capacitors or other electronics components and circuit designs. ICs could have digital or analogue functionalities on. Typical examples are amplifiers, logic gates (AND, OR, XOR etc), oscillators, timers, computers (microcontrollers and microprocessors) (CIO, 2012). 8051 microcontrollers are Harvard architecture based micro computer chips developed by Intel for embedded systems design (John, 1980). Has 8-bit CPU, I/O peripherals(32 bidirectional), program(64K) and data(64K) memories address spaces, [RAM(128 bytes), ROM (4 k-bytes)], counter/timers(two(2) 16 bit)], 6-source/5vector interrupt structure with two(2) priority levels and full duplex UART on a single chip (Intel, 1994). A design exercise with 8051 programming and hardware implementation is demonstrated in this assignment. VHDL is VHSIC (Very High Speed Integrated Circuit) Hardware Description Language would be used to design digital circuits in Altera Quartus II software.

1

Procedure and Results Question 1 A program which writes the last two (2) digits of a student’s Stamford ID into the 8051 microcontroller’s internal RAM addresses from 40h to 6Fh with the same data. Assuming the last two (2) digits of ID as a decimal number and crystal oscillator is 11.0592MHz. Stamford students ID = 1119930 Last two(2) digits of my ID = 30 Program code: #include

//special function declaration to include/add 8051 header file

unsigned int A;

// initializing the variable A

unsigned char *ptr;

// store a location in pointer, declare pointer

void main(void)

// main has no return value

{ while(1)

//Loop/Run continuously, until blocked

{ ptr = 0x40;

// pointer address, RAM address 40h

A = 30;

// Loads 30 into A

for (ptr = 0x40; ptr