aversive_10-03-12/modules/devices/ihm/lcd/lcd.c File Reference

Implementation for the LCD module. More...

#include <stdio.h>
#include <aversive/pgmspace.h>
#include <aversive.h>
#include <aversive/wait.h>
#include <lcd.h>
#include <lcd_protocol.h>

Go to the source code of this file.

Defines

#define e_delay()   _delay_loop_1(1)

Functions

void initial_8_bit_write (uint8_t value)
void lcd_command (uint8_t cmd)
void lcd_gotoxy (uint8_t x, uint8_t y)
void lcd_clrscr (void)
void lcd_home (void)
void lcd_putc (char c)
int lcd_dev_putc (char c, FILE *f)
void lcd_init (uint8_t dispAttr)


Detailed Description

Implementation for the LCD module.

Interface for the LCD module.

Todo:
Test the module with other wirings, verify the delay macro, stqtic inlines for the public functions ??
Test:
works on mega32 with all on the same port and old normal wiring, how about more speific connections ?
This module provides functions for using a lcd device

Todo:
implement ANSI commands for cursor positionning ?
Test:
works on mega32 with all on the same port and old normal wiring, how about more speific connections ?
This module provides functions for using a standard lcd device the lcd s intended to be used in 4 bit mode, so don't wire the low nibble, only D4-D7 to 4 CONSECUTIVE port lines we need the RW, RS and E lines too. since the last version, you can scramble the wiring, except for D4-D7 who must remain consecutive (see lcd_config.h)

in this new version you can use lcd_putc(''); to clear the screen. This maintains an easy compatibility when you want to use an uart instad (form feed).

Definition in file lcd.c.


Define Documentation

 
#define e_delay (  )     _delay_loop_1(1)

Definition at line 49 of file lcd.c.


Function Documentation

void initial_8_bit_write ( uint8_t  value  ) 

Definition at line 164 of file lcd.c.

References cbi, IRQ_LOCK, IRQ_UNLOCK, and LCD_DATA_MASK.

Referenced by lcd_init().

void lcd_clrscr ( void   ) 

clear all the screen avoid using this function, escpecially if you use printf

Definition at line 288 of file lcd.c.

References LCD_CLR, and lcd_command().

Referenced by lcd_init(), and lcd_putc().

void lcd_command ( uint8_t  cmd  ) 

Definition at line 207 of file lcd.c.

Referenced by lcd_clrscr(), lcd_gotoxy(), lcd_home(), and lcd_init().

int lcd_dev_putc ( char  c,
FILE *  f 
)

same than lcd_putc but with a prototype that is compliant with avrlibc > 1.4.0 fdevopen prototype

Definition at line 328 of file lcd.c.

References lcd_putc().

void lcd_gotoxy ( uint8_t  x,
uint8_t  y 
)

move the cursor in the screen, x= line, y = char

Definition at line 260 of file lcd.c.

References lcd_command(), and LCD_DDRAM.

Referenced by lcd_putc().

void lcd_home ( void   ) 

Definition at line 296 of file lcd.c.

References lcd_command(), and LCD_HOME.

void lcd_init ( uint8_t  dispAttr  ) 

void lcd_putc ( char  c  ) 

Put a char on screen if c =
cursor is positioned on the next line if c = the screen will be cleared

Definition at line 304 of file lcd.c.

References lcd_clrscr(), and lcd_gotoxy().

Referenced by lcd_dev_putc().


Generated on Fri Mar 12 06:32:06 2010 for AVR by  doxygen 1.5.6