It is possible to build with QT2, copy for study purpose.

original by 2005 by Eckhard Gosch ‧  eckhard@eckhard-gosch.de
http://www.eckhard-gosch.de/eng/controller/lcdterm.htm





With a Nitron 68HC908QY4 and a Hitachi LM052L LC Display I built a little terminal.
The terminal is equipped with a RS232 connector and a debug port, that works with the Motorola User Monitor. I didn´t solderd a level shifter on the board, because I use my little pod, on the controller page or use it directly on a controller. Because the terminal only has to receive characters, I wrote a littele interrupt driven RS232 receive routine. I utilize the KBD interrupt on PTA0 and call the GetbByte ROM routine to receive the character.
The ISR looks like this.

用Nitrom 68HC908QY4 和日立LM052L 字符 LCD 設計一個小的終端。
終端裝備有 RS232 連接器和調試口, 配合 Motorola 的監控程序使用。沒有RS232轉換電路, 直接連接控制器。由於終端只須接收和顯示字符, 我寫了一段中斷服務程序 (ISR), 接收 RS232 的資料。運用 PTA0 的KBD 中斷, 然後呼叫 ROM 裡面的 GetbByte 副程序接受字符。ISR 看起來如下:


KbdIsr:

pshh                   ;save H-reg
sei                    ;Disable Interrupts
mov  #%00000010,KBIER  ;disable KB-Int
bclr PTA0,PTA          ;initialize PTA0 for serial comms
jsr GetByte            ;call GetByte at adress $2D6b
sta data               ;store the received character in RAM
mov #%00000100,KBSCR   ;Clear Pending KBD interrupts
mov #%00000001,KBIER   ;enable Keyboard interrupts
cli                    ;enable ints
pulh                   ;get H-reg back
rti

You can find schematics here. lcdschem.gif The software is here lcdterme.asm. It would fit into the 1.5 kB Flash of the 68HC908QY1 or 68HC908QY2 too, but I had the 4 kB Version lying around so I used them.

線路圖 -  lcdschem.gif
軟體 lcdterme.asm, 它適合寫入68HC908QY1 或68HC908QY2 的1.5 kB FLASH ROM, 但我隨手用有4 kB 的QT4。

文章標籤
全站熱搜
創作者介紹
創作者 xiaolabaDIY 的頭像
xiaolabaDIY

xiaolabaDIY 的部落格

xiaolabaDIY 發表在 痞客邦 留言(0) 人氣(4)