ByVac LCD 2.4" Colour with Touch Screen

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
Harry Tuttle
Posts: 27
Joined: Sat Aug 01, 2009 3:15 pm
Has thanked: 2 times
Been thanked: 10 times
Contact:

ByVac LCD 2.4" Colour with Touch Screen

Post by Harry Tuttle »

For those in peril with I2C.

This might be of use to anyone just starting with a ByVac LCD Touch Screen.
I am running it on an ECIO but you could change this to any chip with I2C master or use bit banging.
The example below covers text, back ground and foreground colours, drawing rectangles circles lines and single pixels, back light, screen orientation, printing image from flash memory to screen, showing flash memory contents on screen and beep.

More info @
http://www.byvac.com/bv3/index.php?rout ... duct_id=63
ECIOtouchLCD.fcf
(43.16 KiB) Downloaded 477 times

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: ByVac LCD 2.4" Colour with Touch Screen

Post by JohnCrow »

Thanks Harry, thats great.
Youve saved me the job of writing a test program for my display.
I got this one and the graphical one from one of your previous posts.
Saw Byvac at the the national hamfest at newark couple of weeks ago, he has some nice products, and Jim was very helpful and had time to chat for a while.

This is how Ive set mine up. The jumper allows me to disconnect the I2C line and enable serial
Display - I2C.jpg
Display - I2C.jpg (91.06 KiB) Viewed 7456 times
1 in 10 people understand binary, the other one doesn't !

Harry Tuttle
Posts: 27
Joined: Sat Aug 01, 2009 3:15 pm
Has thanked: 2 times
Been thanked: 10 times
Contact:

Re: ByVac LCD 2.4" Colour with Touch Screen

Post by Harry Tuttle »

Hi John.
You have go a tidy set up there I was going to put in a picture of my rather agricultural version!. Jim's boards are well made, I have the RTC as well and will try and post a working settable alarm clock when I have cleaned up the code a bit.

I failed to get the bit map command to work and have found the fonts too small for my poor eyesight. To use large size numbers I used the Bvtool to write a bitmap images of the respective numbers to memory blocks 1 to 9 and block 10 as 0. They are then recalled and placed as necessary to the screen.

Watch out for the co-ordinates with two bytes being required to cover the 340 pixel height but two bytes also expected for the width.

Regards,
ben

Example one block sized number which will have to be save as a .bmp
Attachments
Seven-Segment-0.jpg
Seven-Segment-0.jpg (1.46 KiB) Viewed 7451 times

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: ByVac LCD 2.4" Colour with Touch Screen

Post by JohnCrow »

Know what you mean, the default font is quite small. :)
1 in 10 people understand binary, the other one doesn't !

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: ByVac LCD 2.4" Colour with Touch Screen

Post by JohnCrow »

This small program is a simple touch detector.
The code is not very elegant, as it was only developed to test the touch option on the display.

Touch anywhere on the screen and it will pull the INT pin high. (This is fed to RC1 on the PIC).
This is used to change the message on the screen and turn PORT B on to light the LEDS.

The display will hold this state until the INT pin is reset to low. This is done by the "LAST TOUCH" command.
Although in this program the returned co-ordinates are not read.

Notes.

1) This uses the serial connctor rather than the I2C option, as used in Harry's earlier post.

2) It will still work with a thin plastic protector over the screen.


Simple Touch Detect Working V2a - LEDs.fcf
(9.5 KiB) Downloaded 445 times
1 in 10 people understand binary, the other one doesn't !

Post Reply