diff --git a/backlight/backlight.png b/backlight/backlight.png new file mode 100644 index 0000000..efcf199 Binary files /dev/null and b/backlight/backlight.png differ diff --git a/backlight/backlight.schem b/backlight/backlight.schem new file mode 100644 index 0000000..54baffa --- /dev/null +++ b/backlight/backlight.schem @@ -0,0 +1,202 @@ +v 20080127 1 +C 40000 40000 0 0 0 title-B.sym +C 51600 46500 1 0 0 transformer-2.sym +{ +T 51600 47900 5 10 1 1 0 0 1 +refdes=T1 +T 51600 48100 5 10 0 0 0 0 1 +device=TRANSFORMER +} +C 50600 45600 1 0 0 npn-2.sym +{ +T 51200 46100 5 10 0 0 0 0 1 +device=NPN_TRANSISTOR +T 51200 46100 5 10 1 1 0 0 1 +refdes=Q1 +} +N 51100 46600 51600 46600 4 +C 49500 46000 1 0 0 resistor-2.sym +{ +T 49900 46350 5 10 0 0 0 0 1 +device=RESISTOR +T 49700 46300 5 10 1 1 0 0 1 +refdes=R3 +} +N 50400 46100 50600 46100 4 +B 46300 45400 1300 1500 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 +T 46700 46200 9 10 1 0 0 0 1 +NE555 +P 47800 46100 47600 46100 1 0 0 +{ +T 47800 46100 5 10 0 0 0 0 1 +pintype=unknown +T 47695 46145 5 10 1 1 0 0 1 +pinnumber=3 +T 47800 46100 5 10 0 0 0 0 1 +pinseq=0 +} +N 47800 46100 49500 46100 4 +N 51100 44300 51100 45600 4 +P 46600 47100 46600 46900 1 0 0 +{ +T 46600 47100 5 10 0 0 180 0 1 +pintype=unknown +T 46505 47150 5 10 1 1 180 0 1 +pinnumber=8 +T 46600 47100 5 10 0 0 180 0 1 +pinseq=0 +} +P 47300 47100 47300 46900 1 0 0 +{ +T 47300 47100 5 10 0 0 180 0 1 +pintype=unknown +T 47205 47150 5 10 1 1 180 0 1 +pinnumber=4 +T 47300 47100 5 10 0 0 180 0 1 +pinseq=0 +} +P 46600 45200 46600 45400 1 0 0 +{ +T 46600 45200 5 10 0 0 0 0 1 +pintype=unknown +T 46395 45350 5 10 1 1 180 6 1 +pinnumber=1 +T 46600 45200 5 10 0 0 0 0 1 +pinseq=0 +} +P 47300 45200 47300 45400 1 0 0 +{ +T 47300 45200 5 10 0 0 0 0 1 +pintype=unknown +T 47095 45350 5 10 1 1 180 6 1 +pinnumber=5 +T 47300 45200 5 10 0 0 0 0 1 +pinseq=0 +} +P 46100 46600 46300 46600 1 0 0 +{ +T 46100 46600 5 10 0 0 270 0 1 +pintype=unknown +T 46205 46645 5 10 1 1 0 6 1 +pinnumber=7 +T 46100 46600 5 10 0 0 270 0 1 +pinseq=0 +} +P 46100 46100 46300 46100 1 0 0 +{ +T 46100 46100 5 10 0 0 270 0 1 +pintype=unknown +T 46205 46145 5 10 1 1 0 6 1 +pinnumber=6 +T 46100 46100 5 10 0 0 270 0 1 +pinseq=0 +} +P 46100 45700 46300 45700 1 0 0 +{ +T 46100 45700 5 10 0 0 270 0 1 +pintype=unknown +T 46205 45745 5 10 1 1 0 6 1 +pinnumber=2 +T 46100 45700 5 10 0 0 270 0 1 +pinseq=0 +} +N 51600 47800 43500 47800 4 +N 46600 47100 46600 47800 4 +N 47300 47100 47300 47800 4 +N 43500 44300 53100 44300 4 +N 53100 46600 53100 44300 4 +C 47500 44300 1 90 0 capacitor-1.sym +{ +T 46800 44500 5 10 0 0 90 0 1 +device=CAPACITOR +T 47700 45000 5 10 1 1 180 0 1 +refdes=C2 +T 46600 44500 5 10 0 0 90 0 1 +symversion=0.1 +} +N 46600 45200 46600 44300 4 +T 46700 46500 9 10 1 0 0 0 1 +IC1 +C 44800 46900 1 90 0 resistor-2.sym +{ +T 44450 47300 5 10 0 0 90 0 1 +device=RESISTOR +T 45200 47300 5 10 1 1 180 0 1 +refdes=R1 +} +C 44800 45700 1 90 0 resistor-2.sym +{ +T 44450 46100 5 10 0 0 90 0 1 +device=RESISTOR +T 45200 46000 5 10 1 1 180 0 1 +refdes=R2 +} +C 44500 45400 1 270 0 capacitor-2.sym +{ +T 45200 45200 5 10 0 0 270 0 1 +device=POLARIZED_CAPACITOR +T 45000 45100 5 10 1 1 0 0 1 +refdes=C1 +T 45400 45200 5 10 0 0 270 0 1 +symversion=0.1 +} +N 44700 46900 44700 46600 4 +N 44700 45700 44700 45400 4 +N 44700 44500 44700 44300 4 +C 43700 46600 1 270 0 diode-1.sym +{ +T 44300 46200 5 10 0 0 270 0 1 +device=DIODE +T 44200 45900 5 10 1 1 0 0 1 +refdes=D1 +} +N 46100 46100 45800 46100 4 +N 43900 45700 46100 45700 4 +N 45800 45700 45800 46100 4 +N 43900 46600 46100 46600 4 +C 43400 44000 1 0 0 gnd-1.sym +C 53200 47700 1 0 0 out-1.sym +{ +T 53200 48000 5 10 0 0 0 0 1 +device=OUTPUT +T 53200 48000 5 10 1 1 0 0 1 +refdes=~100V +} +N 53100 47800 53200 47800 4 +C 43600 47800 1 90 0 out-1.sym +{ +T 43300 47800 5 10 0 0 90 0 1 +device=OUTPUT +T 43300 48200 5 10 1 1 180 0 1 +refdes=+5V +} +T 50500 40900 9 20 1 0 0 0 1 +5V EL-Foil supply +T 54000 40400 9 10 1 0 0 0 1 +1.0 +T 54900 40100 9 10 1 0 0 0 2 +Sebastian Schumb +(LongHairedHacker) +T 50000 40400 9 10 1 0 0 0 1 +el.schem +T 50200 40100 9 10 1 0 0 0 1 +1 +T 52000 40100 9 10 1 0 0 0 1 +1 +T 41000 41700 9 10 1 0 0 0 1 +R1, R2 308 Ohm +T 41000 41400 9 10 1 0 0 0 1 +R3 1k Ohm +T 43400 42000 9 10 1 0 0 0 1 +Q1 TIP42 +T 43400 41700 9 10 1 0 0 0 1 +T1 1:20 ( 12V : 240V ) +T 43400 41400 9 10 1 0 0 0 1 +C1 4,7uF +T 41000 41100 9 10 1 0 0 0 1 +C2 100nF +T 41000 42000 9 10 1 0 0 0 1 +IC1 NE555 +T 41000 42300 9 15 1 0 0 0 1 +Parts : +B 40800 40800 5500 1900 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 diff --git a/backlight/bright.jpg b/backlight/bright.jpg new file mode 100755 index 0000000..7488ca7 Binary files /dev/null and b/backlight/bright.jpg differ diff --git a/backlight/dark.jpg b/backlight/dark.jpg new file mode 100755 index 0000000..e840e01 Binary files /dev/null and b/backlight/dark.jpg differ diff --git a/backlight/dark_close.jpg b/backlight/dark_close.jpg new file mode 100755 index 0000000..c57d388 Binary files /dev/null and b/backlight/dark_close.jpg differ diff --git a/doc/html/12x16__horizontal__LSB__1_8h-source.html b/doc/html/12x16__horizontal__LSB__1_8h-source.html index 4b428f9..2078189 100644 --- a/doc/html/12x16__horizontal__LSB__1_8h-source.html +++ b/doc/html/12x16__horizontal__LSB__1_8h-source.html @@ -273,7 +273,7 @@ 00259 00260 -
Generated on Tue May 26 15:32:24 2009 for glcd by  +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/12x16__horizontal__LSB__1_8h.html b/doc/html/12x16__horizontal__LSB__1_8h.html index 72dfc1b..37e8468 100644 --- a/doc/html/12x16__horizontal__LSB__1_8h.html +++ b/doc/html/12x16__horizontal__LSB__1_8h.html @@ -39,7 +39,7 @@

-


Generated on Tue May 26 15:32:24 2009 for glcd by  +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/8x8__horizontal__LSB__1_8h-source.html b/doc/html/8x8__horizontal__LSB__1_8h-source.html index b931974..ead77ed 100644 --- a/doc/html/8x8__horizontal__LSB__1_8h-source.html +++ b/doc/html/8x8__horizontal__LSB__1_8h-source.html @@ -270,7 +270,7 @@ 00256 0x00,0x00,0x3C,0x3C,0x3C,0x3C,0x00,0x00, // 0xFE 00257 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; // 0xFF -
Generated on Tue May 26 15:32:24 2009 for glcd by  +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/8x8__horizontal__LSB__1_8h.html b/doc/html/8x8__horizontal__LSB__1_8h.html index f46f09f..c9488f2 100644 --- a/doc/html/8x8__horizontal__LSB__1_8h.html +++ b/doc/html/8x8__horizontal__LSB__1_8h.html @@ -39,7 +39,7 @@

-


Generated on Tue May 26 15:32:24 2009 for glcd by  +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/adc_8c.html b/doc/html/adc_8c.html new file mode 100644 index 0000000..e06b2ac --- /dev/null +++ b/doc/html/adc_8c.html @@ -0,0 +1,50 @@ + + +glcd: include/adc.c File Reference + + + + + +
+

include/adc.c File Reference

#include "adc.h"
+ + + + + +

Functions

uint16_t readADC (uint8_t channel)
+

Function Documentation

+ +
+
+ + + + + + + + + +
uint16_t readADC (uint8_t  channel  ) 
+
+
+ +

+ +

+

+

+
Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
+ + diff --git a/doc/html/adc_8h-source.html b/doc/html/adc_8h-source.html new file mode 100644 index 0000000..e3926a4 --- /dev/null +++ b/doc/html/adc_8h-source.html @@ -0,0 +1,31 @@ + + +glcd: include/adc.h Source File + + + + + +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
+ + diff --git a/doc/html/adc_8h.html b/doc/html/adc_8h.html new file mode 100644 index 0000000..8fd386b --- /dev/null +++ b/doc/html/adc_8h.html @@ -0,0 +1,73 @@ + + +glcd: include/adc.h File Reference + + + + + +
+

include/adc.h File Reference

#include <avr/io.h>
+#include <util/delay.h>
+#include <inttypes.h>
+ +

+Go to the source code of this file. + + + + + + + +

Defines

#define ADC_H   ADC_H

Functions

uint16_t readADC (uint8_t channel)
+


Define Documentation

+ +
+
+ + + + +
#define ADC_H   ADC_H
+
+
+ +

+ +

+

+


Function Documentation

+ +
+
+ + + + + + + + + +
uint16_t readADC (uint8_t  channel  ) 
+
+
+ +

+ +

+

+

+
Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
+ + diff --git a/doc/html/button_8h-source.html b/doc/html/button_8h-source.html index 204c2a0..0beea04 100644 --- a/doc/html/button_8h-source.html +++ b/doc/html/button_8h-source.html @@ -49,7 +49,7 @@ 00035 0x00,0x00,0x00,0x00}; 00036 -
Generated on Tue May 26 15:32:24 2009 for glcd by  +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/button_8h.html b/doc/html/button_8h.html index 92a1681..a86a9cd 100644 --- a/doc/html/button_8h.html +++ b/doc/html/button_8h.html @@ -40,7 +40,7 @@

-


Generated on Tue May 26 15:32:24 2009 for glcd by  +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/files.html b/doc/html/files.html index 68ed7aa..d57d9af 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -25,11 +25,17 @@ 8x8_horizontal_LSB_1.h [code] button.h [code] main.c + writing_demo.c + writing_demo.h [code] + include/adc.c + include/adc.h [code] include/lc7981.c include/lc7981.h [code] + include/touch.c + include/touch.h [code] -
Generated on Tue May 26 15:32:24 2009 for glcd by  +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/globals.html b/doc/html/globals.html index d997435..c1c89af 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -28,9 +28,13 @@
@@ -39,6 +43,10 @@
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

+

- a -

- l -

+

- r -

+

- t -

+

- w -

-
Generated on Tue May 26 15:32:24 2009 for glcd by  +
Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html index 46f4bcd..53e45b1 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -26,11 +26,26 @@
  • Defines
  • +
    + +
    + +

     

    -

    -
    Generated on Tue May 26 15:32:24 2009 for glcd by  +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html index 7d7533a..9abdc37 100644 --- a/doc/html/globals_func.html +++ b/doc/html/globals_func.html @@ -26,11 +26,22 @@
  • Defines
  • +
    + +
    + +

     

    -

    -
    Generated on Tue May 26 15:32:24 2009 for glcd by  +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/globals_vars.html b/doc/html/globals_vars.html index 75c336f..3c0d457 100644 --- a/doc/html/globals_vars.html +++ b/doc/html/globals_vars.html @@ -41,7 +41,7 @@ , 8x8_horizontal_LSB_1.h -
    Generated on Tue May 26 15:32:24 2009 for glcd by  +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/index.html b/doc/html/index.html index 6066718..6af10b6 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -17,7 +17,7 @@

    glcd Documentation

    0.1beta

    -
    Generated on Tue May 26 15:32:24 2009 for glcd by  +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/lc7981_8c.html b/doc/html/lc7981_8c.html index 1c34446..c053871 100644 --- a/doc/html/lc7981_8c.html +++ b/doc/html/lc7981_8c.html @@ -554,7 +554,7 @@ Currently used mode, can be text or graphic.

    -


    Generated on Tue May 26 15:32:24 2009 for glcd by  +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/lc7981_8h-source.html b/doc/html/lc7981_8h-source.html index 6282260..98466d8 100644 --- a/doc/html/lc7981_8h-source.html +++ b/doc/html/lc7981_8h-source.html @@ -49,11 +49,11 @@ 00035 #include <util/delay.h> 00036 #include <avr/pgmspace.h> 00037 -00038 #define LCD_CTRL PORTC -00039 #define LCD_CRTL_DDR DDRC -00040 #define LCD_RS PC4 -00041 #define LCD_RW PC2 -00042 #define LCD_EN PC0 +00038 #define LCD_CTRL PORTA +00039 #define LCD_CRTL_DDR DDRA +00040 #define LCD_RS PA4 +00041 #define LCD_RW PA2 +00042 #define LCD_EN PA0 00043 00044 00045 @@ -100,7 +100,7 @@ 00086 00087 #endif /* LC7981_H_ */ -
    Generated on Tue May 26 15:32:24 2009 for glcd by  +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/lc7981_8h.html b/doc/html/lc7981_8h.html index 2fad752..7bce5a1 100644 --- a/doc/html/lc7981_8h.html +++ b/doc/html/lc7981_8h.html @@ -25,19 +25,19 @@ #define LC7981_H_   LC7981_H_  protects this file from beeing double included
    -#define LCD_CTRL   PORTC +#define LCD_CTRL   PORTA  Port used for control signals.
    -#define LCD_CRTL_DDR   DDRC +#define LCD_CRTL_DDR   DDRA  Data-Direction-Register for the control signals.
    -#define LCD_RS   PC4 +#define LCD_RS   PA4  Register-Select Pin of the Display.
    -#define LCD_RW   PC2 +#define LCD_RW   PA2  Read-Write-select Pin.
    -#define LCD_EN   PC0 +#define LCD_EN   PA0  Strobe Pin.
    #define LCD_DATA   PORTD @@ -143,7 +143,7 @@ protects this file from beeing double included
    - +
    #define LCD_CRTL_DDR   DDRC #define LCD_CRTL_DDR   DDRA
    @@ -160,7 +160,7 @@ Data-Direction-Register for the control signals.
    - +
    #define LCD_CTRL   PORTC #define LCD_CTRL   PORTA
    @@ -211,7 +211,7 @@ Data-Direction-Register for Data.
    - +
    #define LCD_EN   PC0 #define LCD_EN   PA0
    @@ -323,7 +323,7 @@ Horizontal display size in pixels.
    - +
    #define LCD_RS   PC4 #define LCD_RS   PA4
    @@ -384,7 +384,7 @@ Set the Register-Select pin low.
    - +
    #define LCD_RW   PC2 #define LCD_RW   PA2
    @@ -933,7 +933,7 @@ Writes a command and a data byte to the lcd.

    -


    Generated on Tue May 26 15:32:24 2009 for glcd by  +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/main_8c.html b/doc/html/main_8c.html index de66880..9f1c25e 100644 --- a/doc/html/main_8c.html +++ b/doc/html/main_8c.html @@ -17,9 +17,11 @@

    main.c File Reference

    #include <avr/io.h>
    #include <stdlib.h>
    #include "include/lc7981.h"
    +#include "include/adc.h"
    #include "button.h"
    #include "12x16_horizontal_LSB_1.h"
    -#include "8x8_horizontal_LSB_1.h"
    +#include "include/touch.h"
    +#include "writing_demo.h"
    @@ -47,7 +49,7 @@

    -


    Generated on Tue May 26 15:32:24 2009 for glcd by  +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/touch_8c.html b/doc/html/touch_8c.html new file mode 100644 index 0000000..e427203 --- /dev/null +++ b/doc/html/touch_8c.html @@ -0,0 +1,95 @@ + + +glcd: include/touch.c File Reference + + + + + +
    +

    include/touch.c File Reference

    #include "touch.h"
    +

    Functions

    + + + + + + + + + +

    Functions

    uint8_t touch_is_pressed ()
     This functions set 5V to X1 and GND to Y1, the voltage at X2 is measured via the ADC.
    int16_t touch_readX ()
    int16_t touch_readY ()
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    uint8_t touch_is_pressed (  ) 
    +
    +
    + +

    +This functions set 5V to X1 and GND to Y1, the voltage at X2 is measured via the ADC. +

    +If the ADC-Value is less then TOUCH_PRESSED_LEVEL, the function will return 1.

    Returns:
    1 if pressed else 0
    + +
    +

    + +

    +
    + + + + + + + + +
    int16_t touch_readX (  ) 
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + + + + + +
    int16_t touch_readY (  ) 
    +
    +
    + +

    + +

    +

    + +


    Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
    + + diff --git a/doc/html/touch_8h-source.html b/doc/html/touch_8h-source.html new file mode 100644 index 0000000..b1a9e35 --- /dev/null +++ b/doc/html/touch_8h-source.html @@ -0,0 +1,44 @@ + + +glcd: include/touch.h Source File + + + + + +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
    + + diff --git a/doc/html/touch_8h.html b/doc/html/touch_8h.html new file mode 100644 index 0000000..16237da --- /dev/null +++ b/doc/html/touch_8h.html @@ -0,0 +1,255 @@ + + +glcd: include/touch.h File Reference + + + + + +
    +

    include/touch.h File Reference

    #include "adc.h"
    + +

    +Go to the source code of this file. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Defines

    #define TOUCH_H_   TOUCH_H_
     touch.h
    #define TOUCH_PORT   PORTA
    #define TOUCH_PIN   PINA
    #define TOUCH_DDR   DDRA
    #define TOUCH_X1   PA1
    #define TOUCH_X2   PA3
    #define TOUCH_Y1   PA5
    #define TOUCH_Y2   PA7
    #define TOUCH_PRESSED_LEVEL   1000

    Functions

    uint8_t touch_is_pressed ()
     This functions set 5V to X1 and GND to Y1, the voltage at X2 is measured via the ADC.
    int16_t touch_readX ()
    int16_t touch_readY ()
    +


    Define Documentation

    + +
    +
    + + + + +
    #define TOUCH_DDR   DDRA
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define TOUCH_H_   TOUCH_H_
    +
    +
    + +

    +touch.h +

    +Created on: 29.05.2009 Author: sebastian +

    +

    + +

    +
    + + + + +
    #define TOUCH_PIN   PINA
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define TOUCH_PORT   PORTA
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define TOUCH_PRESSED_LEVEL   1000
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define TOUCH_X1   PA1
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define TOUCH_X2   PA3
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define TOUCH_Y1   PA5
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + +
    #define TOUCH_Y2   PA7
    +
    +
    + +

    + +

    +

    +


    Function Documentation

    + +
    +
    + + + + + + + + +
    uint8_t touch_is_pressed (  ) 
    +
    +
    + +

    +This functions set 5V to X1 and GND to Y1, the voltage at X2 is measured via the ADC. +

    +If the ADC-Value is less then TOUCH_PRESSED_LEVEL, the function will return 1.

    Returns:
    1 if pressed else 0
    + +
    +

    + +

    +
    + + + + + + + + +
    int16_t touch_readX (  ) 
    +
    +
    + +

    + +

    +

    + +

    +
    + + + + + + + + +
    int16_t touch_readY (  ) 
    +
    +
    + +

    + +

    +

    +

    +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
    + + diff --git a/doc/html/writing__demo_8c.html b/doc/html/writing__demo_8c.html new file mode 100644 index 0000000..83a8fdb --- /dev/null +++ b/doc/html/writing__demo_8c.html @@ -0,0 +1,52 @@ + + +glcd: writing_demo.c File Reference + + + + + +
    +

    writing_demo.c File Reference

    #include "writing_demo.h"
    + + + + + + +

    Functions

    void writing_demo ()
     particel_demo.c
    +

    Function Documentation

    + +
    +
    + + + + + + + + +
    void writing_demo (  ) 
    +
    +
    + +

    +particel_demo.c +

    +Created on: 29.05.2009 Author: sebastian +

    +

    +

    +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
    + + diff --git a/doc/html/writing__demo_8h-source.html b/doc/html/writing__demo_8h-source.html new file mode 100644 index 0000000..47970eb --- /dev/null +++ b/doc/html/writing__demo_8h-source.html @@ -0,0 +1,32 @@ + + +glcd: writing_demo.h Source File + + + + + +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
    + + diff --git a/doc/html/writing__demo_8h.html b/doc/html/writing__demo_8h.html new file mode 100644 index 0000000..c665ef0 --- /dev/null +++ b/doc/html/writing__demo_8h.html @@ -0,0 +1,79 @@ + + +glcd: writing_demo.h File Reference + + + + + +
    +

    writing_demo.h File Reference

    #include <stdlib.h>
    +#include "include/lc7981.h"
    +#include "include/adc.h"
    +#include "include/touch.h"
    + +

    +Go to the source code of this file. + + + + + + + + + +

    Defines

    #define WIRTING_DEMO_H_   WIRTING_DEMO_H_
     particel_demo.h

    Functions

    void writing_demo ()
     particel_demo.c
    +


    Define Documentation

    + +
    +
    + + + + +
    #define WIRTING_DEMO_H_   WIRTING_DEMO_H_
    +
    +
    + +

    +particel_demo.h +

    +Created on: 29.05.2009 Author: sebastian +

    +

    +


    Function Documentation

    + +
    +
    + + + + + + + + +
    void writing_demo (  ) 
    +
    +
    + +

    +particel_demo.c +

    +Created on: 29.05.2009 Author: sebastian +

    +

    +

    +
    Generated on Mon Jun 1 14:55:44 2009 for glcd by  + +doxygen 1.5.5
    + + diff --git a/doc/latex/adc_8c.tex b/doc/latex/adc_8c.tex new file mode 100644 index 0000000..c9754f7 --- /dev/null +++ b/doc/latex/adc_8c.tex @@ -0,0 +1,16 @@ +\section{include/adc.c File Reference} +\label{adc_8c}\index{include/adc.c@{include/adc.c}} +{\tt \#include \char`\"{}adc.h\char`\"{}}\par +\subsection*{Functions} +\begin{CompactItemize} +\item +uint16\_\-t {\bf readADC} (uint8\_\-t channel) +\end{CompactItemize} + + +\subsection{Function Documentation} +\index{adc.c@{adc.c}!readADC@{readADC}} +\index{readADC@{readADC}!adc.c@{adc.c}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t readADC (uint8\_\-t {\em channel})}\label{adc_8c_812736491523e54e6bf10a142821e7fe} + + diff --git a/doc/latex/adc_8h.tex b/doc/latex/adc_8h.tex new file mode 100644 index 0000000..df6b3a1 --- /dev/null +++ b/doc/latex/adc_8h.tex @@ -0,0 +1,31 @@ +\section{include/adc.h File Reference} +\label{adc_8h}\index{include/adc.h@{include/adc.h}} +{\tt \#include $<$avr/io.h$>$}\par +{\tt \#include $<$util/delay.h$>$}\par +{\tt \#include $<$inttypes.h$>$}\par +\subsection*{Defines} +\begin{CompactItemize} +\item +\#define {\bf ADC\_\-H}~ADC\_\-H +\end{CompactItemize} +\subsection*{Functions} +\begin{CompactItemize} +\item +uint16\_\-t {\bf readADC} (uint8\_\-t channel) +\end{CompactItemize} + + +\subsection{Define Documentation} +\index{adc.h@{adc.h}!ADC\_\-H@{ADC\_\-H}} +\index{ADC\_\-H@{ADC\_\-H}!adc.h@{adc.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define ADC\_\-H~ADC\_\-H}\label{adc_8h_7d45c6fd49da9ab97ff07bff1c3ddee5} + + + + +\subsection{Function Documentation} +\index{adc.h@{adc.h}!readADC@{readADC}} +\index{readADC@{readADC}!adc.h@{adc.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t readADC (uint8\_\-t {\em channel})}\label{adc_8h_812736491523e54e6bf10a142821e7fe} + + diff --git a/doc/latex/doxygen.sty b/doc/latex/doxygen.sty index e875c6a..f75c7ca 100644 --- a/doc/latex/doxygen.sty +++ b/doc/latex/doxygen.sty @@ -10,8 +10,8 @@ {\fancyplain{}{\bfseries\rightmark}} \rhead[\fancyplain{}{\bfseries\leftmark}] {\fancyplain{}{\bfseries\thepage}} -\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Tue May 26 15:32:23 2009 for glcd by Doxygen }]{} -\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Tue May 26 15:32:23 2009 for glcd by Doxygen }} +\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Mon Jun 1 14:55:44 2009 for glcd by Doxygen }]{} +\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Mon Jun 1 14:55:44 2009 for glcd by Doxygen }} \cfoot{} \newenvironment{Code} {\footnotesize} diff --git a/doc/latex/files.tex b/doc/latex/files.tex index 44ba4a8..6617a8c 100644 --- a/doc/latex/files.tex +++ b/doc/latex/files.tex @@ -4,6 +4,12 @@ Here is a list of all files with brief descriptions:\begin{CompactList} \item\contentsline{section}{{\bf 8x8\_\-horizontal\_\-LSB\_\-1.h} }{\pageref{8x8__horizontal__LSB__1_8h}}{} \item\contentsline{section}{{\bf button.h} }{\pageref{button_8h}}{} \item\contentsline{section}{{\bf main.c} }{\pageref{main_8c}}{} +\item\contentsline{section}{{\bf writing\_\-demo.c} }{\pageref{writing__demo_8c}}{} +\item\contentsline{section}{{\bf writing\_\-demo.h} }{\pageref{writing__demo_8h}}{} +\item\contentsline{section}{include/{\bf adc.c} }{\pageref{adc_8c}}{} +\item\contentsline{section}{include/{\bf adc.h} }{\pageref{adc_8h}}{} \item\contentsline{section}{include/{\bf lc7981.c} }{\pageref{lc7981_8c}}{} \item\contentsline{section}{include/{\bf lc7981.h} }{\pageref{lc7981_8h}}{} +\item\contentsline{section}{include/{\bf touch.c} }{\pageref{touch_8c}}{} +\item\contentsline{section}{include/{\bf touch.h} }{\pageref{touch_8h}}{} \end{CompactList} diff --git a/doc/latex/lc7981_8h.tex b/doc/latex/lc7981_8h.tex index 8ebf290..2ccdf6a 100644 --- a/doc/latex/lc7981_8h.tex +++ b/doc/latex/lc7981_8h.tex @@ -8,15 +8,15 @@ \item \#define {\bf LC7981\_\-H\_\-}~LC7981\_\-H\_\- \begin{CompactList}\small\item\em protects this file from beeing double included \item\end{CompactList}\item -\#define {\bf LCD\_\-CTRL}~PORTC +\#define {\bf LCD\_\-CTRL}~PORTA \begin{CompactList}\small\item\em Port used for control signals. \item\end{CompactList}\item -\#define {\bf LCD\_\-CRTL\_\-DDR}~DDRC +\#define {\bf LCD\_\-CRTL\_\-DDR}~DDRA \begin{CompactList}\small\item\em Data-Direction-Register for the control signals. \item\end{CompactList}\item -\#define {\bf LCD\_\-RS}~PC4 +\#define {\bf LCD\_\-RS}~PA4 \begin{CompactList}\small\item\em Register-Select Pin of the Display. \item\end{CompactList}\item -\#define {\bf LCD\_\-RW}~PC2 +\#define {\bf LCD\_\-RW}~PA2 \begin{CompactList}\small\item\em Read-Write-select Pin. \item\end{CompactList}\item -\#define {\bf LCD\_\-EN}~PC0 +\#define {\bf LCD\_\-EN}~PA0 \begin{CompactList}\small\item\em Strobe Pin. \item\end{CompactList}\item \#define {\bf LCD\_\-DATA}~PORTD \begin{CompactList}\small\item\em Port used for data. \item\end{CompactList}\item @@ -87,14 +87,14 @@ protects this file from beeing double included \index{lc7981.h@{lc7981.h}!LCD\_\-CRTL\_\-DDR@{LCD\_\-CRTL\_\-DDR}} \index{LCD\_\-CRTL\_\-DDR@{LCD\_\-CRTL\_\-DDR}!lc7981.h@{lc7981.h}} -\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-CRTL\_\-DDR~DDRC}\label{lc7981_8h_4b6c8400da9a1ca3d4d83f3ef1f9c34a} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-CRTL\_\-DDR~DDRA}\label{lc7981_8h_4b6c8400da9a1ca3d4d83f3ef1f9c34a} Data-Direction-Register for the control signals. \index{lc7981.h@{lc7981.h}!LCD\_\-CTRL@{LCD\_\-CTRL}} \index{LCD\_\-CTRL@{LCD\_\-CTRL}!lc7981.h@{lc7981.h}} -\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-CTRL~PORTC}\label{lc7981_8h_8e945df7ca614325cafa08258e82a63c} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-CTRL~PORTA}\label{lc7981_8h_8e945df7ca614325cafa08258e82a63c} Port used for control signals. @@ -115,7 +115,7 @@ Data-Direction-Register for Data. \index{lc7981.h@{lc7981.h}!LCD\_\-EN@{LCD\_\-EN}} \index{LCD\_\-EN@{LCD\_\-EN}!lc7981.h@{lc7981.h}} -\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-EN~PC0}\label{lc7981_8h_1640ffbc0d8ec0f7edb04a2b93918072} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-EN~PA0}\label{lc7981_8h_1640ffbc0d8ec0f7edb04a2b93918072} Strobe Pin. @@ -157,7 +157,7 @@ Horizontal display size in pixels. \index{lc7981.h@{lc7981.h}!LCD\_\-RS@{LCD\_\-RS}} \index{LCD\_\-RS@{LCD\_\-RS}!lc7981.h@{lc7981.h}} -\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-RS~PC4}\label{lc7981_8h_4781e073871c6f27f89b9463ad3a4ed1} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-RS~PA4}\label{lc7981_8h_4781e073871c6f27f89b9463ad3a4ed1} Register-Select Pin of the Display. @@ -178,7 +178,7 @@ Set the Register-Select pin low. \index{lc7981.h@{lc7981.h}!LCD\_\-RW@{LCD\_\-RW}} \index{LCD\_\-RW@{LCD\_\-RW}!lc7981.h@{lc7981.h}} -\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-RW~PC2}\label{lc7981_8h_26089a10ddd59a0dc7283c19ccc02533} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LCD\_\-RW~PA2}\label{lc7981_8h_26089a10ddd59a0dc7283c19ccc02533} Read-Write-select Pin. diff --git a/doc/latex/main_8c.tex b/doc/latex/main_8c.tex index 1e81040..196c94c 100644 --- a/doc/latex/main_8c.tex +++ b/doc/latex/main_8c.tex @@ -3,9 +3,11 @@ {\tt \#include $<$avr/io.h$>$}\par {\tt \#include $<$stdlib.h$>$}\par {\tt \#include \char`\"{}include/lc7981.h\char`\"{}}\par +{\tt \#include \char`\"{}include/adc.h\char`\"{}}\par {\tt \#include \char`\"{}button.h\char`\"{}}\par {\tt \#include \char`\"{}12x16\_\-horizontal\_\-LSB\_\-1.h\char`\"{}}\par -{\tt \#include \char`\"{}8x8\_\-horizontal\_\-LSB\_\-1.h\char`\"{}}\par +{\tt \#include \char`\"{}include/touch.h\char`\"{}}\par +{\tt \#include \char`\"{}writing\_\-demo.h\char`\"{}}\par \subsection*{Functions} \begin{CompactItemize} \item diff --git a/doc/latex/refman.tex b/doc/latex/refman.tex index 09df3c9..3a63b99 100644 --- a/doc/latex/refman.tex +++ b/doc/latex/refman.tex @@ -21,7 +21,7 @@ \vspace*{1cm} {\large Generated by Doxygen 1.5.5}\\ \vspace*{0.5cm} -{\small Tue May 26 15:32:24 2009}\\ +{\small Mon Jun 1 14:55:44 2009}\\ \end{center} \end{titlepage} \clearemptydoublepage @@ -35,8 +35,14 @@ \input{12x16__horizontal__LSB__1_8h} \include{8x8__horizontal__LSB__1_8h} \include{button_8h} +\include{adc_8c} +\include{adc_8h} \include{lc7981_8c} \include{lc7981_8h} +\include{touch_8c} +\include{touch_8h} \include{main_8c} +\include{writing__demo_8c} +\include{writing__demo_8h} \printindex \end{document} diff --git a/doc/latex/touch_8c.tex b/doc/latex/touch_8c.tex new file mode 100644 index 0000000..a21794c --- /dev/null +++ b/doc/latex/touch_8c.tex @@ -0,0 +1,34 @@ +\section{include/touch.c File Reference} +\label{touch_8c}\index{include/touch.c@{include/touch.c}} +{\tt \#include \char`\"{}touch.h\char`\"{}}\par +\subsection*{Functions} +\begin{CompactItemize} +\item +uint8\_\-t {\bf touch\_\-is\_\-pressed} () +\begin{CompactList}\small\item\em This functions set 5V to X1 and GND to Y1, the voltage at X2 is measured via the ADC. \item\end{CompactList}\item +int16\_\-t {\bf touch\_\-readX} () +\item +int16\_\-t {\bf touch\_\-readY} () +\end{CompactItemize} + + +\subsection{Function Documentation} +\index{touch.c@{touch.c}!touch\_\-is\_\-pressed@{touch\_\-is\_\-pressed}} +\index{touch\_\-is\_\-pressed@{touch\_\-is\_\-pressed}!touch.c@{touch.c}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t touch\_\-is\_\-pressed ()}\label{touch_8c_215947ded979abf11d490536508ecafc} + + +This functions set 5V to X1 and GND to Y1, the voltage at X2 is measured via the ADC. + +If the ADC-Value is less then TOUCH\_\-PRESSED\_\-LEVEL, the function will return 1. \begin{Desc} +\item[Returns:]1 if pressed else 0 \end{Desc} +\index{touch.c@{touch.c}!touch\_\-readX@{touch\_\-readX}} +\index{touch\_\-readX@{touch\_\-readX}!touch.c@{touch.c}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int16\_\-t touch\_\-readX ()}\label{touch_8c_dbea78d45cc89e43f7510ebf6eb01ac0} + + +\index{touch.c@{touch.c}!touch\_\-readY@{touch\_\-readY}} +\index{touch\_\-readY@{touch\_\-readY}!touch.c@{touch.c}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int16\_\-t touch\_\-readY ()}\label{touch_8c_cdce8a6997f2d00dbfcb61be2e67e886} + + diff --git a/doc/latex/touch_8h.tex b/doc/latex/touch_8h.tex new file mode 100644 index 0000000..19bfac9 --- /dev/null +++ b/doc/latex/touch_8h.tex @@ -0,0 +1,105 @@ +\section{include/touch.h File Reference} +\label{touch_8h}\index{include/touch.h@{include/touch.h}} +{\tt \#include \char`\"{}adc.h\char`\"{}}\par +\subsection*{Defines} +\begin{CompactItemize} +\item +\#define {\bf TOUCH\_\-H\_\-}~TOUCH\_\-H\_\- +\begin{CompactList}\small\item\em \doxyref{touch.h}{p.}{touch_8h} \item\end{CompactList}\item +\#define {\bf TOUCH\_\-PORT}~PORTA +\item +\#define {\bf TOUCH\_\-PIN}~PINA +\item +\#define {\bf TOUCH\_\-DDR}~DDRA +\item +\#define {\bf TOUCH\_\-X1}~PA1 +\item +\#define {\bf TOUCH\_\-X2}~PA3 +\item +\#define {\bf TOUCH\_\-Y1}~PA5 +\item +\#define {\bf TOUCH\_\-Y2}~PA7 +\item +\#define {\bf TOUCH\_\-PRESSED\_\-LEVEL}~1000 +\end{CompactItemize} +\subsection*{Functions} +\begin{CompactItemize} +\item +uint8\_\-t {\bf touch\_\-is\_\-pressed} () +\begin{CompactList}\small\item\em This functions set 5V to X1 and GND to Y1, the voltage at X2 is measured via the ADC. \item\end{CompactList}\item +int16\_\-t {\bf touch\_\-readX} () +\item +int16\_\-t {\bf touch\_\-readY} () +\end{CompactItemize} + + +\subsection{Define Documentation} +\index{touch.h@{touch.h}!TOUCH\_\-DDR@{TOUCH\_\-DDR}} +\index{TOUCH\_\-DDR@{TOUCH\_\-DDR}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-DDR~DDRA}\label{touch_8h_7df7927e1c0467a8e462b483a7da62c7} + + +\index{touch.h@{touch.h}!TOUCH\_\-H\_\-@{TOUCH\_\-H\_\-}} +\index{TOUCH\_\-H\_\-@{TOUCH\_\-H\_\-}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-H\_\-~TOUCH\_\-H\_\-}\label{touch_8h_c7d5ec105ddb1a3240d9f8b1dc259974} + + +\doxyref{touch.h}{p.}{touch_8h} + +Created on: 29.05.2009 Author: sebastian \index{touch.h@{touch.h}!TOUCH\_\-PIN@{TOUCH\_\-PIN}} +\index{TOUCH\_\-PIN@{TOUCH\_\-PIN}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-PIN~PINA}\label{touch_8h_eccf4c5be8d2e85e37d07d834673ce29} + + +\index{touch.h@{touch.h}!TOUCH\_\-PORT@{TOUCH\_\-PORT}} +\index{TOUCH\_\-PORT@{TOUCH\_\-PORT}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-PORT~PORTA}\label{touch_8h_2ea8f9960f5f713995fd0e1304a33831} + + +\index{touch.h@{touch.h}!TOUCH\_\-PRESSED\_\-LEVEL@{TOUCH\_\-PRESSED\_\-LEVEL}} +\index{TOUCH\_\-PRESSED\_\-LEVEL@{TOUCH\_\-PRESSED\_\-LEVEL}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-PRESSED\_\-LEVEL~1000}\label{touch_8h_7f34b02cb67c42f6d7b862a061496da7} + + +\index{touch.h@{touch.h}!TOUCH\_\-X1@{TOUCH\_\-X1}} +\index{TOUCH\_\-X1@{TOUCH\_\-X1}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-X1~PA1}\label{touch_8h_68fb42f50f3eb1acfc00869488260dd8} + + +\index{touch.h@{touch.h}!TOUCH\_\-X2@{TOUCH\_\-X2}} +\index{TOUCH\_\-X2@{TOUCH\_\-X2}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-X2~PA3}\label{touch_8h_f14aca3b903c90c70433d41fdb840a93} + + +\index{touch.h@{touch.h}!TOUCH\_\-Y1@{TOUCH\_\-Y1}} +\index{TOUCH\_\-Y1@{TOUCH\_\-Y1}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-Y1~PA5}\label{touch_8h_2168431fed386ed4cfec1127b055652a} + + +\index{touch.h@{touch.h}!TOUCH\_\-Y2@{TOUCH\_\-Y2}} +\index{TOUCH\_\-Y2@{TOUCH\_\-Y2}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define TOUCH\_\-Y2~PA7}\label{touch_8h_347b052e8cb9e548e2aaebbb9d8ed405} + + + + +\subsection{Function Documentation} +\index{touch.h@{touch.h}!touch\_\-is\_\-pressed@{touch\_\-is\_\-pressed}} +\index{touch\_\-is\_\-pressed@{touch\_\-is\_\-pressed}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t touch\_\-is\_\-pressed ()}\label{touch_8h_215947ded979abf11d490536508ecafc} + + +This functions set 5V to X1 and GND to Y1, the voltage at X2 is measured via the ADC. + +If the ADC-Value is less then TOUCH\_\-PRESSED\_\-LEVEL, the function will return 1. \begin{Desc} +\item[Returns:]1 if pressed else 0 \end{Desc} +\index{touch.h@{touch.h}!touch\_\-readX@{touch\_\-readX}} +\index{touch\_\-readX@{touch\_\-readX}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int16\_\-t touch\_\-readX ()}\label{touch_8h_dbea78d45cc89e43f7510ebf6eb01ac0} + + +\index{touch.h@{touch.h}!touch\_\-readY@{touch\_\-readY}} +\index{touch\_\-readY@{touch\_\-readY}!touch.h@{touch.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int16\_\-t touch\_\-readY ()}\label{touch_8h_cdce8a6997f2d00dbfcb61be2e67e886} + + diff --git a/doc/latex/writing__demo_8c.tex b/doc/latex/writing__demo_8c.tex new file mode 100644 index 0000000..f1d94f0 --- /dev/null +++ b/doc/latex/writing__demo_8c.tex @@ -0,0 +1,19 @@ +\section{writing\_\-demo.c File Reference} +\label{writing__demo_8c}\index{writing\_\-demo.c@{writing\_\-demo.c}} +{\tt \#include \char`\"{}writing\_\-demo.h\char`\"{}}\par +\subsection*{Functions} +\begin{CompactItemize} +\item +void {\bf writing\_\-demo} () +\begin{CompactList}\small\item\em particel\_\-demo.c \item\end{CompactList}\end{CompactItemize} + + +\subsection{Function Documentation} +\index{writing\_\-demo.c@{writing\_\-demo.c}!writing\_\-demo@{writing\_\-demo}} +\index{writing\_\-demo@{writing\_\-demo}!writing_demo.c@{writing\_\-demo.c}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void writing\_\-demo ()}\label{writing__demo_8c_bdd925f1d9c8a09b9950c059c51e02d1} + + +particel\_\-demo.c + +Created on: 29.05.2009 Author: sebastian \ No newline at end of file diff --git a/doc/latex/writing__demo_8h.tex b/doc/latex/writing__demo_8h.tex new file mode 100644 index 0000000..36fe40c --- /dev/null +++ b/doc/latex/writing__demo_8h.tex @@ -0,0 +1,37 @@ +\section{writing\_\-demo.h File Reference} +\label{writing__demo_8h}\index{writing\_\-demo.h@{writing\_\-demo.h}} +{\tt \#include $<$stdlib.h$>$}\par +{\tt \#include \char`\"{}include/lc7981.h\char`\"{}}\par +{\tt \#include \char`\"{}include/adc.h\char`\"{}}\par +{\tt \#include \char`\"{}include/touch.h\char`\"{}}\par +\subsection*{Defines} +\begin{CompactItemize} +\item +\#define {\bf WIRTING\_\-DEMO\_\-H\_\-}~WIRTING\_\-DEMO\_\-H\_\- +\begin{CompactList}\small\item\em particel\_\-demo.h \item\end{CompactList}\end{CompactItemize} +\subsection*{Functions} +\begin{CompactItemize} +\item +void {\bf writing\_\-demo} () +\begin{CompactList}\small\item\em particel\_\-demo.c \item\end{CompactList}\end{CompactItemize} + + +\subsection{Define Documentation} +\index{writing\_\-demo.h@{writing\_\-demo.h}!WIRTING\_\-DEMO\_\-H\_\-@{WIRTING\_\-DEMO\_\-H\_\-}} +\index{WIRTING\_\-DEMO\_\-H\_\-@{WIRTING\_\-DEMO\_\-H\_\-}!writing_demo.h@{writing\_\-demo.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define WIRTING\_\-DEMO\_\-H\_\-~WIRTING\_\-DEMO\_\-H\_\-}\label{writing__demo_8h_69a65c026c8b8e97c7b6f99de76ab00d} + + +particel\_\-demo.h + +Created on: 29.05.2009 Author: sebastian + +\subsection{Function Documentation} +\index{writing\_\-demo.h@{writing\_\-demo.h}!writing\_\-demo@{writing\_\-demo}} +\index{writing\_\-demo@{writing\_\-demo}!writing_demo.h@{writing\_\-demo.h}} +\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void writing\_\-demo ()}\label{writing__demo_8h_bdd925f1d9c8a09b9950c059c51e02d1} + + +particel\_\-demo.c + +Created on: 29.05.2009 Author: sebastian \ No newline at end of file diff --git a/include/adc.c b/include/adc.c new file mode 100644 index 0000000..0bb35e0 --- /dev/null +++ b/include/adc.c @@ -0,0 +1,30 @@ +#include "adc.h" + + +uint16_t readADC(uint8_t channel) { + uint16_t result; + + //ADC aktiv, Prescaler 16 + ADCSRA = (1 << ADEN) | (1 << ADPS2); + + //ADC0 kein mutiplexing + ADMUX = channel; + + // AVcc als Versorgungspannung + ADMUX |= (1 << REFS0); + + //ADC starten mit Dummyreadout + ADCSRA |= (1 << ADSC); + while(ADCSRA & (1 << ADSC)); + + + ADCSRA |= (1 << ADSC); + while(ADCSRA & (1 << ADSC)); + result = ADCW; + + //ADC aus + ADCSRA &= ~(1 << ADEN); + + + return result; +} diff --git a/include/adc.h b/include/adc.h new file mode 100644 index 0000000..077b243 --- /dev/null +++ b/include/adc.h @@ -0,0 +1,11 @@ +#ifndef ADC_H +#define ADC_H ADC_H + +#include +#include +#include + + +uint16_t readADC(uint8_t channel); + +#endif /* ADC_H */ diff --git a/include/lc7981.c b/include/lc7981.c index 3cfdb60..8c28244 100644 --- a/include/lc7981.c +++ b/include/lc7981.c @@ -36,8 +36,7 @@ void lcd_init(uint8_t mode) { LCD_DATA_DDR = 0xFF; LCD_DATA = 0; - LCD_CRTL_DDR = 0xFF; - //|= (1 << LCD_RS) | (1 << LCD_RW) | (1 << LCD_EN) | (1 << LCD_CS) | (1 << LCD_RST); + LCD_CRTL_DDR |= (1 << LCD_RS) | (1 << LCD_RW) | (1 << LCD_EN); LCD_CTRL = 0; diff --git a/include/lc7981.h b/include/lc7981.h index 2a71429..3d07509 100644 --- a/include/lc7981.h +++ b/include/lc7981.h @@ -35,11 +35,11 @@ #include #include -#define LCD_CTRL PORTC //!< Port used for control signals -#define LCD_CRTL_DDR DDRC //!< Data-Direction-Register for the control signals -#define LCD_RS PC4 //!< Register-Select Pin of the Display -#define LCD_RW PC2 //!< Read-Write-select Pin -#define LCD_EN PC0 //!< Strobe Pin +#define LCD_CTRL PORTA //!< Port used for control signals +#define LCD_CRTL_DDR DDRA //!< Data-Direction-Register for the control signals +#define LCD_RS PA4 //!< Register-Select Pin of the Display +#define LCD_RW PA2 //!< Read-Write-select Pin +#define LCD_EN PA0 //!< Strobe Pin diff --git a/include/touch.c b/include/touch.c new file mode 100644 index 0000000..887016b --- /dev/null +++ b/include/touch.c @@ -0,0 +1,94 @@ +/* + * touch.c + * + * Created on: 29.05.2009 + * Author: sebastian + */ + +#include "touch.h" + + + +/** + * This functions set 5V to X1 and GND to Y1, + * the voltage at X2 is measured via the ADC. + * If the ADC-Value is less then TOUCH_PRESSED_LEVEL, + * the function will return 1. + * \return 1 if pressed else 0 + */ +uint8_t touch_is_pressed() { + TOUCH_DDR |= (1 << TOUCH_X1); + TOUCH_DDR |= (1 << TOUCH_Y1); + TOUCH_DDR &= ~(1 << TOUCH_X2); + + TOUCH_PORT &= ~(1 << TOUCH_Y1); + TOUCH_PORT |= (1 << TOUCH_X1); + + if(readADC(TOUCH_X2) < TOUCH_PRESSED_LEVEL) { + return 1; + } + else { + return 0; + } + +} +/** + * + * + */ +int16_t touch_readX() { + int16_t pos; + + if(touch_is_pressed()) { + + TOUCH_DDR |= (1 << TOUCH_X1); + TOUCH_DDR |= (1 << TOUCH_X2); + TOUCH_DDR &= ~(1 << TOUCH_Y1); + TOUCH_DDR &= ~(1 << TOUCH_Y2); + + TOUCH_PORT &= ~(1 << TOUCH_X1); + TOUCH_PORT |= (1 << TOUCH_X2); + + _delay_us(10); + + pos = (readADC(TOUCH_Y1) - 263) * 16 / 53; + + + return pos; + + + } + else { + return -1; + } + +} + + +int16_t touch_readY() { + int16_t pos; + + if(touch_is_pressed()) { + + TOUCH_DDR |= (1 << TOUCH_Y1); + TOUCH_DDR |= (1 << TOUCH_Y2); + TOUCH_DDR &= ~(1 << TOUCH_X1); + TOUCH_DDR &= ~(1 << TOUCH_X2); + + TOUCH_PORT |= (1 << TOUCH_Y1); + TOUCH_PORT &= ~(1 << TOUCH_Y2); + + _delay_us(10); + + pos = (readADC(TOUCH_X1) - 330) * 8 / 40; + + + return pos; + + + } + else { + return -1; + } + +} diff --git a/include/touch.h b/include/touch.h new file mode 100644 index 0000000..7ab88ee --- /dev/null +++ b/include/touch.h @@ -0,0 +1,30 @@ +/** + * touch.h + * + * Created on: 29.05.2009 + * Author: sebastian + */ + +#ifndef TOUCH_H_ +#define TOUCH_H_ TOUCH_H_ + +#include "adc.h" + + +#define TOUCH_PORT PORTA +#define TOUCH_PIN PINA +#define TOUCH_DDR DDRA + +#define TOUCH_X1 PA1 +#define TOUCH_X2 PA3 +#define TOUCH_Y1 PA5 +#define TOUCH_Y2 PA7 + +#define TOUCH_PRESSED_LEVEL 1000 + +uint8_t touch_is_pressed(); + +int16_t touch_readX(); +int16_t touch_readY() ; + +#endif /* TOUCH_H_ */ diff --git a/main.c b/main.c index 73b5436..e2eb0ce 100644 --- a/main.c +++ b/main.c @@ -9,83 +9,32 @@ #include #include "include/lc7981.h" +#include "include/adc.h" #include "button.h" #include "12x16_horizontal_LSB_1.h" -#include "8x8_horizontal_LSB_1.h" +//#include "8x8_horizontal_LSB_1.h" +#include "include/touch.h" + +#include "writing_demo.h" int main() { - uint8_t x,y; - uint16_t pos; - const uint8_t *letter; + int16_t posX,posY; + uint8_t i; + char tmp[10]; + lcd_init(LCD_GRAPHIC); - - - //while(1) { - - lcd_plot_text(5,5,"Hello",16,16,font_12x16); lcd_plot_text(50,22,"World",16,16,font_12x16); - lcd_plot_text(5,40,"Hallo Welt !",8,8,font_8x8); + while(!touch_is_pressed()); - - /*for(x = 1; x < 10; x++) { - _delay_ms(500); - } - lcd_clear(); - - - for(x = 31; x > 0; x--) { - lcd_plot_char(x,12,'A',12,16,font_12x16); - - _delay_ms(500); - lcd_clear(); - } - } - -*/ - - - /* - - while(1) { - for(y = 1; y <= 32; y++) { - lcd_plot_bitmap(16+y,16,bitmap,32,32); - _delay_ms(500); - lcd_clear(); - } - - for(y = 31; y > 0; y--) { - lcd_plot_bitmap(16+y,16,bitmap,32,32); - _delay_ms(500); - lcd_clear(); - } - } -*/ - - - /*draw_penguin(); */ - - - /*for(i = 0; i <= 8; i++) { - lcd_gotoxy(0,i); - lcd_write_text("Zeile : "); - lcd_write_text(itoa(i,tmp,10)); - lcd_write_text("\n"); - _delay_ms(100); - } - _delay_ms(100); - - - - lcd_write_text("123456789012345678901234567890\n"); - lcd_write_text("Letzte Zeile"); */ + writing_demo(); return 0; diff --git a/writing_demo.c b/writing_demo.c new file mode 100644 index 0000000..103fb6f --- /dev/null +++ b/writing_demo.c @@ -0,0 +1,41 @@ +/** + * particel_demo.c + * + * Created on: 29.05.2009 + * Author: sebastian + */ + + +#include "writing_demo.h" + + + +void writing_demo() { + uint8_t i; + uint16_t x,y; + + lcd_clear(); + + while(1) { + + if(touch_is_pressed()) { + + x = touch_readX(); + y = touch_readY(); + + lcd_plot_pixel(x-1,y+1,PIXEL_ON); + lcd_plot_pixel(x,y+1,PIXEL_ON); + lcd_plot_pixel(x+1,y+1,PIXEL_ON); + lcd_plot_pixel(x-1,y,PIXEL_ON); + lcd_plot_pixel(x,y,PIXEL_ON); + lcd_plot_pixel(x+1,y,PIXEL_ON); + lcd_plot_pixel(x-1,y-1,PIXEL_ON); + lcd_plot_pixel(x,y-1,PIXEL_ON); + lcd_plot_pixel(x+1,y-1,PIXEL_ON); + + } + _delay_ms(1); + + } + +} diff --git a/writing_demo.h b/writing_demo.h new file mode 100644 index 0000000..42daba6 --- /dev/null +++ b/writing_demo.h @@ -0,0 +1,18 @@ +/** + * particel_demo.h + * + * Created on: 29.05.2009 + * Author: sebastian + */ + +#ifndef WIRTING_DEMO_H_ +#define WIRTING_DEMO_H_ WIRTING_DEMO_H_ + +#include +#include "include/lc7981.h" +#include "include/adc.h" +#include "include/touch.h" + +void writing_demo(); + +#endif /* PARTICEL_DEMO_H_ */