Reading an open drain output with the SX-28
My sound board project is going well. I can record and playback sounds. The chip has an INT line that is an open drain. When the End Of Message(EOM) is hit, the line is supposed to go low, but I can't detect it. (ISD4004 Chip)
The line has a 4.7K pull up resistor to 3V. The line is supposed to go low when an interrupt occurs. As a test, I used a Do..Until loop to wait for the signal, which never came. I changed it to an IF with a GOTO and it never got past the line.
INTSTATUS···· PIN· RA.0
.
.
.
Input INTSTATUS
.
.
.
WaitForSound:
· IF INTSTATUS = 1 THEN GOTO WaitForSound
Am I reading this wrong? I don't think I have ever had to check and open drain....so, maybe I'm not understanding how it works.
I put the Oscilliscope on it too, it holds steady at 3V and never drops.
Thanks again,
Dan
·
The line has a 4.7K pull up resistor to 3V. The line is supposed to go low when an interrupt occurs. As a test, I used a Do..Until loop to wait for the signal, which never came. I changed it to an IF with a GOTO and it never got past the line.
INTSTATUS···· PIN· RA.0
.
.
.
Input INTSTATUS
.
.
.
WaitForSound:
· IF INTSTATUS = 1 THEN GOTO WaitForSound
Am I reading this wrong? I don't think I have ever had to check and open drain....so, maybe I'm not understanding how it works.
I put the Oscilliscope on it too, it holds steady at 3V and never drops.
Thanks again,
Dan
·
Comments
First, have you tried putting a switch to ground on that open drain line and seeing if your code will see that? Second, is the sound board interrupt a pulse that goes to ground briefly and then returns, or does it stay low until reset by setting a register? If it's a pulse, it's more than likely that the duration is to short.
Thanks,
PeterM
PJ- I did put a wire in the breadboard to ground and the app detected that without a problem.
JonnyMac- I hooked up the USB Oscilliscope and set it to detect a falling edge. It never triggered, would this be a valid test or will the interrupt occur faster then the scope can see it? I set it to trigger .5 V less than the 3V the line has on it.· HIGH = 3V, trigger set at 2.5V on the falling edge.
I can write a routine to check with an interrupt if you think that will work.
I appreciate your help, I've already spent about 6 hrs on trying to solve this issue.
Thanks again,
Dan
·
The spec sheet had a 4.7K pull up resistor to the INT line. I started to think maybe that was too low, I upped it to two 15K resistors(for 30K total) and everything started working.
Was there some way I could have detected this as the problem? Hate to solve stuff like this by guessing, next time I might not be so lucky.
Thanks again for all of your help,
Dan