/* * clock_2 - my 60-LED clock again with GLUE81X / LPC810+=2 * by uratan! 2016.11.13 (release: 2020.6.16) */ /* * 'clock_2' とは? */ NeoPixel 1/4 60 Ring (RGB タイプ)(adafruit) と LPC812 で、丸い LED 時計を 作るためのファームウェアです。 LPC812 を使うため CLKIN と ISP-sel が分離され起動失敗がなくなります。 また 赤外リモコン IrT の使用をやめ 直接つないだスイッチで制御します。 /* * I/O pin usage (LPC810+=2) * pin#I3: PIO0_3 (output) - drive WS2812B (GPIO or SPI) * pin#I5: PIO0_12 input - SW input for control * pin#O8: PIO0_1 (input) - CLKIN from external X'tal */ /* * how to use ? */ PIO0_12 につないだプッシュスイッチ一つを使い、長押し・短押しを使い分けて 操作します。なお時刻は、電源を入れるたびに設定してください。 +---------------------------------------------------+ | | | /***** mode change by LONG_PUSH *****/ | V | +--------+ +--------+ +--------+ +--------+ | | clock |---->| change |---->| change |---->| change |--+ | mode | | origin | | hour | | minute | +--------+ +--------+ +--------+ +--------+ | | | | (change) ( inc ) ( inc ) ( inc ) ( color) (origin) ( hour ) (minute) /******* action by SHORT_PUSH *******/ /* * FILES * ( clock-32.zip より派生) * (sw.c は irt-12.zip の main() より派生) */ 00README.txt --- this file Makefile --- Makefile for make.exe link.awk --- a AWK script to generate linker script Startup.S --- CPU start up main.c --- main entry common.h --- system shared difinitions common.c --- system shared functions (uart) rprintf.c --- simple printf() (from sample of WinARM_20060606.zip) clock.c --- jobs as a clock drive.c --- drive WS2812B, by SPI or GPIO sw.c --- handle SW input uart1.c --- UNUSED (handle uart1 to get Ir signal) 60clock-0NN.hex --- hex file image made Compiler used is gcc-4.7.1(2012-0616) from yagarto You may need sh.exe and rm.exe, seek it from web please. (see also https://sourceforge.net/projects/yagarto/files/) Get LPC810 related definitions from: lpcopen_2_01_lpcxpresso_nxp_lpcxpresso_812.zip (LPCXpresso v6.1.0_164, LPCOpen 2.xx software package for LPCXpresso LPC812 boead) then place lpc_chip_8xx_lib/inc/ to ../chip-inc/. Don't you have GNU awk ? use this. -- uratan@miomio.jp