aboutsummaryrefslogtreecommitdiffstats
path: root/README.HD44780.GPO
blob: 48886ae9e6dd14154e73e2829451d7613fff463c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# $Id: README.HD44780.GPO,v 1.2 2001/02/16 14:15:11 reinelt Exp $
#

Erweiterung der LCD Anzeige um 8 Ausgaenge (GPOs)

Man braucht:
1 Stk. 74HC573
1 Stk. ULN2803
8 Stk. RES 330R
8 Stk. LED rot 3mm

Schaltplan:
Die Schaltung wird parallel zum Display angeschlossen. 
INIT ist Pin 16 vom LPT am Rechner.
---|330r|--- das soll ein Widerstand 330 Ohm sein, 
             man kann aber auch 470 Ohm nehmen.
  ---|<---   das soll ein LED sein.
    Vcc      Versorgungsspannung 5V DC
    GND      Masse


           74HC573
        ______  ______              ULN2803
        |    |__|    |           ______  ______
 GND o--|1         20|---+ Vcc   |    |__|    |
  D0 o--|2         19|-----------|1         18|----|330r|---|<---+ Vcc
  D1 o--|3         18|-----------|2         17|----|330r|---|<---+ Vcc
  D2 o--|4         17|-----------|3         16|----|330r|---|<---+ Vcc
  D3 o--|5         16|-----------|4         15|----|330r|---|<---+ Vcc
  D4 o--|6         15|-----------|5         14|----|330r|---|<---+ Vcc
  D5 o--|7         14|-----------|6         13|----|330r|---|<---+ Vcc
  D6 o--|8         13|-----------|7         12|----|330r|---|<---+ Vcc
  D7 o--|9         12|-----------|8         11|----|330r|---|<---+ Vcc
INIT o--|10        11|-----------|9         10|----+ Vcc
        --------------           --------------
	
Statt der LED's kann man auch was anderes ansteuern. Der ULN2803 hat eine 
Open Kollektor Ausgang, der mit 30V belastet werden kann. Aber Vorsicht!!!

Die gesammte Schaltung nimmt max. ca. 130mA an 5V DC auf, ich nehme die 
Spannung vom Gameport. Bei mir klappts, ich uebernehme aber keine Garantie.

Wuppertal, den 13.02.2001

Carsten Nau
an> * * 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., 675 Mass Ave, Cambridge, MA 02139, USA. * * * $Log: bar.h,v $ * Revision 1.4 2003/10/05 17:58:50 reinelt * libtool junk; copyright messages cleaned up * * Revision 1.3 2002/08/19 07:52:19 reinelt * corrected type declaration of (*defchar)() * * Revision 1.2 2002/08/19 07:36:29 reinelt * * finished bar.c, USBLCD is the first driver that uses the generic bar functions * * Revision 1.1 2002/08/19 04:41:20 reinelt * introduced bar.c, moved bar stuff from display.h to bar.h * * */ #ifndef _BAR_H_ #define _BAR_H_ #define BAR_L (1<<0) #define BAR_R (1<<1) #define BAR_U (1<<2) #define BAR_D (1<<3) #define BAR_H2 (1<<4) #define BAR_V2 (1<<5) #define BAR_LOG (1<<6) #define BAR_T (1<<7) #define BAR_H (BAR_L | BAR_R) #define BAR_V (BAR_U | BAR_D | BAR_T) #define BAR_HV (BAR_H | BAR_V) typedef struct { int len1; int len2; int type; int segment; } BAR; typedef struct { int len1; int len2; int type; int used; int ascii; } SEGMENT; int bar_init (int rows, int cols, int xres, int yres, int chars); void bar_clear(void); void bar_add_segment(int len1, int len2, int type, int ascii); int bar_draw (int type, int row, int col, int max, int len1, int len2); int bar_process (void(*defchar)(int ascii, char *matrix)); int bar_peek (int row, int col); #endif