AL300 programming

Sep 14, 2004 9 Replies

Well, I have a problem with the zoom Engine of this chip. The Data Sheets had mentioned to refer the AL300 programming algorithm. I followed the exact steps. But couldn't manage to get the proper scaling on the vertical direction. I m using this in Conjunction with the DM642 processor. The video port 2 of this EVM gives the stream to the AL300 and it is to be output on the LCD. Its working just fine with normal output. BUt my requirements were to scale My requirement Video port gives: frmwidthxheight===800x525 active capture in above ===352x288 (CIF) AL300 should scale above to output area ===800x525 active display area === 640x480 When I programmed as instructed... the vertical scaling seems to have been not done completely. Could you please advise on how to go about this problem???


Does the AL300 correctly detect the input video sizing? Have you dumped all the register settings and checked the calculations that your software is making to set up the display PLL? Is your video interlaced?

I found that the AL300's datasheet was 'poor' which made programming it up correctly rather tedious.

Andrew

Yes I checked the calculations. How do I make sure the Al300 correctly detects the input video sizing? And yday after doing all the calculations again I simply tweaked the N value of the PLL. simply increased it in steps and noticed the vertical scaling happenning. Finally got it to display in VGA or something similar (since it filled the vga lcd disply) but then the display had dots of red, yellow and green.. not too many.. but at all borders and light sources. and on edges of tables etc. My setup contained a camera and the DM642. in default al300 disply there were no problems in the display..but when i scaled it the dots appear?

I have captured in interlaced format in video port 1 of the dm642 and after some processing outputting a progressive display through the video port 2. I doubt the PLL settings. how are M and N set generally. I set M as the input active video are... that is 352.. some of the al300 documents suggest i should set m as the total horizontal pixels ie 800? which is right... with 800 the display was bad.. with 352.. it was better...

Yes their data sheet is quite vague and their technical support poor too.

regards kanhaiya

Is the manufacturer of the AL300 a relative of Datacube? Documentation by the brain-damaged, tech support by those who didn't qualify for documentation development...

You can read the LINERATE and INVTOTAL registers to work out the the frame rate. You don't need to read INVTOTAL if you know that you are capturing NTSC or PAL format video. These values determine the input video mode (e.g. PAL, 640x480x60 VGA, etc.) and hence the sizing of the display.

The PLL calculations are relatively straightforward - divide pllN and pllM by two while pllN is bigger than the maximum permissible PLL divider. The PLLDIV register is affected by the LCD panel that you are using. What external PLL are you using?

Andrew

The max permissible PLL divider is 2047, which i am quite below. I am using the internal PLL of the AL300.

Kanhaiya

pllM

The

That should be fine then. Perhaps you could dump all the registers of the AL300 in the mode in which you are having trouble and post them here, together with the exact details of the video (verical size x horizontal size x frequency) which is being presented to it then I can look through them.

Andrew

Well the name of the register preceeds the reg value. the video scaling parameters are towards the end. The Regs are not in order (ie

1,2,3...) The video scaling registers has the reg number near them. I'm using a internal PLL.

AL300_BOARDCONFIG,

0x81,

AL300_GENERAL,

0x1A,

AL300_POLARITY,

0x17,

AL300_DITHER,

0x5A,

AL300_ADJUSTMENT,

0x00,

AL300_GOUT,

0x01,

AL300_IREQSOURCE,

0x00,

AL300_REFHTOTAL,

57, //for 640*480 resolution

AL300_REFVTOTAL,

65, //for 640*480 resolution

AL300_OUTPUTCONTROL,

0x88,

AL300_HBLANKSTARTL, //suspect

0x30, //making sure that blanking will not take effect 31f AL300_HBLANKSTARTH, 0x03, //making sure that blanking will not take effect AL300_HBLANKENDL, 0x90, //making sure that blanking will not take effect 9f AL300_HBLANKENDH, 0x00, //making sure that blanking will not take effect AL300_VBLANKSTARTL, 0xFE, //making sure that blanking will not take effect AL300_VBLANKSTARTH, 0xFF, //making sure that blanking will not take effect AL300_VBLANKENDL, 0xFF, //making sure that blanking will not take effect AL300_VBLANKENDH, 0xFF, //making sure that blanking will not take effect AL300_OSDMODE, 0x40,

AL300_FOREOP,

0x00,

AL300_FADEALPHA,

0x80,

AL300_OSDCONTROL1,

0x15,

AL300_ROMSTARTADDR1,

0x00,

AL300_FONTADDRUNIT1,

0x20,

AL300_FONTLINESIZE1, (OSD_BITMAP_WIDTH/4),

AL300_OSDCONTROL2,

0x01,

AL300_ROMSTARTADDR2,

0x00,

AL300_FONTADDRUNIT2,

0x20,

AL300_FONTLINESIZE2, (OSD_BITMAP_WIDTH/4),

AL300_COLOR0RED,

254, //color0 - RED color only AL300_COLOR0GREEN, 254, //color0 - RED color only AL300_COLOR0BLUE, 254, //color0 - RED color only AL300_COLOR1RED, 0, //color1 - BLUE color only AL300_COLOR1GREEN, 0, //color1 - BLUE color only AL300_COLOR1BLUE, 254, //color1 - BLUE color only AL300_COLOR2RED, 254, //color2 - GREEN color only AL300_COLOR2GREEN, 146, //color2 - GREEN color only AL300_COLOR2BLUE, 36, //color2 - GREEN color only AL300_COLOR3RED, 0, //color3 - RED+BLUE color only AL300_COLOR3GREEN, 254, //color3 - RED+BLUE color only AL300_COLOR3BLUE, 0, //color3 - RED+BLUE color only AL300_GOUT, 0x01,

SCALING PARAMETERS

static AL300_params_t videoScaleParamsDefault = { AL300_CAPHSTARTL, //20

136, AL300_CAPHSTARTH, //21 0, AL300_CAPHEND, //22 0x2C,

AL300_CAPVSTARTL, //24

0x29, AL300_CAPVSTARTH, //25 0x0, AL300_CAPVENDL, //26

0x49,

AL300_CAPVENDH, //27

0x1,

AL300_FRAMEVSTARTL, //28

0x10,

AL300_FRAMEVSTARTH, //29

0x60, AL300_DSPHTOTALL, //30 0x20, AL300_DSPHTOTALH, //31 0x3,

AL300_DSPHSEND, //32

12, AL300_DSPHDESTART, //33 18, AL300_DSPHDEEND, //34 98, AL300_DSPVSEND, //35 1, AL300_DSPVDESTARTL, //37 41,

AL300_DSPVDESTARTH, //38

0, AL300_DSPVDEENDL, //39

0x09, AL300_DSPVDEENDH, //3A

0x02, AL300_HRATIOL, //14 0xD1,

AL300_HRATIOH, //15

0x1,

AL300_VRATIOL, //16

0xAF,

AL300_VRATIOH, //17

0x1A, AL300_HINITPHASE, //18 0x17,

AL300_VINITPHASEODD, //19

0x20, AL300_VINITPHASE, //1A

0x20, AL300_FRAMEDELAY, //3B

48,

AL300_FRAMEDELAYODD, //3C

48,

AL300_PLLDIVL, //10

0x32,

AL300_PLLDIVH, //11

0xA5

AL300_PLLREFDIVL, //12

0x20,

AL300_PLLREFDIVH, //13

0X3,

I've checked through some of the settings so far as I can. They seem mostly, fairly reasonable. Why aren't you allowing any blanking? I can't tell what the input frame rate is (the registers provided are what you program it with, not what the chip returns as status) but did you note, in the FAQ for the chip, that the internal PLL functions 25 ... 110MHz and that for PAL based input this is below it?

Andrew

Well We are doin some blaniking in the video port before giving to the al300 so its not done again.

where is this FAQ available? Didnt get the actual meaning of what you are saying. I m giving a CIF image (352 x 288) to be displayed on a LCD screen (640 x 480)

regards kanhaiya

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required