ButterflyMP3

pcd8544.h File Reference

PCD8544 Driver. More...

#include <avr/io.h>
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include "types.h"
Include dependency graph for pcd8544.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define lcdPort   PORTC
#define lcdPortD   DDRC
#define SCLK   PC3
#define SDIN   PC5
#define DC   PC2
#define SCE_   PC1
#define RES_   PC4
#define lcdInvert1   lcdModeCmd;lcdByte(0x0d)
#define lcdInvert0   lcdModeCmd;lcdByte(0x0c)
#define lcdModeCmd   lcdPort &= (unsigned char)~_BV(DC)
#define lcdModeData   lcdPort |= (unsigned char)_BV(DC)
#define lcdResume   lcdPort &= (unsigned char)~_BV(SCE_)
#define lcdSuspend   lcdPort |= (unsigned char)_BV(SCE_)
#define lcdReset   lcdPort &= (unsigned char)~_BV(RES_);lcdPort |= (unsigned char) _BV(RES_)
#define fbCols   84
#define fbRows   2

Functions

void lcdByte (uint8 data)
void lcdDot (uint8 x, uint8 yLine, uint8 color)
void lcdCh (uint8 *fontSet, uint8 ch)
void lcdWrite (uint8 *fontSet, uint8 *buf, uint8 is_pstr, uint8 len)
void fbClr (void)
void lcdClr (void)
void lcdClrLine (uint8 lineNo)
void lcdInit (void)
void lcdXY (uint8 x, uint8 y)

Variables

uint8 fbXY [2]

Detailed Description

PCD8544 Driver.

AVR-GCC Driver for the PCD8544 LCD Controller

Author:
Muhammad J. A. Galadima
Date:
2004 / 01 / 27
	Revised		: 2004 / 02 / 05
	Version		: 0.7
	Target MCU	: Atmel AVRs w/1k+ RAM
	Modified : September 2004 by Nick Lott for AVR Butterfly.
	

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Id:
pcd8544.c,v 1.10 2007/06/04 15:12:18 brokentoaster Exp

AVR-GCC Driver for the PCD8544 LCD Controller

Author:
Muhammad J. A. Galadima
Date:
2004 / 01 / 27
	Revised		: 2004 / 02 / 05
	Version		: 0.7
	Target MCU	: Atmel AVRs w/1k+ RAM
	Modified : September 2004 by Nick Lott for AVR Butterfly.
	

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Id:
pcd8544.h,v 1.11 2007/06/04 15:12:18 brokentoaster Exp

Definition in file pcd8544.h.


Define Documentation

#define DC   PC2

Definition at line 66 of file pcd8544.h.

Referenced by lcdInit().

#define fbCols   84

Definition at line 105 of file pcd8544.h.

Referenced by lcdDot().

#define fbRows   2

Definition at line 106 of file pcd8544.h.

Referenced by lcdDot().

#define lcdInvert0   lcdModeCmd;lcdByte(0x0c)

Definition at line 80 of file pcd8544.h.

#define lcdInvert1   lcdModeCmd;lcdByte(0x0d)

Definition at line 79 of file pcd8544.h.

#define lcdModeCmd   lcdPort &= (unsigned char)~_BV(DC)

Definition at line 82 of file pcd8544.h.

Referenced by lcdInit(), and lcdXY().

#define lcdModeData   lcdPort |= (unsigned char)_BV(DC)

Definition at line 83 of file pcd8544.h.

Referenced by lcdCh(), lcdClr(), and lcdClrLine().

#define lcdPort   PORTC

Definition at line 62 of file pcd8544.h.

Referenced by lcdByte(), and lcdInit().

#define lcdPortD   DDRC

Definition at line 63 of file pcd8544.h.

Referenced by lcdInit().

#define lcdReset   lcdPort &= (unsigned char)~_BV(RES_);lcdPort |= (unsigned char) _BV(RES_)

Definition at line 88 of file pcd8544.h.

#define lcdResume   lcdPort &= (unsigned char)~_BV(SCE_)

Definition at line 85 of file pcd8544.h.

Referenced by lcdByte().

#define lcdSuspend   lcdPort |= (unsigned char)_BV(SCE_)

Definition at line 86 of file pcd8544.h.

Referenced by lcdByte().

#define RES_   PC4

Definition at line 68 of file pcd8544.h.

Referenced by lcdInit().

#define SCE_   PC1

Definition at line 67 of file pcd8544.h.

Referenced by lcdInit().

#define SCLK   PC3

Definition at line 64 of file pcd8544.h.

Referenced by lcdByte(), and lcdInit().

#define SDIN   PC5

Definition at line 65 of file pcd8544.h.

Referenced by lcdByte(), and lcdInit().


Function Documentation

void fbClr ( void  )

Definition at line 209 of file pcd8544.c.

References lcdClr().

Here is the call graph for this function:

void lcdByte ( uint8  data)

Definition at line 52 of file pcd8544.c.

References lcdPort, lcdResume, lcdSuspend, SCLK, and SDIN.

Referenced by lcdCh(), lcdClr(), lcdClrLine(), lcdInit(), lcdWrite(), and lcdXY().

void lcdCh ( uint8 fontSet,
uint8  ch 
)

Definition at line 109 of file pcd8544.c.

References fbXY, lcdByte(), and lcdModeData.

Referenced by lcdWrite().

Here is the call graph for this function:

void lcdClr ( void  )

Definition at line 228 of file pcd8544.c.

References lcdByte(), and lcdModeData.

Referenced by fbClr(), and lcdInit().

Here is the call graph for this function:

void lcdClrLine ( uint8  lineNo)

Definition at line 242 of file pcd8544.c.

References lcdByte(), lcdModeData, and lcdXY().

Here is the call graph for this function:

void lcdDot ( uint8  x,
uint8  yLine,
uint8  color 
)

Definition at line 80 of file pcd8544.c.

References fbCols, and fbRows.

void lcdInit ( void  )

Definition at line 261 of file pcd8544.c.

References DC, lcdByte(), lcdClr(), lcdModeCmd, lcdPort, lcdPortD, RES_, SCE_, SCLK, and SDIN.

Here is the call graph for this function:

void lcdWrite ( uint8 fontSet,
uint8 buf,
uint8  is_pstr,
uint8  len 
)

Definition at line 154 of file pcd8544.c.

References fbXY, lcdByte(), lcdCh(), and lcdXY().

Here is the call graph for this function:

void lcdXY ( uint8  x,
uint8  y 
)

Definition at line 292 of file pcd8544.c.

References lcdByte(), and lcdModeCmd.

Referenced by lcdClrLine(), and lcdWrite().

Here is the call graph for this function:


Variable Documentation

uint8 fbXY[2]

Definition at line 116 of file pcd8544.h.

Referenced by lcdCh(), and lcdWrite().

 All Files Functions Variables Typedefs Enumerations Enumerator Defines