Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
private
/
Projet
/
Example
/
HC12
/
D128
:
klcd_Ser.asm
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
; klcd_Ser.ASM ; Example program using the KEYPAD and LCD_PORT ; serial interface on the Axiom ; CMD912X & Cml12S ; ; Memory Map Equates ;STACK: EQU RAMSTRT+RAMSIZE-2 ; top of stack PRGSTRT: EQU $1000 ; start of the program code #include dp256reg.asm ; include register equates ; RAM ;********************** ; Program starts here * ;********************** ORG PRGSTRT jmp START ; jump over var's CNT1 RMB 1 ; temporary count variable TMP1 RMB 1 ; temporary storage variable OLDKEY RMB 1 ; save key value for debounce START: ; lds #STACK ; initialize stack pointer (don't do this if under monitor) ; Initialize KEYPAD jsr INITKEY ; ; Initialize LCD jsr LCD_TST ; Initialize LCD MainLoop: jsr GETKEY ; get a key from keypad, returned in A jsr LCD_OUT ; display key value bra MainLoop ;ENDPROG: ; ;************** ; TEXT TABLES * ;************** PMT: FCC 'Press Key: ' FCB 0 ;******************* ; INCLUDE FILES ;******************* #include lcd_ser.asm ; include serial Lcd functions #include keyS12A.asm ; include KEYPAD functions END