TI-H: I found something...
[Prev][Next][Index][Thread]
TI-H: I found something...
I'm not sure if this is the working version or not... :)
These are some of the routines I used in the very first beta of my mp3 player.
Btw, Before when i told what bits did what on the shift register, I think I
was wrong... :\ You'll have to checl. I included enough '.equ's to make
the thing work...
SENDADR1: sbi PORTC, SR1
com ADRa
com ADRa
ldi count, 4
a: brcs b ;sendloop
cbi PORTC, SRd
rjmp c
b: sbi PORTC, SRd
fart: lsr ADRa
sbi PORTC, SRc
d: brcs e
cbi PORTC, SRd
rjmp f
e: sbi PORTC, SRd
f: lsr ADRa
cbi PORTC, SRc
dec count
brne a
cbi PORTC, SR1
ret
SENDADR2: sbi PORTC, SR2
com ADRb
com ADRb
ldi count, 4
g: brcs h ;sendloop2
cbi PORTC, SRd
rjmp i
h: sbi PORTC, SRd
i: lsr ADRb
sbi PORTC, SRc
cool2: brcs k
cbi PORTC, SRd
rjmp l
k: sbi PORTC, SRd
l: lsr ADRb
cbi PORTC, SRc
dec count
brne g
cbi PORTC, SR2
ret
;Equates:
.equ Data00 =0 ;PORTA
.equ Data01 =1 ;PORTA
.equ Data02 =2 ;PORTA
.equ Data03 =3 ;PORTA
.equ Data04 =4 ;PORTA
.equ Data05 =5 ;PORTA
.equ Data06 =6 ;PORTA
.equ Data07 =7 ;PORTA
.equ Data08 =0 ;PORTB
.equ Data09 =1 ;PORTB
.equ Data10 =2 ;PORTB
.equ Data11 =3 ;PORTB
.equ Data12 =4 ;PORTB
.equ Data13 =5 ;PORTB
.equ Data14 =6 ;PORTB
.equ Data15 =7 ;PORTB
.equ SRc =0 ;PORTC
.equ SRd =1 ;PORTC
.equ SR1 =2 ;PORTC PORTSRA00 LCDRS ADR00
; PORTSRA01 LCDE ADR01
; PORTSRA02 DA0 ADR02
; PORTSRA03 DA1 ADR03
; PORTSRA04 DA2 ADR04
; PORTSRA05 CS0 ADR05
; PORTSRA06 CS1 ADR06
; PORTSRA07 RESET ADR07
.equ SR2 =3 ;PORTC PORTSRB00 undef ADR08
; PORTSRB01 undef ADR09
; PORTSRB02 DMACK ADR10
; PORTSRB03 undef ADR11
; PORTSRB04 undef ADR12
; PORTSRB05 undef ADR13
; PORTSRB06 undef ADR14
; PORTSRB07 undef ADR15
.equ DIOW =4 ;PORTC
.equ DIOR =5 ;PORTC
Follow-Ups:
References: