FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - rascalito

Pages: [1]
1
Discussion - Software / Compressing to ASTC on Linux.
« on: July 14, 2022, 07:20:48 AM »
Hello!

I'm using Ubuntu 22.04.
I'm using a lot of bitmaps, and the easiest way to use bitmaps seems to be to compress
them to ASTC, and store them directly in flash.
As the process of adding a new bitmap is quite time consuming, I have made a php script
that takes one raw image and its associated json. It then creates a pair of .h / .c files
and adds a record in a bitmaplist.h / .cp. files.
Now the next step I would like is a way to directly compress my images on Linux.
It also creats in each .h / .cpp file a structure which contains the file name, data pointer, position
in flash, etc... and also spits out the percentage of flash that has been used. And beside this,
drawing a single image is done with a single command with 2 parameters, one being a rectangle,
and the other is this structure.
Example:
Rect R(x, y, w, h);
BitmapInfo * bmi = BitmapList->FindBMI("MyLogo");
if(bmi) SysLCD->DrawBitmap(R, bmi);
Is there a command-line tool that I can run from the terminal (and therefore from a php script)?

Next question:
How do I choose an encoding method?
I choosed ASTC8x8 at random and it works, but is there logical way to choose an encoding scheme?

Last one:
I have chosen ASTC8x8. When the bitmap dimensions are mutliple of 8, it's just fine. When not,
the size is rounded up to the next multiple of 8. In this case, what will the added image border
look like?

Thanks!

R

2
Discussion - Software / Overlapping widgets
« on: July 23, 2020, 09:40:05 AM »
Hello!
I'm using a FT813 7-inch display. I would like to make a keyboard object with entry field.
Ideally, this would be an opaque object that would come on top of all the other objects
when I tap a value to be edited.
Is there a problem overlapping objects? I mean, writing many widgets, and then displaying
a bigger object that hides other widgets previously drawn in the same session (between command start
and display swap).

Beside this, other than hiding other widgets, I would like to first draw a very large button which covers
a bit more than the area of the keyboard itself. This would solve the problem of spaces between the
buttons.

Thanks for any hint!
R

3
Discussion - Software / Using touch panel
« on: May 15, 2020, 07:50:45 AM »
Hello!

I would like to get touch panel events. Ideally, I would like to receive an interrupt
when the screen has been touched. I could live with polling for test, but anyway for
the moment, I can't get touch coordinates. So one problem at a time, let's start with
polling.

What I did:
I have set up the address of the touch panel chip which is a Goodix. The documentation
says that the address should be 5D.
So the first thing I did is to fill in the REG_TOUCH_CONFIG register for capacitive setup
Bit 15: 0 for capacitive.
14,13: reserved
12: ignore short circuit. I suppose it's for resistive.
Bit11: enable low power mode. Not crucial for test, I will leave it as 0.
10~4 is the I2C address, 5D
Bit 3: vendor. I tried both. Is Goodix a FocalTech or AzoTech device?
Bit2: suppress 300 ms startup. Leave as 0.
Bits 1 and 0, same.

Summary:
Bits 15 to 12 = 0
Bit 11 = 0
Bits 10~4 = 5D
Bit 3 only may have an influence.
Therefore the possible codes are 0x05D8 or 0x05D0

As for the touch mode, there are only 2 bits, apparently. I tried 10 (frame mode) and 11
(continuous mode), but without success so fare.

After setting these 2 registers, I access the coordinate registers, but they are always
at 0, touch or not.

Am I missing something?


Best regards,

R

4
Discussion - Software / Using coprocessor (FT813)
« on: May 04, 2020, 02:27:00 AM »
Hello!

Absolute beginner here. I could initialize the display and draw some basic shapes using the DL
RAM (set COP_SLIDER to 0).
Now I would like to draw a slider (set COP_SLIDER to 1). I read the documentation related to slider,
and found a description of the command layout. That's what I tried to do below.
NB: I'm aware it's shitty code, everything is hardcoded and it shouldn't but it's a test. I will clean
everything once I know how to do.
So my question: what is wrong in this code? I just unwrapped sample code's Send_Cmd which is
basically a wr32 command with some offset management. And the Cmd_slider is a sequence of
Send_cmd, so unrolling everything should look as below...

Thanks for any hint.

Code: [Select]
#define COP_SLIDER 1

void FT813::Test(void) {
#if COP_SLIDER
// Offsets come from BridgeTek's programmers guide, version 1.2, page 204.
wr32(RAM_CMD, CMD_SLIDER); // Command offset is 0
wr16(RAM_CMD + 4, 32); // X
wr16(RAM_CMD + 6, 32); // Y
wr16(RAM_CMD + 8, 320); // W
wr16(RAM_CMD + 10, 32); // H
wr16(RAM_CMD + 12, 0); // Options (default is 0)
wr16(RAM_CMD + 14, 100); // Val
wr16(RAM_CMD + 16, 40); // Size (width of the knob??)
wr16(RAM_CMD + 18, 300); // Range
wr32(RAM_CMD + 20, CMD_SWAP);
#else
wr32(RAM_DL, CLEAR_COLOR_RGB(0x30, 0x60, 0x90)); // Blue
wr32(RAM_DL+4, CLEAR(1,0,0));
wr32(RAM_DL+8, COLOR_RGB(255, 255, 255));
wr32(RAM_DL+12, BEGIN(RECTS));
wr32(RAM_DL+16, VERTEX2F(300, 300));
wr32(RAM_DL+20, VERTEX2F(3000, 600));
wr32(RAM_DL+24, END());
wr32(RAM_DL+28, DISPLAY());
wr8(REG_DLSWAP, DLSWAP_FRAME); // Display list swap
#endif
}

Pages: [1]