Announcement

Collapse
No announcement yet.

uLCD-43 problem playing wav file and touching.

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

  • Atilla
    replied


    Thanks for reporting the problem. This is now fixed, there'll be a new PmmC available in the next few days.

    Leave a comment:


  • VoiceOfRageAndRuin
    started a topic uLCD-43 problem playing wav file and touching.

    uLCD-43 problem playing wav file and touching.

    If I run this code on my uLCD-43 :

    HTML Code:
    #platform "uLCD-43PT_GFX2"
    
    func main()
    
    //Initialize the uSD card.
    while(!file_Mount())
    
    gfx_Cls();
    print("SD card not found");
    pause(100);
    
    wend
    
    
    //First set the screen to landscape mode.
    gfx_Set(SCREEN_MODE, LANDSCAPE);
    
    //Enable and initialize the touch screen.
    touch_Set(0);
    
    repeat
    
    file_PlayWAV("beep-4.WAV");
    
    pause(2000);
    
    forever
    
    endfunc
    The file plays fine, until I touch the screen whereupon it plays but with a static like distortion for as long as I'm touching. I lift my finger and it plays fine again. This doesn't happen on the 32-pt. Anyone else have the same problem?

    EDIT:

    Well, the problem seems to be with this particular wav file. Although I can't see how it would play fine ordinarily and then screw up while touching.

    EDIT again:

    Tried several files with different configurations and they all have the same problem. I've also tried adjusting the volume and buffer size and reverting to previous pmmcs all to no avail.

    EDIT the third:

    I think I have an idea what's happening. The touch controller asserts an int line when it receives a touch that it is programmed to respond to. Upon seeing the int, the picasso retrieves the data. I assume the controller is set up by the picasso to interrupt on pen down, pen up, and to continually interrupt while pen is held down. It is the continuous interrupts, or rather the picassos response to them that is slowing down the system and resulting in glitchy WAV playing. I see two possible solutions. 1. Add, or add the ability to add in code, a minimum delay time between successive polls of the touch controller interrupt line by the picasso. This would be a change in the pmmc I'm sure. 2. reconfigure the touch controller to not respond to the pen held down condition. This could be done in 4dgl code with the I2C functions. This would result in a loss of the ability to 'draw' on the screen but for my particular application this does not matter. I have made an attempt to reconfigure the controller in my code but all I've done so far is get the system to lock up. I'll post later if I have any success.
Working...
X