PICSimLab - Programmable IC Simulator Laboratory 0.9.2
PICSimLab - API
Loading...
Searching...
No Matches
lcd_pcf8833.h
1/* ########################################################################
2
3 PICSimLab - Programmable IC Simulator Laboratory
4
5 ########################################################################
6
7 Copyright (c) : 2010-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 LCD_PCF8833
27#define LCD_PCF8833
28
29#include "../lib/draw.h"
30#include "bitbang_spi.h"
31
32/* pinout
33 1 VCC
34 2 NOT_RESET
35 3 DATA
36 4 CLK
37 5 NOT_CS
38 6 VCC
39 7 NC
40 8 GND
41 9 VLED-
42 10 VLED+
43*/
44
45typedef struct {
46 unsigned int ram[132][132];
47 bitbang_spi_t bb_spi;
48 int dc;
49 unsigned char colm;
50 unsigned char madctl;
51 unsigned char hrst;
52 unsigned char tp, dat;
53 unsigned char x, y, r, g, b;
54 unsigned int color;
55 unsigned char update;
56 unsigned char command;
57 unsigned char rmin;
58 unsigned char rmax;
59 unsigned char cmin;
60 unsigned char cmax;
62
63void lcd_pcf8833_rst(lcd_pcf8833_t* lcd);
64void lcd_pcf8833_init(lcd_pcf8833_t* lcd);
65void lcd_pcf8833_update(lcd_pcf8833_t* lcd);
66
67unsigned char lcd_pcf8833_io(lcd_pcf8833_t* lcd, unsigned char pdat, unsigned char clk, unsigned char ncs,
68 unsigned char nrst);
69
70void lcd_pcf8833_draw(lcd_pcf8833_t* lcd, CanvasCmd_ft CanvasCmd, int x1, int y1, int w1, int h1, int picpwr);
71
72#endif // LCD_PCF8833
Definition bitbang_spi.h:35
Definition lcd_pcf8833.h:45