$include "qtqy_registers.inc"
RamStart EQU $0080
RomStart EQU $F800
VectorStart EQU $FFDE
org RamStart
; define variables in RAM - none needed here
org RomStart
start: ; execution starts here
mov #%00110001,CONFIG1 ; disable low-voltage interrupt,
; watchdog timer and STOP instruction
mov #%00000000,CONFIG2 ; select internal oscillator,
; disable _IRQ and _RST pins
; configure ports
; port A inputs by default
mov #%01111111,DDRB ; set bits 0-6 of port B to outputs
mov #%01010101,PORTB ; light alternate LEDs
infLoop:
bra infLoop ; infinite loop, does nothing
org VectorStart ; reset and interrupt vectors
dw Start ; keyboard interrupt
dw Start
org $FFF2
dw Start ; timer overflow interrupt
dw Start ; timer channel 1
dw Start ; timer channel 0
org $FFFA
dw Start ; interrupt request (_IRQ pin)
dw Start ; software interrupt (SWI instruction)
dw Start ; reset (power-on or _RST pin)
sorry i completly scrwed up and chose the wrong chip...doh ! got it wokring now but whilst im here ill show you my next problem see if you can tell me wot be wrong ! The program is supposed to display a different led for each button pressed and the led will stay on until another button is pressed, i cant see any problem with it but then again im a bit of a noob. Any ideas? cant get any leds to light up at all.
cheers Fraser
Message Edited by Fraz on 03-24-200604:55 PM
Message Edited by Fraz on 03-24-200604:55 PM
Message Edited by Fraz on 03-24-200604:58 PM
Message Edited by rocco on 03-24-200605:01 PM