这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » AT91SAM9RL64 AT91SAM9261 AT91SAM9263 LCD

共1条 1/1 1 跳转至

AT91SAM9RL64 AT91SAM9261 AT91SAM9263 LCDC 定时设置区别

专家
2009-03-24 16:47:45     打赏
AT91SAM9RL64 AT91SAM9261 AT91SAM9263 LCDC 定时设置区别

 

AT91SAM9263

HFP: Horizontal Front Porch

Number of idle LCDDOTCK cycles at the end of the line. Idle period is (HFP+1) LCDDOTCK cycles Bit21..31

AT91SAM9261 - 6260G

HFP: Horizontal Front Porch

Number of idle LCDDOTCK cycles at the end of the line. Idle period is (HFP+1) LCDDOTCK cycles Bit21..31

AT91SAM9261 - 6260K

HFP: Horizontal Front Porch

Number of idle LCDDOTCK cycles at the end of the line. Idle period is (HFP+2) LCDDOTCK cycles Bit21..31

AT91SAM9RL64

HFP: Horizontal Front Porch
Number of idle LCDDOTCK cycles at the end of the line. Idle period is (HFP+1) LCDDOTCK cycles. Bit21..31

 

IAR EWARM 

ioat91sam9261.ddf

ioat91sam9261s.ddf

ioat91sam9263.ddf

ioat91sam9rl64.ddf

sfr = "LCDC_TIM2.HFP",  "Memory", 0x0060080c, 4, base="16", bitRange="22-31"

正确的是 bitRange="21-31"

at91lib V1.5

//------------------------------------------------------------------------------
/// Sets the horizontal timings of the LCD controller. Meaningful for both
/// STN and TFT displays.
/// \param hbp  Number of idle LCDDOTCLK cycles at the beginning of a line.
/// \param hpw  Width of the LCDHSYNC pulse, in LCDDOTCLK cycles.
/// \param hfp  Number of idel LCDDOTCLK cycles at the end of a line.
//------------------------------------------------------------------------------
void LCD_SetHorizontalTimings(
    unsigned int hbp,
    unsigned int hpw,
    unsigned int hfp)
{
    ASSERT(((hbp-1) & 0xFFFFFF00) == 0,
           "LCD_SetHorizontalTimings: Wrong hbp value.\n\r");
    ASSERT(((hpw-1) & 0xFFFFFFC0) == 0,
           "LCD_SetHorizontalTimings: Wrong hpw value.\n\r");
    ASSERT(((hfp-1) & 0xFFFFFF00) == 0,
           "LCD_SetHorizontalTimings: Wrong hfp value.\n\r");

    AT91C_BASE_LCDC->LCDC_TIM2 = (hbp-1) | ((hpw-1) << 8) | ((hfp-1) << 24);

正确的是 | ((hfp-2) << 21);

 

}

是否hfp占用了b24..b31 ? 或者应该是 ((hfp-1) << 21); 或者 ((hfp-2) << 21)

点击开大图

点击开大图

 

从这些资料可以看出正确的是 ((hfp-2) << 21)

1. 修改 at91lib

2. 修改 IAR DDF 文件




关键词: AT91SAM9RL64     AT91SAM9261         

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]