lcd3.h

C2C-plus code that uses a 16F84 to read a thermocouple via a Maxim's Max6674. (by Ryan Dumouchel).





#define  PinSrData  0   
#define  PinLatch   1   
#define  PinSrClk   2 

#define RS  0
#define EN  2

#define PinLCD_DATA_4            4   
#define PinLCD_DATA_5            5  
#define PinLCD_DATA_6            6  
#define PinLCD_DATA_7            7  

#define clear_lcd         0x01 /* Clear Display                       */
#define return_home       0x02 /* Cursor to Home position             */
#define entry_mode        0x06 /* Normal entry mode                   */
#define entry_mode_shift  0x07 /* - with shift                        */
#define system_set_8_bit  0x38 /* 8 bit data mode 2 line ( 5x7 font ) */
#define system_set_4_bit  0x28 /* 4 bit data mode 2 line ( 5x7 font ) */
#define display_on        0x0c /* Switch ON Display                   */
#define display_off       0x08 /* Cursor plus blink                   */

#define set_dd_ram        0x80 /* Line 1 position 1                   */

#define cursor_on         0x0E /* Switch Cursor ON                    */
#define cursor_off        0x0C /* Switch Cursor OFF                   */

#define line1      0x80 /* Line 1 position 1                   */
#define line2      0xC0 /* Line 2 position 1  */

void LcdSetup(void);
void LcdSetPos(char Pos);
void LcdWrite( const char *lcdptr );

void LcdInt(int n);
void ShiftOut(char serdata);
void LCD4Bit(char fbit);
void LCD8Bit(char ebit);
void FuncMode(void);
void DatMode(void);

char sdata;
int bitcnt;



http://www.sourceboost.com/home.html

Copyright © 2002-2006 SourceBoost Technologies