BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - durian

Pages: [1] 2
1
Discussion - EVE / Re: Font baseline metrics
« on: June 09, 2023, 10:40:22 PM »
I have revised the way I handle the snapshot timing. I'll mention it here in case anyone else needs to do something similar.

I no longer check the INT_SWAP flag prior to issuing the CMD_SNAPSHOT2 command. It does not appear to be necessary. I think the snapshot action blocks itself until the new frame is ready.

I also no longer check the INT_SWAP flag to determine when the snapshot is complete. I don't think this was a reliable way to determine when the snapshot was complete. Displaying a new frame and the snapshot completing are two different things they really aren't coupled together. Instead, I write 0xffffffff to some area of RAM_G prior to calling CMD_SNAPSHOT2. Then, immediately after issuing CMD_SNAPSHOT2, I issue a CMD_MEMZERO for that same RAM_G address. So, as soon as the snapshot completes, the coprocessor will clear the memory address. My MCU then polls the memory address until it reads zero. At that point it knows the snapshot has completed and it can safely analyze the rendered glyph (now in RAM_G).

mike

2
Discussion - EVE / Re: Font baseline metrics
« on: June 07, 2023, 09:53:29 PM »
Using CMD_SNAPSHOT2 to copy the rendered font to RAM_G and then analyzing it worked. Waiting to ensure the font was rendered and then waiting for it to get copied to RAM_G was a bit tricky. I ended up checking the INT_SWAP flag in REG_INT_FLAGS to tell when the frame had been rendered after drawing the bitmap and then again after the call to CMD_SNAPSHOT2. Perhaps that is overkill and there is a better way to check when the steps are complete.

For anyone who found this thread and needs the baseline information, here is what I calculated for the ROM fonts. The baseline is in pixels from the bottom of the bitmap. I also calculated the cap height as the distance from the bottom of the bitmap to the top of "flat" capital letters. Perhaps it should be calculated from the baseline. You can adjust these numbers as needed. In both cases, I used '1' as the reference glyph since it is flat (and is present in some reduced character set fonts I use).

Font #BaselineCap Height
1618
1708
18414
19016
20210
2134
22416
23417
24523
25731
26314
27417
28520
29523
30730
311041
321251
331769
342289

mike

3
Discussion - EVE / Re: Font baseline metrics
« on: June 07, 2023, 04:25:35 PM »
Thanks!

In the meantime, I noticed the CMD_SNAPSHOT2 command. I'm going to try rendering a character ('1' since it is a "flat" character like 'x' and will have a well defined baseline) and then using CMD_SNAPSHOT2 to copy it to RAM_G where I can analyze it.

mike

4
Discussion - EVE / Re: Font baseline metrics
« on: June 06, 2023, 08:33:37 PM »
I decided to try and determine the baselines myself, at runtime. Using the font metrics, I could multiply the line stride by the font height to determine how many bytes are in each character's bitmap. Then I could jump to the end of a bitmap and read each row from the bottom to the top until I detected a non-zero pixel. That would be the baseline. Since the line stride tells me how many bytes are in each line, it seemed easy enough to do. After testing, this method does work for a custom font I uploaded in L4 format. However, it doesn't work for built-in fonts. Or at least it doesn't work for font 31. I haven't checked the others yet.

The problem is the font format. Despite the BT817/8 datasheet saying font 31 is an L4 format font, the metrics block says it is COMPRESSED_RGBA_ASTC_8x8_KHR. The datasheet also says the line stride should be 18, but the metrics say it is a whopping 80 bytes per line!

Now I don't know what to do. Perhaps I'm reading the wrong metrics block, but all the other values seem reasonable.

What is the meaning of line stride in an ASTC compressed font? Can I use it to determine the start of each row of the bitmap? Or is it only useful when multiplying against the font height to determine the size of each character?

Is there a way I can extract a single line from the bitmap so I can determine if any pixels are set without decompressing the entire character? Or if the entire character must be decompressed, can I use the BT817/8 to decompress it into RAM_G where I can then examine it row, by row?

Or better yet, can someone provide the baseline metrics for all the ROM fonts and I can hard code those values into my program and only runtime-calculate the baselines for my custom fonts.

Thanks,
mike

5
Discussion - EVE / Font baseline metrics
« on: June 01, 2023, 10:58:12 PM »
Does any one have the baseline value (number of pixels from the bottom of the bitmap to the font's baseline) for each of the BT817/8 built-in fonts? I'd like to use that information to better align different size fonts.

mike

6
Discussion - EVE / Re: 1.2V regulator quiescent current draw
« on: May 15, 2023, 05:53:01 PM »
Thank you. That is important to know. The 10x difference between a typical current draw of 0.2mA and a max current draw of 2mA during power down is significant. Especially when powered by batteries.

mike

7
Discussion - EVE / Re: 1.2V regulator quiescent current draw
« on: May 10, 2023, 04:03:53 PM »
Thank you for checking. The datasheet only provides a typical value for Icc1 during power-down. Can you ask them what the maximum is?

mike

8
Discussion - EVE / Re: 1.2V regulator quiescent current draw
« on: May 08, 2023, 07:40:24 PM »
Hi Rudolph,
Yes, now that I look at it closer, I see that each of the three ranges applies to each supply: VCCIO1, VCCIO2 and VCCIO3. It is only an accident of formatting that each VCCIO is on a separate line. I should have noticed this.

And yes, it is weird that there are voltage gaps in the acceptable ranges. Is 2.1V or 2.9V really not allowed?

I'm still hoping someone can answer my primary question regarding Iq for the 1.2V regulator.

mike

9
Discussion - EVE / 1.2V regulator quiescent current draw
« on: May 03, 2023, 05:46:07 PM »
On the BT818Q, I notice that the internal regulator still produces 1.2V on VOUT1V2 when the system is in POWERDOWN state. I'm trying to determine how much current the chip draws when in POWERDOWN and need to factor in the quiescent current draw from the regulator. I can't find this value in the datasheet. Is it included in the Icc1 figure shown in table 6-3? If not, can you provide it?

Also, table 6-3 show the maximum voltage for VCCIO2 is 2.75V. This conflicts with other parts of the datasheet that explicitly state that 3.3V can be applied to VCCIO2. I believe it is table 6-3 that is incorrect.

Thank you,
mike

10
Discussion - EVE / Re: BEGIN(RECTS) primitive and LINE_WIDTH
« on: November 22, 2021, 06:52:48 PM »
Hi David,
Thanks for the reply. I set up a test and created one rectangle using SCISSOR and CLEAR and compared it to a rectangle using BEGIN(RECTS) with a line width of 16 * 1. I see a little bleed into the surrounding pixels when I use BEGIN(RECTS). It's subtle, but the edges definitely aren't as crisp as when I use SCISSOR.

So I guess, if I want the sharpest possible rectangles (and I don't know if that is truly necessary), I need to use SCISSOR.

I should note that the output from my BT817 goes through a chip that converts the signal to HDMI where it is displayed on a small monitor. I'm not using the monitor's native resolution, either. I'm displaying at 480p and the monitor is native 720p. That said, I can always identify which rectangle was made with SCISSOR and which was made with BEGIN(RECTS), even when I swap their screen locations.

mike

11
Discussion - EVE / BEGIN(RECTS) primitive and LINE_WIDTH
« on: November 10, 2021, 10:28:14 PM »
Section 2.10.4 of the AN_033 programming guide says the current line width is used to round the corners when using the BEGIN(RECTS) primitive. It says, "Line width size is used for corner curvature, LINE_WIDTH pixels are added in both directions in addition to the rectangle dimension".

How does one get square corners, then? It would seem setting LINE_WIDTH to 0 would create a rectangle with square corners at exactly the size specified by the VERTEX2F() coordinates. But when I try that, the rectangle isn't drawn at all. Do I need to use a LINE_WIDTH of 1 pixel and then shrink my rectangle by 0.5 pixel at each coordinate? That seems rather awkward.

Is it better to avoid using BEGIN(RECTS) entirely and instead use SCISSOR and CLEAR to create rectangles?

12
Discussion - EVE / Re: BT818 PCLK settings
« on: November 04, 2021, 05:18:20 PM »
Thank you. AN_336 helps. It says that HOFFSET should be Back Porch + Sync Pulse + (Front Porch - X), where X >= 1. This also applies to SYNC0 and SYNC1. Where ever you see the Front Porch, you should use (Front Porch - X). Table 3.1 and Figure 3.2 show this.

I was using the BT817_8 datasheet (version 1.1 - the same as the one you link to). It is different. Table 4-14 from the datasheet is similar to Table 3.1 in the app note, but does not say to reduce the front porch. The Display Parameter column of Table 4-14 says HOFFSET = Front Porch + Sync Pulse + Back Porch. The Front Porch is used without being reduced. The verbiage in the Description column says HOFFSET < HCYCLE - HSIZE, but that does not agree with what is shown in the Display Parameter column.

This discrepancy is also seen in Figure 4-6. Figure 4-6 is similar to the app note's Figure 3.2. However, the figure in the app note shows a reduced value for the Front Porch. The figure in the datasheet shows the full duration of the Front Porch.

Based on what you are saying, the app note is correct and the datasheet should be corrected.

The app note says X (the value used to reduce the front porch) must be >= 1. Is there any further restriction on this or is it always acceptable to use X=1?

Thank you for the clarification,
mike

13
Discussion - EVE / EVE Asset Converter failing
« on: November 03, 2021, 11:39:42 PM »
I'm trying to use the EVE Asset Converter to convert some png file to L4. I'm running version 2.1.0-rc2.

Here is an example from the log:
----------------------------------------------------------------------
C:/EAB/Input/diving_16.png conversion is in progress...
Conversion failed!
EXCEPTION IN (img_cvt.py, LINE 942 ""): [Errno 13] Permission denied: 'output.txt'

Traceback (most recent call last):
  File "img_cvt.py", line 942, in image_convert
  File "img_cvt.py", line 799, in run
PermissionError: [Errno 13] Permission denied: 'output.txt'


It's not showing me the full path to output.txt, so I don't know why it can't create the file. A folder called SampleApp is created in the output folder and it contains a ReadMe.txt and a few subfolders, but that's it. I can't find anything that looks like it might be the output from my converted image.

I can't locate img_cvt.py in EAB executable folder either, so I'm not able to dig into this any further on my own.

On a related note, if the asset builder is written in Python, having the source would be very helpful. Then I could run it directly under MacOS. A command line conversion utility would be especially handy.

14
Discussion - EVE / Re: BT818 PCLK settings
« on: November 01, 2021, 05:40:34 PM »
Yes, I have a bridge chip for the HDMI interface. I use a TFP420.

As an example, here is the VESA timing for 640x480 @60MHz:

pixel clock = 25175000
horizontal active pixels = 640
horizontal blank = 160
horizontal front porch = 16
horizontal sync = 96
vertical active lines = 480
vertical blank = 45
vertical front porch = 10
vertical sync = 2

Given this timing, I set the BT818 registers as follows:
HCYCLE = 800
HSIZE = 640
HOFFSET = 160
HSYNC0 = 16
HSYNC1 = 112
VCYCLE = 525
VSIZE = 480
VOFFSET = 45
VSYNC0 = 10
VSYNC1 = 12

I can get output using these timing values (and PCLK twice as fast as required and CSPREAD disabled), but I want to be able to handle general cases as well - where timing information is extracted from the display using DDC and it is not known in advance. Here are my questions:

1) Does the BT818 render each line during the blanking period (HOFFSET)?
2) Why does HCYCLE need to be greater than HSIZE + HOFFSET, instead of greater than or equal to HSIZE + HOFFSET? I don't see any cycles in the Figure 4-6 RGB Timing Waveforms from the datasheet that would allow HOFFSET < HCYCLE - HSIZE.
3) Is the blanking period (HOFFSET) not sufficient for rendering?
4) If it is not sufficient, how do I calculate how much addition time is required?

15
Discussion - EVE / Re: BT818 PCLK settings
« on: October 27, 2021, 05:14:10 PM »
It's not a specific screen. The display is connected via HDMI. We either use timings provided by the display over HDMI DDC or by using standardized VESA timings.

I thought the BT81x did its scan line rendering during the blanking period (hoffset). If so, why does it need hcycle to be larger than the active (hsize) + blanking (hoffset) periods?

If those extra cycles are indeed required for some purpose, how much time is required? Is it a duration (a certain number of milliseconds or microseconds) or a number of pixel clocks?

mike

Pages: [1] 2