Program to Read from external memory 8051 Expriments by Ravinder Nath Rajotiya - June 3, 2021May 9, 20220 Objectives: To learn interfacing of external memory with 8051 To understand the instructions for accessing the memory To develop a program to read and write data to external memory Theory: 8051 Microcontroller on the other hand has onchip 4KB of ROM and 128B of RAM. 8052 has 8KB of program memory (ROM) and 256 bytes of data memory (RAM). For simple to less complex applications this is sufficent, but, If the program and data tend to be larger and require more memory than available on 8051/8052 then external RAM and ROM can be interfaced with 8051 microcontroller. Thus, there is a provision of connecting both external RAM and ROM i.e., Data Memory and Program. Interfacing memory with 8051 We can interface a maximum of
Timer Programming in 8051 8051 Expriments by Ravinder Nath Rajotiya - December 4, 2020May 27, 20210 Programming 8051 Timers Registers used for normal operation (No interrupts) TMOD, TH1,TL1, TH0, TL0, and TCON TMOD to set the Mode Timer Register to set the count TCON to start and stop the timer Registers used for Interrupt operation IE, TMOD, TH1,TL1, TH0, TL0, and TCON TMOD to set the Mode Timer-0 and Timer-1 Register to set the count TCON to start and stop the timer Register Formats: Interrupt Enable (IE) Register IE.7 IE.6 IE.5 IE.4 IE.3 IE.2 IE.1 IE.0 EA ET2 ES ET1 EX1 ET0 EX0 =0, disable =1 enable -- Enable/disable serial port interrupt Enable/disable timer-1 Ov interrupt Enable/disable external interrupt-1 Enable/disable timer-0 Ov interrupt Enable/disable external interrupt-0 TMOD Register: Timer-1 Timer-0 GATE C/T’ M1 M0 GATE C/T’ M1 M0 =1; The timer/counter enabled while INTx and TRx bit is set =0, timer enabled whenever TRx bit is set 1 = Counter 0=Timer 00=13 bit timer mode (8-bit timer/counter with TLx as 5-bit prescalar 01=16 bit timer mode, THx and TLx cascaded,
8051 Experiment-1: Introduction to KIT ET-8031/51 8051 Expriments by Ravinder Nath Rajotiya - October 10, 2020May 27, 20210 Introduction to Hardware ET-8031/51 KIT: General: 8-bit 8031/8051 microcontroller operating at 10/12 MHz with on-chip oscillator and clock circuit, 8 i/o lines, two 16-bit timers/counters, five sources of interrupt structure. 64 KB of external program memory and 64 KB of data memory. Memory: Kit has 8KB RAM using IC 6264 and 32KB of EEPROM monitor using IC 27256 There is a memory space provided for memory expansion, the space can be defined for an address from 4000 – FFFF depending upon size of memory chip to be used. I/O Devices: The kit uses 8279 programmable KB-display controller, 8253- programmable interval timer, 8255 –programmable peripheral interface, peripheral chips. These are explained below: 8279 –Programmable KB and display controller:It is a general