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
ByVac LCD 2.4" Colour with Touch Screen
-
- Posts: 27
- Joined: Sat Aug 01, 2009 3:15 pm
- Has thanked: 2 times
- Been thanked: 10 times
- Contact:
- JohnCrow
- 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
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
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
1 in 10 people understand binary, the other one doesn't !
-
- 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
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
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 (1.46 KiB) Viewed 7505 times
- JohnCrow
- 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
Know what you mean, the default font is quite small.
1 in 10 people understand binary, the other one doesn't !
- JohnCrow
- 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
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.
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.
1 in 10 people understand binary, the other one doesn't !