' ' *********************************************** ' * * ' * ATXmega テストボード プログラム * ' * * ' * AVR is using ATXmega128A1-AU * ' * Basic Compiler is BASCOM-AVR * ' * Copyright By O-Family 2009. 7.10 * ' *********************************************** ' ' Xm_Test01 : LCDの表示テスト。 ' $regfile = "xm128A1def.dat" '使用するAVRを設定。 $crystal = 2000000 'AVRクロックを設定。 ' $hwstack = 64 'ハードウェア・スタックの容量を設定。 $swstack = 32 'ソフトウェア・スタックの容量を設定。 $framesize = 32 'フレーム領域の容量を設定。 ' ' 'LCDを接続するポートとピン番号を指定する。 Const _lcd_dir = Portf_dir '[Data Direction Register] of connected port. Const _lcd_db7 = 7 'The pin number which connects [DB7]. Const _lcd_db6 = 6 'The pin number which connects [DB6]. Const _lcd_db5 = 5 'The pin number which connects [DB5]. Const _lcd_db4 = 4 'The pin number which connects [DB4]. Const _lcd_e = 3 'The pin number which connects [E]. Const _lcd_rs = 2 'The pin number which connects [RS]. ' $lib "lcd4_XMega.LBX" 'Xmega専用の4bitモードLCDライブラリを組み込む。 Config Lcd = 16 * 2 'LCD表示を16文字2行に設定。 Cls 'LCD表示をすべて消去。 Cursor Off 'LCDのカーソルをオフ。 ' Lcd "Xmega Test Bord" 'テスト文字を表示する。 Lowerline Lcd " ATXmega128A1-AU" ' End