PICSimLab - Programmable IC Simulator Laboratory 0.9.2
PICSimLab - API
Loading...
Searching...
No Matches
io_MM74C922.h
1/* ########################################################################
2
3 PICSimLab - Programmable IC Simulator Laboratory
4
5 ########################################################################
6
7 Copyright (c) : 2021-2024 Luis Claudio GambĂ´a Lopes <lcgamboa@yahoo.com>
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
23 For e-mail suggestions : lcgamboa@yahoo.com
24 ######################################################################## */
25
26#ifndef IO_MM74C922
27#define IO_MM74C922
28
29/*
30 pinout
311 ROW Y1
322 ROW Y2
333 ROW Y3
344 ROW Y4
355 OSC 1 uF (50Hz scan rate)
366 KBM 0.1uF (1ms debounce time)
377 COL X4
388 COL X3
399 GND
4010 COL X2
4111 COL X1
4212 DA
4312 /OE
4414 D
4515 C
4616 B
4717 A
4818 VCC
49*/
50
51typedef struct {
52 unsigned long freq;
53 unsigned int count;
54 unsigned char cols;
55 unsigned short out;
56 unsigned char da;
57 unsigned char key;
58 unsigned int srate;
60
61void io_MM74C922_rst(io_MM74C922_t* kc);
62void io_MM74C922_init(io_MM74C922_t* kc);
63void io_MM74C922_set_clk_freq(io_MM74C922_t* kc, const unsigned long freq);
64
65unsigned short io_MM74C922_io(io_MM74C922_t* kc, unsigned char Y);
66
67#endif // IO_MM74C922
Definition io_MM74C922.h:51