Post Go back to editing

ADAU145x generating a reset signal for max hold when reading for example IPAT registers

Category: Software
Product Number: ADAU1452
Software Version: Sigma Studio 4.7

Hello all,

Does anyone know if it is possible to generate a reset signal for a "max and hold" block when reading from, for example, an IPAT register?

I have five digital signals on MP inputs, which can contain a few pulses at random times. I read the DSP IPAT registers every 50msecs, so it is possible to miss some events if they occur between readings. Therefore, I am planning to use a max-and-hold block, which would set its output during the first event seen. But then I have to write to the DSP to reset the output manually and I would rather see that it would reset the max-and-hold automatically after I read a specific register of the DSP. Is that possible? Or is it better to implement a timer, that is activated when the max-and-hold output is set and will reset the max-and-hold block after, say, 100msecs? In that case I should have read the status of the max-and-hold.

With kind regards,

Reini

Parents
  • For the time being I used a max-and-hold in combination with a timer (set to 100msec => 9600 samples). This works fine.

    This is how it looks like:

    On the left erratic pulses are fed to MP6 (GPIO6), active high, so when idle, MP6 is low. Timer1 is reset and outputs a 'low' which is inverted and fed to Max1 reset input. Max1 will output a 'one' as soon as an rising edge is detected on MP6. When that occurs, the timer1 will start and after 9600 samples, Timer1 will output a 'one' which, inverted, will reset Max1.

  • Hello Reini,

    This is a great question and I like these simple challenges. Your solution is a great one and very similar to what I came up with. As you know there are SO MANY ways to solve a problem using SigmaStudio. I am not sure which solution uses fewer instructions. It would be good to study. 

    What I have is a pulse stretcher. I have it set to one second so I can see it. I have used this to stretch a pulse going to an LED so you can see a quick single sample event. 

    I used a one-shot with a reset pin. 

    Dave T

Reply
  • Hello Reini,

    This is a great question and I like these simple challenges. Your solution is a great one and very similar to what I came up with. As you know there are SO MANY ways to solve a problem using SigmaStudio. I am not sure which solution uses fewer instructions. It would be good to study. 

    What I have is a pulse stretcher. I have it set to one second so I can see it. I have used this to stretch a pulse going to an LED so you can see a quick single sample event. 

    I used a one-shot with a reset pin. 

    Dave T

Children
  • Hello Dave, nice to hear from you again! :-)

    Thank you for your reply.

    I have tested your solution as well and it will do the job just as well. I hoped that it would save me some DSP instruction cycles, because the ZeroComp (digital signal inverter) would not be needed. Unfortunately, the one shot timer needs 13 instruction cycles per sample and the max-and-hold + inverter need (8+5) = 13 instruction cycles, so exactly the same.

    Therefore I think both solutions will work fine :-)

    Thanks again for helping!

    With kind regards,

    Reini