Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Microchip Mplab Plugin GDD

Status
Not open for further replies.

bhoobalan

Member level 1
Joined
Dec 28, 2013
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Activity points
280
Hello Friends,
I am using pic32 usb starter kit + Epson PICtail board S1D13517 + Graphics display Truly 7" 800x480 board. I am using Microchip GDD plugin. I have done some basic display design and i got the correct output in the display.
Now my problem is, i want to run a Engine , it is like .bmp format image. And also i want to use two Buttons, START & STOP buttons. When i pressed start button the engine will get start, when i pressed stop button the engine will get stopped. This is my task, and i don't know how to do this in GDD. Pls help me friends.....................

Below i attached the sample screen what i want to get.........

Thanks in advance......
 

Attachments

  • Start Stop Engine.png
    Start Stop Engine.png
    223.1 KB · Views: 65

I am not familiar with writing code for callback function.
ya, you are right !!!
I want to move the picture form right to left.
When i pressed start button the picture will get start to move from right to left,
when i pressed stop button the movement of the picture should stop.
 

Okay, GOLDraw() must be called continuously(may be via. timer) which initiates any pending drawing processes, if any. If there is any change in graphics GOLMsgCallback() function is called by GDD library. This function must be implemented by the user.

Code:
WORD GOLMsgCallback(WORD objMsg, OBJ_HEADER * pObj, GOL_MSG * pMsg)
{
    WORD objectID;
    objectID = GetObjID(pObj);
    if (objectID == ID_BTN_START)
    {
        if (objMsg == BTN_MSG_PRESSED)
        {
            //Start a timer here, say 100ms
        }
    }
    else  if (objectID == ID_BTN_STOP)
    {
        if (objMsg == BTN_MSG_PRESSED)
        {
            // Disable the timer
        }
    }
}

TimerISR()
{
    OBJ_HEADER *myImage = GOLFindObject(imageID);
    myImage->left -= 2;
    myImage->right -= 2;
    SetState(myImage, IMAGE_DRAW);  //Not sure about IMAGE_DRAW macro. However, I've used BTN_DRAW for button.
}
 

Thanks for your Help
I got the output
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top