FM1 - ; ECE 362 - Practice Example ; Outcome 1 Final...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
; ECE 362 - Practice Example ; Outcome 1 Final Assessment ; ;*********************************************************************** ; ; The objective of this problem is to re-create the famous ; "stupid quote generator" - it prompts for the "quote choice" ; (a-f) and then delivers the selected quote. ; ;*********************************************************************** ; INITRM EQU $0010 ;INITRM - INITIALIZATION OF INTERNAL RAM POSITION REGISTER INITRG EQU $0011 ;INITRG - INITIALIZATION OF INTERNAL REGISTER POSITION REGISTER ; ==== CRG - Clock and Reset Generator SYNR EQU $0034 ;CRG synthesizer register REFDV EQU $0035 ;CRG reference divider register CTFLG EQU $0036 ;TEST ONLY CRGFLG EQU $0037 ;CRG flags register CRGINT EQU $0038 CLKSEL EQU $0039 ;CRG clock select register PLLCTL EQU $003A ;CRG PLL control register RTICTL EQU $003B COPCTL EQU $003C FORBYP EQU $003D CTCTL EQU $003E ARMCOP EQU $003F ;==== SCI Registers SCIBDH EQU $00C8 ;SCI0BDH - SCI BAUD RATE CONTROL REGISTER SCIBDL EQU $00C9 ;SCI0BDL - SCI BAUD RATE CONTROL REGISTER SCICR1 EQU $00CA ;SCI0CR1 - SCI CONTROL REGISTER SCICR2 EQU $00CB ;SCI0CR2 - SCI CONTROL REGISTER SCISR1 EQU $00CC ;SCI0SR1 - SCI STATUS REGISTER SCISR2 EQU $00CD ;SCI0SR2 - SCI STATUS REGISTER SCIDRH EQU $00CE ;SCI0DRH - SCI DATA REGISTER SCIDRL EQU $00CF ;SCI0DRL - SCI DATA REGISTER PORTB EQU $0001 ;PORTB - DATA REGISTER DDRB EQU $0003 ;PORTB - DATA DIRECTION REGISTER ; ================================================================= RAMBASE equ $3800 ; 2KB SRAM located at 3800-3FFF ; ================================================================= org $8000 ; start of program memory ; ; Boot-up entry point ; startup_code sei ; Disable interrupts
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
movb #$39,INITRM ; map RAM ($3800 - $3FFF) lds #$3FCE ; initialize stack pointer cli ; enable IRQ interrupts bclr CLKSEL,$80 ; disengage PLL to system bset PLLCTL,$40 ; turn on PLL movb #$2,SYNR ; set PLL multiplier movb #$0,REFDV ; set PLL divider nop nop ploop brclr CRGFLG,$08,ploop ; while (!(crg.crgflg.bit.lock==1))
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

FM1 - ; ECE 362 - Practice Example ; Outcome 1 Final...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online