Skip to content

Commit ae06af4

Browse files
committed
Create README
1 parent d2ed80a commit ae06af4

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

README.md

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# LCD Simulator
2+
3+
A simulator for the Hitachi HD44780 LCD controller chip, designed to behave nearly identically given the same inputs.
4+
5+
- [LCD Simulator](#lcd-simulator)
6+
- [Features](#features)
7+
- [Using the GUI](#using-the-gui)
8+
- [Using the CLI](#using-the-cli)
9+
- [Alone](#alone)
10+
- [With the GUI](#with-the-gui)
11+
- [Controlling from other applications](#controlling-from-other-applications)
12+
- [Screenshots](#screenshots)
13+
- [Links](#links)
14+
15+
## Features
16+
17+
- Full simulation of all read and write operations
18+
- Operations mimic how real controllers behave, even in undefined circumstances
19+
- Includes support for the 8 custom characters
20+
- Compatible will all modes of operation
21+
- 4/8-bit interface
22+
- 1/2-line display mode
23+
- 5x8/11 font
24+
- Accurate simulator display using the same font as a real controller
25+
- Adjustable contrast that changes depending on the display mode
26+
- Customisable display size and colours
27+
- Controllable by manually toggling pins, selecting from a list of instructions, or through a CLI
28+
- A character selector grid that lists all possible characters for writing
29+
- Optional logging of all operations done to the display
30+
31+
## Using the GUI
32+
33+
The GUI is launched by running `LCDSimulator.GUI.exe`. After launching, the display must first be powered on by clicking on the VDD pin, which will then turn green to signify that it is powered. Clicking any of the other non-ground pins (with the exception of VO) will also toggle them on and off. Click on the A pin to toggle the simulated backlight, then use the mouse scroll wheel while hovering the pointer over the VO pin to adjust the display contrast.
34+
35+
To interface with the display, you can either toggle each pin manually, or select an instruction from the instruction list to the side. Operations are executed by turning the E pin on then off again, as with a real display. If the Address Counter is currently in DDRAM and you select the "Write Data" operation, a window will open with every possible character that can be written to the screen to select from.
36+
37+
The size of the screen, as well as its colour, can be changed from the `Screen` menu.
38+
39+
## Using the CLI
40+
41+
The command-line interface is very similar to that used by my Raspberry Pi Pico [`uart_lcd` application](https://github.com/TollyH/raspberry-pi-pico/tree/main/uart_lcd) that interacts with real displays, with most of the commands being identical.
42+
43+
The CLI can either be used on its own, or to interact with the display shown on the GUI.
44+
45+
### Alone
46+
47+
The CLI can be launched on its own with `LCDSimulator.CLI.exe`. The simulation will run the same as it would through the GUI, however there will be no visual feedback to any of the operations.
48+
49+
You must use the `#power 1` command to turn on the display before you can interact with it. This is the same as enabling the VDD pin on the GUI.
50+
51+
### With the GUI
52+
53+
To use the CLI to control the display shown on the GUI, open the GUI's terminal window by clicking on `Options > Show console window`. You can then issue commands through the CLI, which will then be reflected on the display visualisation.
54+
55+
The terminal window can also be used to log every operation done on the display by launching the GUI with the `--log` command-line parameter. This cannot be toggled once the application is launched.
56+
57+
## Controlling from other applications
58+
59+
The simulator can also be controlled from other programs by piping the standard input and output streams of the application. The interface is identical to that of the regular CLI, and the commands will behave the same as they would when being controlled through a terminal.
60+
61+
The GUI will respond to commands on the standard input stream even when the terminal window is not visible. The GUI's standard error stream is used for the logging feature, so should not be redirected, as it is not part of the CLI.
62+
63+
These are some examples of programs that interface with the GUI:
64+
65+
- [lcd_video_sim.py](https://gist.github.com/TollyH/81289034d05e208bde14c8726710a311#file-lcd_video_sim-py) - A version of the [lcd_video.py](https://gist.github.com/TollyH/81289034d05e208bde14c8726710a311#file-lcd_video-py) script that instead interfaces with the simulator
66+
- [LCD Remote Controller](https://github.com/TollyH/LCD_Remote_Controller/tree/simulator) - The `simulator` branch of the controller C# app contains a modified version that interfaces with the simulator
67+
68+
## Screenshots
69+
70+
![A 20x4 display](https://github.com/TollyH/LCDSimulator/blob/main/.github/README%20Images/GUI-Main-1.png?raw=true)
71+
*A 20x4 display*
72+
73+
![A 16x2 display](https://github.com/TollyH/LCDSimulator/blob/main/.github/README%20Images/GUI-Main-2.png?raw=true)
74+
*A 16x2 display*
75+
76+
![5x11 font](https://github.com/TollyH/LCDSimulator/blob/main/.github/README%20Images/GUI-Main-3.png?raw=true)
77+
*5x11 font*
78+
79+
![20x4 display in 1-line mode](https://github.com/TollyH/LCDSimulator/blob/main/.github/README%20Images/GUI-Main-4.png?raw=true)
80+
*20x4 display in 1-line mode*
81+
82+
![Custom characters](https://github.com/TollyH/LCDSimulator/blob/main/.github/README%20Images/GUI-Main-5.png?raw=true)
83+
*Custom characters*
84+
85+
![Character selector](https://github.com/TollyH/LCDSimulator/blob/main/.github/README%20Images/GUI-Characters-1.png?raw=true)
86+
*Character selector*
87+
88+
![Available sizes](https://github.com/TollyH/LCDSimulator/blob/main/.github/README%20Images/GUI-ScreenOps-1.png?raw=true)
89+
*Available sizes*
90+
91+
![Available colours](https://github.com/TollyH/LCDSimulator/blob/main/.github/README%20Images/GUI-ScreenOps-2.png?raw=true)
92+
*Available colours*
93+
94+
## Links
95+
96+
- [Hitachi HD44780 specification](https://www.sparkfun.com/datasheets/LCD/HD44780.pdf)

0 commit comments

Comments
 (0)