how to interface lm35 with fpga code in verilog
#1

i need varilog code of temperature sensor LM35 interfacing with fpga and display it on 16x4 screen.
Reply
#2

The are many cool sensors available now a days, ranging from IR distance sensor modules, accelerometers, humidity sensors, temperature sensors and many many more(gas sensors, alcohol sensor, motion sensors, touch screens). Many of these are analog in nature. That means they give a voltage output that varies directly (and linearly) with the sensed quantity. For example in LM35 temperature sensor, the output voltage is 10mV per degree centigrade. That means if output is 300mV then the temperature is 30 degrees. In this tutorial we will learn how to interface LM35 temperature sensor with PIC18F4520 microcontroller and display its output on the LCD module.

First I recommend you to go and read the following tutorial as they are the base of this small project.

Interfacing LCD Module with PIC Microcontrollers.
Making the LCD Expansion Board for PIC18F4520.
Using the ADC of PIC Microcontrollers.
After reading the ADC tutorial given above you will note the the PIC MCU’s ADC gives us the value between 0-1023 for input voltage of 0 to 5v provided it is configured exactly as in the above tutorial. So if the reading is 0 then input is 0v, if reading is 1023 then input is 5v. So in general form if the adc read out is val then voltage is.

unsigned int val;
val=ADCRead(0); //Read Channel 0
voltage= ((val)/1023.0)*5;
The above formula give voltage in Volts, to get Voltage in mili Volts (mV) we must multiply it with 1000, so

voltage=((val)/1023.0)*5*1000); //Voltage is in mV
since 10mV = 1 degree, to get temperature we must divide it by 10, so

t=((val)/1023.0)*5*100); //t is in degree centigrade
simplifying further we get

t=((val/1023.0)*500);
t=(val*0.48876);
we round off this value, so

t=round(val*0.48876);
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: c code to interface 8051and mq6, how to interface lm35 with fpga code in verilog, interface lm35 with lpc2138, lm35 interface with 8051, code for fan speed regulation using lm35, www val pepar com, lm35 interface with lm324 ic,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  bresenham line algorithm verilog 1 735 11-06-2016, 03:53 PM
Last Post: dhanabhagya
  16 bit kogge stone adder verilog code 1 999 08-06-2016, 04:26 PM
Last Post: dhanabhagya
  verilog code for line following robot 1 576 08-06-2016, 04:24 PM
Last Post: dhanabhagya
  verilog source code for elliptic curve cryptography 1 593 03-06-2016, 04:20 PM
Last Post: dhanabhagya
  verilog code for a water level controller 1 747 31-05-2016, 12:33 PM
Last Post: dhanabhagya
  interfacing ldr in fpga using vhdl 1 617 31-05-2016, 11:56 AM
Last Post: dhanabhagya
Thumbs Up temperature sensor using lm35 and adc 0808 and at89c52 1 926 27-05-2016, 02:12 PM
Last Post: dhanabhagya
  4x4 multiplier using compressor verilog code 1 645 27-05-2016, 11:19 AM
Last Post: dhanabhagya
  elevator control source code verilog 1 720 25-05-2016, 12:12 PM
Last Post: dhanabhagya
  lm35 temperature sensor with 8051 ppt 1 645 19-05-2016, 03:43 PM
Last Post: dhanabhagya

Forum Jump: