(MCU M68HC08) MC68HC908JB8 >> Assembly

Button


參考資訊:
1. asmlnk
2. hcs08rmv1
3. funwith08
4. mc68hc908jb8
5. blink-with-sdas

PTE


DDRE


配置提昇電阻


main.asm

    PTA  .equ 0x00
    DDRA .equ 0x04
    PTE  .equ 0x08
    DDRE .equ 0x09
    POCR .equ 0x1d

    .module main
    .optsdcc -mhc08

    .area codeivt (abs)
    .org 0xfffe
    .dw main

    .area cseg (abs, code)
    .org 0xdc00
main:
    lda #0x10
    sta POCR

    lda #0x02
    sta DDRA

    lda #0x00
    sta DDRE
loop:
    lda PTE
    lsra
    lsra
    lsra
    sta PTA
    jmp loop

完成


返回上一頁