This project demonstrates a complete 1-Wire slave implementation to connect an alphanumeric LCD-Display to the 1-Wire bus.
The project consists of two parts:
- 1-Wire slave, an ATTINY45 controller
- LCD-Controller, an ATTINY2313
These two parts communicate over a bidirectional serial connection at 115200 Baud.
Part 1: 1-Wire slave
The 1-Wire slave is software implemented with an Atmel ATTINY45 controller. A DS2401 “silicon serial number” is used to obtain a unique id for the bus without modifying the firmware. The timing should meet the specification, but is not 100% tested. The serial port is also implemented in software. At power up there will be some debug information transmitted. In the LCD 1-Wire protocol description are the 1-Wire commands described to control the LCD-Display. All command and data is integrity protected by crc16.
Additionally as surplus the internal 2048 bits EEPROM of the ATTINY45 can be accessed from 1-Wire bus with the standard commands for iButtons.
The source code is available here.
Part 2: serial LCD-Display
This project part connects a HD44780 compatible LCD-Display to a serial port. In the LCD serial protocol description are the serial commands described to control the LCD-Display. All command and data is integrity protected by crc16. This project part may be used stand alone, without the 1-Wire interface from part 1.
For switching and dimming of a backlight is a PWM output available. The PWM is set with an 8 bit value and is automatically smooth adjusted.
The source code is available here.
project goals
- only one pin to connect LCD-Display
- integrable to existing infrastructure
- protocol crc16 protected
- bidirectional communication
- backlight control
- additional EEPROM accessible with iButton protocol
The schematics is available for download here.
1wire-slave-lcd-schematics