Announcement

Collapse
No announcement yet.

Play command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Play command

    I have a small question to ask.
    If I send a command (serial-mode), "play" (FFFE), after resetting the module, what happens?
    it is normal that the audio does not start?

    greetings.
    Andy

  • #2


    Yes, if you Switch off or Reset the module, it doesn't start playing any audio file automatically. You will have to resend the Address to play a file.
    -Bilal

    Comment


    • #3


      Thank you.
      I have one last question (I hope).

      Within a FOR ... NEXT loop, I put 4 songs to play on.
      HTML Code:
      scl = 1                    'reset time
      delay_ms(500)
      
      for track = 0 to 3
      dta = track              'dta = variable mask
      gosub SOMO            'routine DATA
      gosub attesa            'check routine
      next track
       
      
       
      
       
      
      To check the end of a song, read the state of the Busy LED through a pin of the controller and I used a routine written in this way:
      
      [HTML]attesa:
      delay_ms (30)
      if busy = 1 then         'if led is high
      attesa
      end if
      delay_ms (30)
      return

      Unfortunately, I only play the first song.
      I see the Busy LED flashes a few times and then nothing more.

      but if I enter this other routines, the sequence works fine. (for 15 second naturally):


      attesa:
      delay_ms (30)
      if busy = 1 then
      delay_ms (15000)
      end if
      delay_ms (30)
      return

      [/HTML]


      Obviously I would like to use the first method because I control the end of the song.
      I made ??a mistake or something?

      The microcontroller is a PIC 16F876A.
      The Busy LED's is connected to ground via a resistor of 470 ohms.

      please give me a hint.
      greetings.

      Andy

      Comment


      • #4


        I can't see any problem in your code for monitoring BUSY line, however there are few things that you could try. Before then, have you successfully played an Audio file that's anything but 0000.Ad4? 0000.AD4 is the simplest one as it needs 0 on the data line and 16 clock pulses on CLK input. As soon as you start sending other numbers, you need to match the clock with the data sequence. If you see the timing diagram, it shows the data is latched at the rising edge of the clock pulse. Also, MSB is the first bit you latch and LSB is the last bit. i.e. if you are sending 0001.AD4, bit15-bit1 would be "0" and bit0 would be "1".

        -Bilal

        Comment


        • #5


          I noticed that the line of "Busy", there are several fluctuations.


          These prevent me from exploiting well.


          Do you think this is a hardware problem or it could be a software problem?

          Unfortunately I need to use the line busy.

          you have other suggestions?

          I also made a video that describes the problem.

          http://youtu.be/kKUo36VP-7M[/video]]

          After the reset of the PIC, the command is sent $ 0000.
          Soon after, the second track should sound, and so on, but unfortunately it all stops.



          regards

          Andy

          Comment


          • #6


            According with the technical service of 4d system, I finally solved the problem.
            the somo14d was always working.
            The problem was caused by a bad power supply line of the 3.3 volts.
            In fact, using an LM317 regulator, were to create an unpleasant ripple.
            These ripple sent in tilt the somo.
            Now I have replaced the LM317 regulator with a fixed at 3.3 volts and finally everything works perfectly.

            thanks for your support.
            Andy

            Comment

            Working...
            X