Page 1 of 1

Using VTFT and MikroC for Dspic

Posted: 24 Mar 2024 19:50
by domi1804
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!

Re: Using VTFT and MikroC for Dspic

Posted: 07 Apr 2024 07:56
by IvanJeremic
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.

Re: Using VTFT and MikroC for Dspic

Posted: 21 Apr 2024 16:00
by domi1804
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

Re: Using VTFT and MikroC for Dspic

Posted: 22 Apr 2024 09:56
by IvanJeremic
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 955 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.

Re: Using VTFT and MikroC for Dspic

Posted: 22 Apr 2024 14:39
by domi1804
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

Re: Using VTFT and MikroC for Dspic

Posted: 23 Apr 2024 09:06
by IvanJeremic
Hi,

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

Regards,

Ivan.

Re: Using VTFT and MikroC for Dspic

Posted: 23 Apr 2024 12:52
by domi1804
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

Re: Using VTFT and MikroC for Dspic

Posted: 23 Apr 2024 13:28
by domi1804
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