STM32F10x library
Macros | Variables
lcd_pcf8574.c File Reference

HD44780 via PCF8574, 4 bit (low level) More...

#include <inttypes.h>
#include "i2c.h"

Macros

#define LCD_DELAY   asm("nop\nnop\nnop\nnop\n")
 
#define LCD_BUSY_PCF_BIT   3
 
#define LCD_BL_PCF_BIT   7
 
#define LCD_RS_1   pcfBit(4, 1)
 
#define LCD_RS_0   pcfBit(4, 0)
 
#define LCD_RW_1   pcfBit(5, 1)
 
#define LCD_RW_0   pcfBit(5, 0)
 
#define LCD_E_1   pcfBit(6, 1)
 
#define LCD_E_0   pcfBit(6, 0)
 
#define _BV(x)   (1 << x)
 

Variables

const uint8_t lcd_busw = 0
 
uint8_t pcfDev = 1
 

Detailed Description

HD44780 via PCF8574, 4 bit (low level)

Author
Matej Kogovsek (matej.nosp@m.@ham.nosp@m.radio.nosp@m..si)
Note
This file is part of mat-stm32f1-lib
Implements low level functions required by lcd.c
PCF8574 to HD44780 connection as per LCDproc (http://lcdproc.sourceforge.net/docs/current-user.html#hd44780-i2c.circuit)

Macro Definition Documentation

#define _BV (   x)    (1 << x)

Bit value macro

#define LCD_BL_PCF_BIT   7

Backlight control pin

#define LCD_BUSY_PCF_BIT   3

Busy flag pin

#define LCD_DELAY   asm("nop\nnop\nnop\nnop\n")

Short delay macro

#define LCD_E_0   pcfBit(6, 0)

Clear E macro

#define LCD_E_1   pcfBit(6, 1)

Set E macro

#define LCD_RS_0   pcfBit(4, 0)

Clear RS macro

#define LCD_RS_1   pcfBit(4, 1)

Set RS macro

#define LCD_RW_0   pcfBit(5, 0)

Clear RW macro

#define LCD_RW_1   pcfBit(5, 1)

Set RW macro

Variable Documentation

const uint8_t lcd_busw = 0

Actual LCD bus width = 4 bit

uint8_t pcfDev = 1

I2C peripheral number to use