HD44780 documentation (#262)
This commit is contained in:
		
							parent
							
								
									e2e6f35288
								
							
						
					
					
						commit
						4c84b64566
					
				
					 5 changed files with 119 additions and 0 deletions
				
			
		
							
								
								
									
										119
									
								
								extras/hd44780/README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										119
									
								
								extras/hd44780/README.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,119 @@
 | 
			
		|||
# HD44780 LCD display driver
 | 
			
		||||
 | 
			
		||||
## Connection type
 | 
			
		||||
 | 
			
		||||
Driver supports GPIO connections to module and I2C GPIO expanders as well.
 | 
			
		||||
Define `HD44780_I2C = 0` in application makefile for direct GPIO connection.
 | 
			
		||||
 | 
			
		||||
See `examples/i2c_lcd_test` and `examples/hd44780_test` .
 | 
			
		||||
 | 
			
		||||
## Display types
 | 
			
		||||
 | 
			
		||||
### 8x1
 | 
			
		||||
 | 
			
		||||
#### Memory layout
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
#### Example
 | 
			
		||||
 | 
			
		||||
```C
 | 
			
		||||
hd44780_t lcd = {
 | 
			
		||||
    .addr = ADDR,
 | 
			
		||||
    .font = HD44780_FONT_5X8,
 | 
			
		||||
    .lines = 1,
 | 
			
		||||
    .pins = {
 | 
			
		||||
        .rs = 0,
 | 
			
		||||
        .e  = 2,
 | 
			
		||||
        .d4 = 4,
 | 
			
		||||
        .d5 = 5,
 | 
			
		||||
        .d6 = 6,
 | 
			
		||||
        .d7 = 7,
 | 
			
		||||
        .bl = 3
 | 
			
		||||
    },
 | 
			
		||||
    .backlight = true
 | 
			
		||||
};
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### 16x1
 | 
			
		||||
 | 
			
		||||
#### Memory layout
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
#### Example
 | 
			
		||||
 | 
			
		||||
```C
 | 
			
		||||
hd44780_t lcd = {
 | 
			
		||||
    .addr = ADDR,
 | 
			
		||||
    .font = HD44780_FONT_5X8,
 | 
			
		||||
    .lines = 2,
 | 
			
		||||
    .pins = {
 | 
			
		||||
        .rs = 0,
 | 
			
		||||
        .e  = 2,
 | 
			
		||||
        .d4 = 4,
 | 
			
		||||
        .d5 = 5,
 | 
			
		||||
        .d6 = 6,
 | 
			
		||||
        .d7 = 7,
 | 
			
		||||
        .bl = 3
 | 
			
		||||
    },
 | 
			
		||||
    .backlight = true
 | 
			
		||||
};
 | 
			
		||||
hd44780_init(&lcd);
 | 
			
		||||
hd44780_gotoxy(&lcd, 0, 0);
 | 
			
		||||
hd44780_puts(&lcd, "Hello wo");
 | 
			
		||||
hd44780_gotoxy(&lcd, 0, 1);
 | 
			
		||||
hd44780_puts(&lcd, "rld!");
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### 16x2, 20x2
 | 
			
		||||
 | 
			
		||||
#### Memory layout
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
#### Example
 | 
			
		||||
 | 
			
		||||
```C
 | 
			
		||||
hd44780_t lcd = {
 | 
			
		||||
    .addr = ADDR,
 | 
			
		||||
    .font = HD44780_FONT_5X8,
 | 
			
		||||
    .lines = 2,
 | 
			
		||||
    .pins = {
 | 
			
		||||
        .rs = 0,
 | 
			
		||||
        .e  = 2,
 | 
			
		||||
        .d4 = 4,
 | 
			
		||||
        .d5 = 5,
 | 
			
		||||
        .d6 = 6,
 | 
			
		||||
        .d7 = 7,
 | 
			
		||||
        .bl = 3
 | 
			
		||||
    },
 | 
			
		||||
    .backlight = true
 | 
			
		||||
};
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### 16x4, 20x4
 | 
			
		||||
 | 
			
		||||
#### Memory layout
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
#### Example
 | 
			
		||||
 | 
			
		||||
```C
 | 
			
		||||
hd44780_t lcd = {
 | 
			
		||||
    .addr = ADDR,
 | 
			
		||||
    .font = HD44780_FONT_5X8,
 | 
			
		||||
    .lines = 2,
 | 
			
		||||
    .pins = {
 | 
			
		||||
        .rs = 0,
 | 
			
		||||
        .e  = 2,
 | 
			
		||||
        .d4 = 4,
 | 
			
		||||
        .d5 = 5,
 | 
			
		||||
        .d6 = 6,
 | 
			
		||||
        .d7 = 7,
 | 
			
		||||
        .bl = 3
 | 
			
		||||
    },
 | 
			
		||||
    .backlight = true
 | 
			
		||||
};
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								extras/hd44780/img/0801.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								extras/hd44780/img/0801.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 5.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								extras/hd44780/img/1601.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								extras/hd44780/img/1601.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 14 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								extras/hd44780/img/1602.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								extras/hd44780/img/1602.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 13 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								extras/hd44780/img/1604.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								extras/hd44780/img/1604.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 24 KiB  | 
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue