-
Notifications
You must be signed in to change notification settings - Fork 7
/
ht1632_cmd.h
54 lines (45 loc) · 2.3 KB
/
ht1632_cmd.h
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
47
48
49
50
51
52
53
54
/*
MatrixDisplay Library 2.0
Author: Miles Burton, www.milesburton.com/
Need a 16x24 display? Check out www.mnethardware.co.uk
Copyright (c) 2010 Miles Burton All Rights Reserved
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
This module contains the various command codes required to control the LT1632 chip
*/
#ifndef H1632_CMD_GUARD
#define H1632_CMD_GUARD
/*
All the various commands
*/
#define HT1632_ID_CMD 4 /* ID = 100 - Commands */
#define HT1632_ID_RD 6 /* ID = 110 - Read RAM */
#define HT1632_ID_WR 5 /* ID = 101 - Write RAM */
#define HT1632_CMD_SYSDIS 0x00 /* CMD= 0000-0000-x Turn off oscil */
#define HT1632_CMD_SYSON 0x01 /* CMD= 0000-0001-x Enable system oscil */
#define HT1632_CMD_LEDOFF 0x02 /* CMD= 0000-0010-x LED duty cycle gen off */
#define HT1632_CMD_LEDON 0x03 /* CMD= 0000-0011-x LEDs ON */
#define HT1632_CMD_BLOFF 0x08 /* CMD= 0000-1000-x Blink OFF */
#define HT1632_CMD_BLON 0x09 /* CMD= 0000-1001-x Blink On */
#define HT1632_CMD_SLVMD 0x10 /* CMD= 0001-00xx-x Slave Mode */
#define HT1632_CMD_MSTMD 0x14 /* CMD= 0001-01xx-x Master Mode */
#define HT1632_CMD_RCCLK 0x18 /* CMD= 0001-10xx-x Use on-chip clock */
#define HT1632_CMD_EXTCLK 0x1C /* CMD= 0001-11xx-x Use external clock */
#define HT1632_CMD_COMS00 0x20 /* CMD= 0010-ABxx-x commons options */
#define HT1632_CMD_COMS01 0x24 /* CMD= 0010-ABxx-x commons options */
#define HT1632_CMD_COMS10 0x28 /* CMD= 0010-ABxx-x commons options */
#define HT1632_CMD_COMS11 0x2C //P-MOS OUTPUT AND 16COMMON OPTION
/* CMD= 0010-ABxx-x commons options */
#define HT1632_CMD_PWM 0xA0 /* CMD= 101x-PPPP-x PWM duty cycle */
#endif