Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetNetIf mbed
Diff: ht1632.h
- Revision:
- 0:3011998ebd3e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ht1632.h Wed Sep 28 07:59:14 2011 +0000 @@ -0,0 +1,27 @@ +/* + * Header for Holtek ht1632 LED driver + */ + + /* Original Nov, 2008 by Bill Westfield */ + + +#define ID_CMD 4 /* ID = 100 - Commands */ +#define ID_RD 6 /* ID = 110 - Read RAM */ +#define ID_WR 5 /* ID = 101 - Write RAM */ + +#define CMD_SYSDIS 0x00 /* CMD= 0000-0000-x Turn off oscil */ +#define CMD_SYSON 0x01 /* CMD= 0000-0001-x Enable system oscil */ +#define CMD_LEDOFF 0x02 /* CMD= 0000-0010-x LED duty cycle gen off */ +#define CMD_LEDON 0x03 /* CMD= 0000-0011-x LEDs ON */ +#define CMD_BLOFF 0x08 /* CMD= 0000-1000-x Blink ON */ +#define CMD_BLON 0x09 /* CMD= 0000-1001-x Blink Off */ +#define CMD_SLVMD 0x10 /* CMD= 0001-00xx-x Slave Mode */ +#define CMD_MSTMD 0x14 /* CMD= 0001-01xx-x Master Mode */ +#define CMD_RCCLK 0x18 /* CMD= 0001-10xx-x Use on-chip clock */ +#define CMD_EXTCLK 0x1C /* CMD= 0001-11xx-x Use external clock */ +#define CMD_COMS00 0x20 /* CMD= 0010-ABxx-x commons options */ +#define CMD_COMS01 0x24 /* CMD= 0010-ABxx-x commons options */ +#define CMD_COMS10 0x28 /* CMD= 0010-ABxx-x commons options */ +#define CMD_COMS11 0x2C /* CMD= 0010-ABxx-x commons options */ +#define CMD_PWM 0xA0 /* CMD= 101x-PPPP-x PWM duty cycle */ +