ds1820 interfacing with avr primer


Posted on Feb 6, 2014

The circuit shows how to interface the ds1820 to microcontroller. As you can see the first pin is connected to GND, the third pin is connected to VCC & the second pin is connected to the Microcontroller. So when the temperature is sensing, it give the sensor reading to controller. We now want to read the temperature in AVR Primer Board from temperature sensor ds1820.


ds1820 interfacing with avr primer
Click here to download the full size of the above Circuit.

AVR Primer board uses the PORTA pin for reading temperature from temperature sensor ds1820. The reading output is displayed into PC through UART. To compile the above C code you need the CodeVision AVR software. The software has it`s own IDE and built-in AVR gcc- Compiler. They must be properly installed and a project with correct settings must be created in order to compile the code. To compile the above code, the C file must be added to the project. In CodeVision AVR software, you can develop or debug the project without any hardware setup. You must compile the code for generating HEX file. In debugging Mode, you want to check the port output without microcontroller Board. Give +12V power supply to AVR Primer Board; the serial cable is connected between the controller and PC. Open the Hyper Terminal screen, select which port you are using and set the default settings. Now the screen should show the current temperature readings. Bring a Hot soldering iron tip near the ds1820`s pins, don`t touch it keep it 1 or 2mm away. The screen should update with the rising temperature. Now finally touch the pins of ds1820 with the tip of iron, the temperature should rise quickly. Keep it there until temperature rise to 80 degrees, and then remove the iron. If any data is not coming in Hyper Terminal, then you just check the serial cable is working or not. Otherwise you just check the code with debugging mode in CodeVisionAVR.




Leave Comment

characters left:

New Circuits

.

 


Popular Circuits

R/C Thermal Peak Detection NiCd Charger
Auto-Phone dialer for alarm security system
Hcu-hct-based-oscillator
Ir-Controlled Remote A/B Switch Circuit
avr Piezoelectric Sensor and the ADC
how to build fridge door alarm
electronic dice schematics
Restoration of the DuMont Industrial Color Monitor
dancing lights circuit diagram
Radio Jammer
Pocket-sized device to help Xin



Top