Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

4-points thermometer on LPC1343 + 4x DS18B20 + src

Status
Not open for further replies.

Vermes

Advanced Member level 4
Advanced Member level 4
Joined
Aug 2, 2011
Messages
1,163
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,316
Activity points
22,318


The code was made on LPCXpresso plate. This version is compatible with LPC1343, but it uses only GPIO and 16- or 32-bit timer. That is why after some minor modifications, the code could possibly work with a cheaper version LPC1114 or another Cortex. The entire software was written in IDE LPCXpresso. The project should be easily imported to another self configured toolchains using Eclipse.
The codes contain implementation of:
  • ms and us delay function
  • 1 Wire support
  • ds18b20 sensor support with checking CRC
  • HD44780 display support
  • GPIO support (implemented by NXP)
For the delay function, you can select which timer they use. You can select between timer 0 or 1, both 32 and 16-bit. Functions has a protection against giving too high value ms or us (then, the function performs several times with max value and one time with the rest). The functions may not be the most accurate, but sufficient for most applications. All three remaining libraries (ds, 1wire, lcd) use these functions.
1 Wire bus was handled using the GPIO built in uC. It can be used successfully to support other systems operating 1 Wire. Here are the three basic functions: readbyte, writebyte and reset. Physical derivation of 1 Wire is not predetermined (e.g. by #define). This allows you to connect multiple receivers to physically different pins and work with the library. Derivation is specified by a structure that contains two numbers – one is the port (0-3) and the second contains the pin number (0-11).
Functions to support the DS18B20 sensor use these functions (1 Wire). In the implementation there is the CRC control of the data received from the sensor. So you always know that the data received is correct. Functions also accept the structure describes above as an argument. Without any problem you can connect a few sensors to the processor, so you do not have to know the serial numbers of the sensors and perform the sensors search operation on the bus. The sensors should be connected in a standard way, what means the data line with pull-up (up to 3,3V with a value 4k7ohm) connected to the uC output.
Functions of the display on the HD44780 driver are the same as everywhere. You should use a display compatible with the driver, power it with 5V and connect to 5V pins tolerant on the uC. RW should be connected to GND (do not read data nor the flag, just save the data). Potentiometer like in a standard application. The backlight is connected permanently.



Link to original thread (useful attachment) – Termometr 4 punktowy na LPC1343 + 4x ds18b20 + src
 
Last edited:

Very nice !!! I see similar to this, with ATMega8 and also four DS18B20 and C mark at and of value. Autor make it for car I think Tavria :).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top