nlgplay for mbed
Dependencies: SDFileSystemEx mbed
Diff: main.cpp
- Revision:
- 4:4dc67a366727
- Parent:
- 3:aed228fa3ae4
- Child:
- 5:27f193e21222
--- a/main.cpp Tue May 27 15:47:18 2014 +0000 +++ b/main.cpp Fri May 30 08:42:57 2014 +0000 @@ -169,6 +169,7 @@ regFM2Out(i, 0x00); } + // key off for(i = 0x00; i < 0x08; i++) { regFMOut(0x08, i & 0x07); @@ -183,7 +184,7 @@ wait_ms(20); /* ICLのみをLOW(アクティブ)にする */ ioShiftOut(ACTLOW & ~(ICL)); - wait_ms(50); + wait_ms(100); /* 元に戻す */ ioShiftOut(ACTLOW); @@ -537,7 +538,6 @@ int us_tick = np->base_clk / 1000000; printf("start play\n"); - printf("us_tick=%d\n", us_tick); Timer t; t.start(); @@ -749,6 +749,9 @@ led1 = 0; led2 = 0; + // needs wait 20ms or so for power on sequence.(to be enough voltage level) + wait_ms(20); + lcd_init(); boardInit(); @@ -766,7 +769,7 @@ char buf[16]; Timer t; int result_us = 0; - + t.reset(); t.start(); ioShiftOut(( 0x68 << 8) | (ACTLOW)); @@ -779,13 +782,11 @@ result_us = t.read_us(); t.stop(); - // ioShiftOutTest(( 0xff << 8) | (ACTLOW)); - // ioShiftOutTest(( 0xaa << 8) | (ACTLOW)); - // ioShiftOutTest(( 0x22 << 8) | (ACTLOW)); + + printf("result_us=%dus\n", result_us); - - printf("DATE:%s\nTIME:%s", __DATE__, __TIME__); - lcd_printStr2("NBCTRL", "Ver 1.07"); + printf("DATE:%s\nTIME:%s\n", __DATE__, __TIME__); + lcd_printStr2("NBCTRL", "Ver 1.08"); wait(3); sprintf(buf, "%8s", __DATE__); lcd_printStrYscr(1, buf); @@ -794,7 +795,7 @@ lcd_printStrY(1, buf); wait(3); - sprintf(buf, "REG=%d", result_us); + sprintf(buf, "R:%dus", result_us); lcd_printStrY(1, buf); wait(3);