turn on an LED with VisualTFT

General discussion on Visual TFT Software.
Post Reply
Author
Message
Scrib
Posts: 52
Joined: 19 Dec 2012 15:24

turn on an LED with VisualTFT

#1 Post by Scrib » 28 Nov 2017 12:57

Hello,
I use a card Mikromédia For PIC18FJ with the PIC18F87J50 controller, a TFT screen MIO283QT2 I program in basic with VisualTFT. some a few days, I try to turn on an LED connected to the PortE.1. I created a button "RBT_Marche" and I have the following procedure:
sub procedure RBT_MarcheOnClick ()
PortE.1 = 1
end sub
the button press is detected, but the LED remains off. Can someone help me?
Best regards

User avatar
dusan.poluga
mikroElektronika team
Posts: 780
Joined: 02 Feb 2017 14:21

Re: turn on an LED with VisualTFT

#2 Post by dusan.poluga » 29 Nov 2017 18:06

Hi,

Can you show us the part of the code where you set the port direction ?

Did you configure your port registers properly ?
To set the pin as the output you would have to configure

Code: Select all

TRISE.1 = 0
also you would have to use the LATE register instead of the PORTE register to set the pin state.

Code: Select all

LATE.1 = 1
Best Regards,
Dusan Poluga.

Scrib
Posts: 52
Joined: 19 Dec 2012 15:24

Re: turn on an LED with VisualTFT

#3 Post by Scrib » 29 Nov 2017 19:26

Hi,
Thanks for your reply.

Post Reply

Return to “Visual TFT General”