Using VTFT and MikroC for Dspic

General discussion on Visual TFT Software.
Post Reply
Author
Message
domi1804
Posts: 11
Joined: 20 Dec 2012 10:39

Using VTFT and MikroC for Dspic

#1 Post by domi1804 » 24 Mar 2024 19:50

Hello!

I use Visual TFT and MikroC.

How can I make to light on a single led on the port G which is on the easypic fusion v7 when I press a button on a TFT touch panel? Thank for your help!

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: Using VTFT and MikroC for Dspic

#2 Post by IvanJeremic » 07 Apr 2024 07:56

Hi,

Try using the button library in the MikroC compiler, you can find example codes in the Project explorer section in the compiler.

I would recommend trying out Necto Studio, it supports dsPIC as well as other architectures like ARM, PIC32, PIC18 and AVR.

It is also free as long as you are not using it for commercial purposes.
https://www.mikroe.com/necto

Regards,

Ivan.

domi1804
Posts: 11
Joined: 20 Dec 2012 10:39

Re: Using VTFT and MikroC for Dspic

#3 Post by domi1804 » 21 Apr 2024 16:00

Hello Filip,

I don't tell you to use the button library within MikroC because I don't want to use the Easypic Fusion's buttons. Not at all.

here is what I want to do:

I have programmed a button window which appears on my TFT. I want to activate a single led whan I press a button which appears on my TFT. Do you understand what I mean?

Thank you for your help!

All my best regards, Domi1804

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: Using VTFT and MikroC for Dspic

#4 Post by IvanJeremic » 22 Apr 2024 09:56

Hi,

You can use the Events tab in VisualTFT.

Select a button, and then go to Events.
button.png
button.png (10.26 KiB) Viewed 184 times
Now add a function that you write that turn on a LED or a PORT next to the action that you want.

Regards,

Ivan.

domi1804
Posts: 11
Joined: 20 Dec 2012 10:39

Re: Using VTFT and MikroC for Dspic

#5 Post by domi1804 » 22 Apr 2024 14:39

Hello Ivan,

I followed what you wrote in the precedent post:

Here is the TFT_PROJECT_main.c

#include "TFT_FOURTH_PROJECT_objects.h"

void main()

{

TRISC = 0: // I don't miss to declare portc pins as outputs

START_TP();

while(1){

}

}

And then here is the TFT_FOURTH_project_events_code.c

#include " tft_fourth_project_objects.h"

#include "TFT_FOURTH_PROJECT_resources.h"

void Button1OnPress()

{

// I decide to activate four leds on the outputs of portC

PORTC = 0x0F;

// But at this time, curiously no led is light on when I press the button window on the TFT display

// Let's note that I use the EASYPIC FUSION V7 with its DSPIC33FJ256GP710A and its owned TFT

}

Thank you for your help!

Kind regards,

Domi1804

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: Using VTFT and MikroC for Dspic

#6 Post by IvanJeremic » 23 Apr 2024 09:06

Hi,

Can you send me your entire project so I can take a look at what went wrong?

Regards,

Ivan.

domi1804
Posts: 11
Joined: 20 Dec 2012 10:39

Re: Using VTFT and MikroC for Dspic

#7 Post by domi1804 » 23 Apr 2024 12:52

Good afternoon Ivan,

Wouldn't you mind to transmit me your email adress because I don't succeed to send you my entire project by sending you every files through the forum. Thank you for your understanding. Kind regards, Domi1804

domi1804
Posts: 11
Joined: 20 Dec 2012 10:39

Re: Using VTFT and MikroC for Dspic

#8 Post by domi1804 » 23 Apr 2024 13:28

Good afternoon Ivan,

Wouldn't you mind to transmit me your email adress because I don't succeed to send you my entire project by sending you every files through the forum. Thank you for your understanding. Kind regards, Domi1804

Post Reply

Return to “Visual TFT General”