Read/Write (R/W), 0 = write to display, 1 = read from display
Enable (EN) - used to clock in data
DB0 (not used in 4-bit mode) - LSb
DB1 (not used in 4-bit mode)
DB2 (not used in 4-bit mode)
DB3 (not used in 4-bit mode)
DB4 - LSb in 4-bit mode
DB7 - MSb
Backlight + (5V)
Backlight - (GND)
4-bit and 8-bit modes
An HD44780 LCD can be operated in two different modes: 4-bit mode and 8-bit mode. In 8-bit mode, pins 7-14 of the LCD are connected to eight I/O pins on the microcontroller; while in 4-bit mode, pins 11-14 on the LCD are connected to four I/O pins on the microcontroller. The advantage to operating in 8-bit mode is that the programming is a bit simpler and data can be updated more quickly. The obvious reason to operate in 4-bit mode is to save four I/O pins on the PIC microcontroller.
Let's Make a Thermometer with DB18B20 -
09-12-2011, 01:07 PM
The DS18B20 digital thermometer provides 9-bit to 12-bit Celsius temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18B20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating temperature range of -55°C to +125° and is accurate to ±0.5°C over the range of -10°C to +85°C.
Here the thermometer (Dallas 18B20) senses the environment temperature and then sends that value as a digital input with 16bit binary code to the microcontroller. It could measure temperatures from -55°C to +125°C (-67°F to +257°F). Dallas 18B20 uses 1 wire bus system to communicate with the microcontroller. The 1-Wire bus system uses a single bus master to control one or more slave devices. The DS18B20 is always a slave. When there is only one slave on the bus, the system is referred to as a ‘single-drop’ system, the system is ‘multi-drop’ if there are multiple slaves on the bus.
Download MikroC code and PROTEUS Design: Click Here