ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Histograma Con Microcontrolador


Enviado por   •  8 de Febrero de 2012  •  1.165 Palabras (5 Páginas)  •  719 Visitas

Página 1 de 5

;*****************************************************************

;* This stationery serves as the framework for a *

;* user application (single file, absolute assembly application) *

;* For a more comprehensive program that *

;* demonstrates the more advanced functionality of this *

;* processor, please see the demonstration applications *

;* located in the examples subdirectory of the *

;* Freescale CodeWarrior for the HC12 Program directory *

;*****************************************************************

; export symbols

XDEF Entry, _Startup ; export 'Entry' symbol

ABSENTRY Entry ; for absolute assembly: mark this as application entry point

; Include derivative-specific definitions

INCLUDE 'derivative.inc'

ROMStart EQU $4000 ; absolute address to place my code/constant data

ORG $3900

TABLA:

FCB $9,$9,$31,$13,$21,$27,$33,$8,$41,$45,$18,$27,$39,$47,$49,$7,$2,$15,$45,$10

ORG RAMStart

; code section

ORG ROMStart

Entry:

_Startup:

LDS #RAMEnd+1 ; initialize the stack pointer

CLI ; enable interrupts

mainLoop:

LDX #TABLA

LDAA #$10

STAA $3918

LDAA #$20

STAA $3919

LDAA #$30

STAA $391A

LDAA #$40

STAA $391B

CLR $3920

CLR $3921

CLR $3922

CLR $3923

CLR $3924

CLRA

CLRB

INICIO:

LDAA 0,X

CMPA $3918

BPL RA2

INC $3920

INX

BRA INICIO

RA2:

CMPA $3919

BPL RA3

INC $3921

INX

BRA INICIO

RA3:

CMPA $391A

BPL RA4

INC $3922

INX

BRA INICIO

RA4:

CMPA $391B

BPL RA5

INC $3923

INX

BRA INICIO

...

Descargar como (para miembros actualizados) txt (3 Kb)
Leer 4 páginas más »
Disponible sólo en Clubensayos.com