??? 04/14/12 19:33 Read: times |
#187142 - ISD5116 Question |
Greetings all,
I have a simple recorder play back circuit that uses an ISD5116 recorder IC. I have run into a problem that I'm having trouble getting past. I have written an asm code to record and play back (that part works great)the message. The problem I'm having is the read status command, when I send the command to the IC the EOM line does not go back to logic high. I suspect that the problem is simple but, I cannot figure out what the problem is with my code. I have included the play part of the code to this message. I would greatly appreciate any advice you may have on this. ; ==========From current address playback==================== PLAYP: LCALL i2cstart MOV A,#080H; 10000000 (write) from the address LCALL i2cwrite MOV A,#0A9H; Transmission playback address instruction LCALL i2cwrite MOV A,#00H; Transmission playback address high byte LCALL i2cwrite MOV A,#00H; Transmission playback address low byte LCALL i2cwrite NOP NOP SETB SCL NOP NOP LCALL i2cstop PLAY1: CLR LED LCALL i2cstart MOV A,#080H; 10000000 (write) from the address LCALL i2cstart MOV A,#0A8H; Playback start LCALL i2cstart NOP NOP SETB SCL NOP NOP LCALL i2cstop WAIT1: JNB EOM, RSTAT SJMP WAIT1 RSTAT: LCALL i2cstart MOV A, #081H LCALL send LCALL recv LCALL recv LCALL recv LCALL i2cstop LJMP START i2c read and write code recv: mov r7,#08 back2: setb sda setb scl nop nop nop mov c,sda rlc a clr scl nop nop nop djnz r7,back2 setb sda clr scl nop nop nop clr sda setb scl nop nop nop clr scl nop nop nop mov @r0,a inc r0 ret send: mov r7,#08 back: clr scl nop nop nop rlc a mov sda,c setb scl nop nop nop clr scl nop nop nop djnz r7,back setb sda setb scl nop nop nop nop clr scl nop nop nop ret |