This is the last post of pressure sensor project based on microcontroller 8051. The code is written in assembly language.Data Collection Analog to Digital Conversion and Communicating ,It uses an ADC0804 chip to convert from analog to digital and an AT89C2051 is interfaced with ADC and LCD.
Below is Assembly Language code for Microcontroller 8051 project; this code have all the features including, ADC interface with microcontroller 8051, getting data from ADC to microcontroller, controlling seven segment display with microcontroller, performing required calculation of pressure from measured voltages using formula described in previous post. And serial communication with microcontroller and PC through RS232 port.circuit diagram and assembly language program for interfacing of ADC Samples of 89c2051 interfacing with MAX 233/ ADC0804 an assembly language program and loading it into the microcontroller.
main: clr p3.7 ;this is for WR signal of ADC to give it a rising edge
call delay ;
setb p3.7 ;
clr p3.6 ; to clear the RD signal of ADC
mov a, p0 ; latches data at port A
setb p3.6 ; to set the RD of ADC
subb a,#50h ; received data is displaced by 80 so it is
mov r3, a
div ab ; used to convert the two digit BCD to BINARY
mov dptr,#data_table ;to read the seven segment code against a Binary ;form the Code Memory
mov a, r0
movc a, @a+dptr
mov r0, a
mov a, r1
movc a, @a+dptr
mov r1, a
TO_FORCE: ; the pressure transducer having different parameters
mov r4, #1 ;1 is the spring constant (supposed)
mov b, r4
TO_PRESSURE: ; in this subroutine the pressure is calculated from the incoming data and using formula
mov r4, #1 ;1 is the Area of the cylinder ( supposed )
mov b, r4
mov r0, #127
djnz r0, $
data_table: db 7eh,30h,60h,79h,13h,5bh,5fh,70h,7fh,77h
INITILIZE_SERIAL:; In this subroutine the required initialization of the serial communication is done, ;different registers of microcontroller are initialized to get response from RS232
;intilize the timer 1 in auto reload mode
;and then set the baud rate 2400 in mode1 of
MOV SCON,#01000000B; it is the serial control register of microcontroller 8051
MOV TMOD,#20H; timer mode of microcontroller 8051 is selected here
MOV TH1,#-12; upper byte of timer 1 is feed
SEND_TO_PC: This subroutine sends data to PC from Microcontroller 8051 using RS232 serial communication
MOV SBUF,A; serial buffer register SBUF is feed the data in register A
Example Assembly language code/ program for microcontroller 8051, how to display results on seven segment, seven segment display controlling with microcontroller 8051, seven segment display controlling program in assembly language, Interfacing of ADC with microcontroller 8051 in assembly language, example program in assembly language for the control and interfacing of adc with 8051 microcontroller, serial communication with PC through RS232 in assembly language, how to have serial serial communication with PC and micro controller in assembly language, subroutine for RS232 serial communication,assembly language examples,assembly language tutorial,learn assembly language,assembly language pdf,high level language,machine language,low level language,assembler,seven segment data sheet,8051 interfacing with adc seven segment display datasheet,seven segment display interfacing,seven segment display decoder,seven segment display circuits,seven segment datasheet,seven segment led digit delphi,seven segment digital clock,microcontroller basics,microcontroller 8051,microcontroller applications,microcontroller tutorial,microcontroller projects,microcontroller vs microprocessor,pic Digital Voltmeter Using ADC0804, 8051, and 7 LED Display : 8051 microcontroller,microprocessor assembly language code, assembly code,assembly code help,assembly code projects,assembly code circuits,machine code
BACK to Content Page
. Previous Page
Monday, November 29, 2010
Assembly Language code for Microcontroller 8051 project
microcontroller 8051 security alarm based system circuits GSM based Home security system hidden camerasGSM based home security system project using microcontroller 8051. Main aim of this project is to provide sms based tracking of different lo...
MOVING MESSAGE DISPLAY USING ATMEL 89C51 LED moving message diaply using PIC16f628 CD4017 and 74LS595 moving message display using 8051 m...
The use of microcontroller is in every field even we can use it in the design and fabrication of biomedical equipments. A little example is ...
GSM modem interfacing with microcontroller 8051 for SMS control of industrial equipments:- This is a beginner tutorial in which a GSM modem...
This is revised version of heart beat monitor using 8051 heart beat monitor located in this blog ob post. http://microcontroller51.blogspo...
4 The Hardware Description of the Automatic carparking project using microcontroller 8051 4.1 Stepper Motor Control Board This board have ...
The most character LCD module can be interface with micro-controller in any of these two ways of interface: 1. 4-Bit Interface ( a litt...
This is ciruit diagram of interfacing of LCD with microcontroller 8051 family. This project was to measure heart beat and to display on LC...
Three stories Lift or Elevator controller with microcontroller At89c51 In this project, we will learn circuit design for a elevator, how ...
SMS Based Controlling Different Industrial Machines Using GSM Mobile and microcontroller 8051 This project (interfacing mobile phone with m...