I recorded a 5 sec 8-bit mono 22050Hz sound... then I stored it in the 24C512..
then I put this on the 16F877:
Code:
LOOP:
I2CREAD DPIN,CPIN,$A0,B0,[ATUAL, PROX] ' Read 2 locations in a row
B0 = 2
REPEAT
while F_nova = 0 : wend
f_nova = 0
I2CREAD DPIN,CPIN,$A0,B0,[PROX]
b0 = b0 + 1
'UNTIL B0 = 4997
goto loop
disable
PPL: PIR1.0 = 0
TMR1H = LOAD.HIGHBYTE
TMR1L = LOAD.LOWBYTE
BUFFER.6 = ATUAL.7
PORTD.1 = BUFFER.6
PORTD.0 = BUFFER.7
BUFFER = BUFFER << 1
ATUAL = ATUAL << 1
f_ctrl = F_Ctrl + 1
if F_ctrl = 8 then
F_NOVA = 1
f_ctrl = 0
atual = prox
endif
RETURN
ENABLE
Well, what I get is a slow and noise sound of what I had recorded. It is recognizable but isn't that good..
I've tried increasing TMR1 interrupt but it did not make a difference...
So, next steps:
I'll try to user asm interrupts (instant interrupt..DT)
try not to use I2CREAD..(editing: So, i've got to use MSSP..... Well, I suspect that there is no @ HI2CREAD yet, right?
)
Well, that is all..
danke schön..
Bookmarks