Code, flowchart and Proteus simulation is given in the 'Downloads' section at the bottom of this page. It is assumed that you know how to interface LCD and ADC with 8051 micro-controller.
The result of the Proteus simulation is shown below.
In the above figure, we can see that a read of voltmeter and ohmmeter is shown on the screen. The processor keep scanning for change of analog signals of voltmeter and ohmmeter circuits sequentially and frequently. If some change happens equal to one step size (5/255=19.61mV) or more, the processor calculate the new reads and print it.
Flowchart
The flowchart describes the main routine and each one of the three subroutines included at the assembly code.
The program acts as follows:
- Initialize the memory and LCD for display after powering up.
- Convert analog voltage signal on IN0 of ADC to 8-bit digital signal.
- Calculate and print voltage value (Vin = Digital signal * Step size)
- Convert analog voltage signal on IN1 of ADC to 8-bit digital signal.
- Calculate and print resistance value by voltage divider method.
- Forever repeat steps from 2 to 5
Features
- Good sensitivity for voltmeter.
- Ohmmeter resistivity ranges up to 9.7 KΩ.
- No need of external clocking source for ADC.
- No need of switches for voltmeter and ohmmeter mode multiplexing.
Downloads
The code was compiled in Kiel uVision 4 and simulation was made in Proteus v7.8 SP2.
To download code, flowchart and simulation click here
THIS IS AMAZING AND FANTASTIC
ReplyDeletePretty element of content. I simply stumbled upon your website and in accession
ReplyDeletecapital to claim that I get in fact loved account your weblog posts.
Anyway I will be subscribing for your augment and even I fulfillment you get admission to persistently quickly.
I am really glad I've found this information. Nowadays bloggers publish just about gossips and net and this is actually frustrating. A good web site with exciting content, that's what I need. Thanks for keeping this site, I'll be visiting it. Do you do newsletters? Can't find it.
ReplyDeletesalam
ReplyDeletei want assembly code of digital clock without using timer. can u help me sir .
Sure, It's achievable by casual delay routines using registers R0-R7 and DJNZ instruction. It seems to be a little bit harder but don't worry. I will try and give you the accurate tested substitution subroutine in two days :)
ReplyDelete