Experiment
← Apple iPhone, iPad, iPod | Alternative Energy-Electric Cars → |
Introduction:
During the experiment potentiometer is arranged in a manner that makes it possible for ADC to be carried out. Values obtained from ADC are changed to digital. This is then transferred to LCD to be displayed.
Various codes were developed to aid in the experiment. They include:
Put the code here
Variable ‘adc_value’ refers to the value of the adc returned by the function ‘read_adc()’. POT means 0x48 representing the pot in the ADCON0 which is sent to variable ‘setup adc’. This helps in setting up the adc and starting the ADC as it sets ADON=1. Meanwhile, loop 1 wehich is the fuction read adc reads values for adc. The return is stored in variable ‘adc value’. It is in the function that variables are defined while GO=1 is positioned to begin conversion. Till the conversion is over, GO==1 plays a major role.
Once the changing/convertion is over num is where the obtained data is transferred to. It is then taken back to the main function. The value adc is transferred to LCD to be displayed. After this, the whole systems/the program goes back to the main function performing similar operations of constantly reading adc values.
Result & Conclusion: It is established that the entire program was free from errors. Additionally the program was put into test through developmental boards. The exercised generated a program that was capable of setting up adc, reading data from the adc values, converting them to digital and showing the results through LCD. This can be seen in the figure shown below;
TAKE THE PICTURE OF THE LCD AND PUT IT HERE AKHI
In conclusion, the experiment was a success in teaching how to go about setting up of adc as well as using microcontroller in taking readings from potentiometer as well as displaying it via LCD.
Exercise 2:
Aim:
- To standardize the ADC
- To compute the resolution of ADC at different within the curve
- To compute errors in percentages of the points within the
Introduction: the experiment entails calibration of ADC. This is done by taking records of varying outputs of potentiometer. For instance at 0 Volt adc value which corresponds with it is recorded. From the outcome atable is generated which in turn help in obtaining adc. A formula for adc resolution is input voltage/digital ouput of adc. For instance at 5 volts at 1023 maximum digital out put; adc resolution is 5/1023=0.0048875
Conclusion: it is established that differing values of results from potentiometer, the corresponding ADC values after measuring and tabulation shows that adc resolution is 0.0048875.
Exercise 3:
Aim:
- To change the program developed in exercise 1 to show real voltage as read from potentiometer through the LCD
Introduction: the experiment is carried out like in experiment 1. And data is shown via LCD. However, instead of convering the data into digital, it is changed into analog value then showed via LCD. Conversion of adc value to the equivalent voltage was done by use of the formula; Analog=(adc_value/100) * (493.1034/10);
Major codes of the program:
In order to show the values obtained (voltage) through LCD ‘analog’ as a variable is transferred into the function labelled ‘display_voltage_value’. It is worth noting that this conitunes while the code enclosed in loop 1.
Result and Conclusion: The experiment entailed modification of experiment 1 in order to depict voltage read from the potentiometer on the LCD. The whole exercise worked without errors and attained it objectives of showing adc values and voltage on LCD
Exercises 4:
Aim:
- To adjust the program in the experiment to utilize LDR rather than potentiometer
Introduction: Resistors that depend on light do generate electric volt once an incident light fall on the resistor. LDR is linked to developmental board. It is worth to note that the set up of the program is similar to that in experiment 1. Nonetheless, it is different in terms of initialization of ADCON0 register. For this experiment ADCON0 is set at 0x80. ADC is switched on by utilizing ADON=1
Following is the main code:
Put the code here
The rest of the processe is similar as that carried previously in loop 1. The function adc reads the values adc from LDC. It eventually takes back the value to the program where adc value is stored. The program is distinct from the previous one as adc values are sent to PORTB lighting up LEDs representing adc values from LDR. This happens continuously since it is enclosed in loop 1.
Result and Conclusion: the experiment used LDR in accepting outputs as well as performing conversion of adc values to be shown in LEDs of the PORTB. The program was free of error and worked well in attaining the objectives. To establish that the program was working, it was observed that with varying fall of incident light on the resistor, there were varying values on LEDs.
Main Conclusion:
Various appliances that are analog need to be interfaced to a microcontroller for us to make calculations. In order to attain this, there is need of converting analog data into digital through adc conversion. A greater foundation is on use of adc program by help of LDR and potentiometer.
- Alternative Energy-Electric Cars
- Computer Engineering
- Apple iPhone, iPad, iPod
- Working with Computers
Sarah H.
Brooklyn, NY
|
|
|
As always, I can count on EssaysEmpire.com to never let me down. I had to place an emergency order and was worried that I had not given the writer enough time to do a good job. I was wrong. They did a tremendous job! Thanks ever so much! |
Grace T.
Purcell, OK
|
|
|
Thank you for assuring that only the best writers work for you. It doesn’t matter which writer has been assigned to my projects since I started using your services. Every time I get a paper written, it is perfect. |
Tom J.
Jackson, MI
|
|
|
Many thanks to your writers and customer service representatives for helping me get through a very difficult time in my college career. I needed writing assistance and your crew came through for me, big time! My papers were written impeccably. Thanks so much! |
Stephanie K.
Stowe, VT
|
|
|
Dear Sirs: Just a quick note to let you know that I appreciate your working on my paper so quickly. I did get it in time to turn it in for the deadline, even though I hadn’t given you much notice. I made a very good grade on it and was much relieved. Thanks again. You rock. |
Celeste H.
San Francisco, CA
|
|
|
EssaysEmpire.com always gives me a plagiarism report to prove that the work they wrote for me is authentic. I appreciate this. It helps eliminate worry. |
Billie N.
Atlanta, GA
|
|
|
EssaysEmpire.com is the only writing company that I can trust with my important writing projects. I have learned that I can count on your quality and ability without fail. Thank you, EssaysEmpire.com, for only hiring the best writers. I wouldn’t dream of using any other writing service. |
Cleo C.
Wichita, KS
|
|
|
To the writers at EssaysEmpire.com: Next week, I will be graduating with a degree in clinical psychology. Over the course of my college years, I have had to turn to you for help many times. Each and every time, you produced some of the highest quality writing my professors had ever seen. Because of you, I was able to keep a high grade point average and get into an excellent grad school. There are simply no words adequate enough to fully express my appreciation, so I’ll simply say, “thank you” and let it go at that. Please know that you are appreciated. |
Kathy M.
Las Cruces, NM
|
|
|
To EssaysEmpire.com: Thank you for my outstanding paper. When I read it, I knew that I would get an A+ on it. Also, thanks for adding all of the pertinent details that I asked you to customize. You did a brilliant job. Just brilliant. |
Alexandra Z.
Dallas, TX
|
|
|
I am sitting here reading over what your writing service offers and I just realized that you are the only one that offers free rewrites and full guarantees on your work. This tells me that you are an honest company that I want to do business with. |
Marcus H.
Eugene, OR
|
|
|
You’ve done it again! Every time I order a paper from EssaysEmpire.com, you top the last one. This latest one was the best yet. I truly do appreciate the fact that you offer such high quality writing. It never fails. With some of the other writing services online, you ever really know what you are going to get. Sometimes, they just sell you a paper that someone else has already bought. I never have to worry about things like that happening when I use EssaysEmpire.com. |
Marcy V.
Paris, FR
|
|
|
Given the short amount of time I gave your writers to create my term paper, I was amazed by how good it was when I received it back! It appeared they had spent months writing it, rather than just one week. Thank you, EssaysEmpire.com! I enjoyed doing business with you. You are a fabulous writing company. |
Doreen A.
Malibu, CA
|
|
|
Due to a family emergency, I was unable to complete a very important paper. Thanks to EssaysEmpire.com, I was able to hand in a well written paper and not sacrifice my grade. I will be forever grateful to your writing service for providing such outstanding work. Thank you so much. |
Terry M.
Sparta, NJ
|
|
|
I got an A+ on the paper that you guys wrote for me. I can’t believe it! THANKS!!!! Many, many thanks! This A+ added those few extra points that I needed to stay on the Dean’s Honor List. You’re the greatest, EssaysEmpire.com! |
Mike G.
Rochester, NY
|
|
|
Your writing service is different from other writing services. Yours is the only one I have ever dealt with that I can truthfully say is legitimate. The staff is very professional. The writers are the best in the business. I am pleased with the results of my last three orders and plan to return for more soon. |
John G.
Erie, PA
|
|
|
Thanks goes out to the writers who presented me with the best paper I have ever turned in. My professor was so impressed with it that he took excerpts from it to put in his class handouts on how to write the perfect paper. EssaysEmpire.com, you made me one proud student today! |
Celine H.
Calistoga, CA
|
|
|
Thanks for doing a great job on a paper that was an important part of my semester. You guys rock! |
Allen P.
Denver, CO
|
|
|
Writer #3827 is a great writer! I got an A+ on my very first paper of the term. This is the way to set the pace for the rest of the term. Thanks! |
Grace G.
London, UK
|
|
|
I was quite satisfied with the results of my paper order. EssaysEmpire.com sure has some good writers! I thought it might just be some college kids who were writing in their spare time to earn some extra bucks. No! EssaysEmpire.com hires legitimate writers. They all seem to be well educated and intelligent, too. My paper was terrific! |
Morgan W.
Eugene, OR
|
|
|
I don’t see how anyone could write a paper about something as boring as the psychology of the two year old, could make it sound so interesting, but your writers managed to pull it off. Thank you for putting forth such a concerted effort to do a good job. I really appreciate it. I will use your service again |
Steve C.
Marion, NE
|
|
|
Thank you so much! I was assigned a paper that I found impossible to write. I did the reading. I did the research. However, regardless of my weak attempts, I could not formulate a cogent paper. I needed help, and EssaysEmpire.com’s writers were there for me. Customer service even arranged for me to speak with the person who was working on my paper personally. I had a lot of concerns, because my professor was very picky. However, EssaysEmpire.com was able to handle the order with no problem |