Wim Huiskamp
/
mbed_HCMS2975
Test for HCMS2975 Alphanumeric LED display
Testcode for HCMS2975 alphanumeric LED displays.
Revision 1:feaf55287b27, committed 2015-01-05
- Comitter:
- wim
- Date:
- Mon Jan 05 20:37:37 2015 +0000
- Parent:
- 0:6bfe606278c7
- Commit message:
- Fixed setBrightness() at init()
Changed in this revision
HCMS2975.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 6bfe606278c7 -r feaf55287b27 HCMS2975.lib --- a/HCMS2975.lib Wed Oct 15 17:00:10 2014 +0000 +++ b/HCMS2975.lib Mon Jan 05 20:37:37 2015 +0000 @@ -1,1 +1,1 @@ -http://developer.mbed.org/users/wim/code/HCMS2975/#a332431006fb +http://developer.mbed.org/users/wim/code/HCMS2975/#f46d90374eb2
diff -r 6bfe606278c7 -r feaf55287b27 main.cpp --- a/main.cpp Wed Oct 15 17:00:10 2014 +0000 +++ b/main.cpp Mon Jan 05 20:37:37 2015 +0000 @@ -23,7 +23,11 @@ //Display //HCMS2975 led(&spi_led, p8, p9, NC, HCMS2975::LED8x1); // SPI bus, CS pin, RS pin, RST pin, LEDType = Ok -HCMS2975 led(&spi_led, p8, p9, NC, HCMS2975::LED16x1); // SPI bus, CS pin, RS pin, RST pin, LEDType = Ok +//HCMS2975 led(&spi_led, p8, p9, NC, HCMS2975::LED16x1); // SPI bus, CS pin, RS pin, RST pin, LEDType = Ok +//HCMS2975 led(&spi_led, p8, p20, NC, HCMS2975::LED8x1); // SPI bus, CS pin, RS pin, RST pin, LEDType = Ok +//HCMS2975 led(&spi_led, p8, p20, NC, HCMS2975::LED8x2); // SPI bus, CS pin, RS pin, RST pin, LEDType = Ok +//HCMS2975 led(&spi_led, p8, p20, NC, HCMS2975::LED16x1); // SPI bus, CS pin, RS pin, RST pin, LEDType = Ok +HCMS2975 led(&spi_led, p8, p20, NC, HCMS2975::LED16x2); // SPI bus, CS pin, RS pin, RST pin, LEDType = Ok // Variables for Heartbeat and Status monitoring Ticker heartbeat; @@ -47,6 +51,8 @@ int main() { int cnt; + pc.printf("Hello mbed from HCMS2975\n\r"); + heartbeat_start(); led.locate(0, 0); @@ -75,12 +81,15 @@ led.putc(6); led.putc(7); wait(2); + + led.setBrightness(HCMS2975_BRIGHT_3_3); cnt=0x20; while(1) { wait(0.25); led.putc(cnt); + pc.putc('#'); cnt++; if (cnt == 0x80) cnt=0x20; }