wolfsoldier

    1. stm32的启动文件选择 5/4613 stm32/stm8 2011-01-21
                                       难怪没找到,原来100系列也有另外一个参考手册
    2.                                  看了一下,LZ是用GPIO来模拟的。 贴出我的可以用的代码,供参考: void LCD_Init(void) {   // Configure the LCD Control pins --------------------------------------------   LCD_CtrlLinesConfig();   // Configure the Parallel interface ------------------------------------------   LCD_PrllConfig();   delay_ms(50); // Delay 50 ms   LCD_ID = LCD_ReadReg(0x00);   if(LCD_ID == 0x9325)   {     LCD_Type = NEW_LCD_9325;     // Start Initial Sequence     LCD_WriteReg(R0,   0x0001); // Start internal OSC.     LCD_WriteReg(R1,   0x0100); // set SS and SM bit     LCD_WriteReg(R2,   0x0700); // set 1 line inversion     LCD_WriteReg(R3,   0x1018); // set GRAM write direction and BGR=1.     LCD_WriteReg(R4,   0x0000); // Resize register        LCD_WriteReg(R8,  0x0202); // set the back porch and front porch     LCD_WriteReg(R9,  0x0000); // set non-display area refresh cycle ISC[3:0]     LCD_WriteReg(R10, 0x0000); // FMARK function     LCD_WriteReg(R12, 0x0000); // RGB interface setting     LCD_WriteReg(R13, 0x0000); // Frame marker Position     LCD_WriteReg(R15, 0x0000); // RGB interface polarity     // Power On sequence -------------------------------------------------------     LCD_WriteReg(R16, 0x0000); // SAP, BT[3:0], AP, DSTB, SLP, STB     LCD_WriteReg(R17, 0x0000); // DC1[2:0], DC0[2:0], VC[2:0]     LCD_WriteReg(R18, 0x0000); // VREG1OUT voltage     LCD_WriteReg(R19, 0x0000); // VDV[4:0] for VCOM amplitude     delay_ms(200);             // Dis-charge capacitor power voltage (200ms)     LCD_WriteReg(R16, 0x17B0); // SAP, BT[3:0], AP, DSTB, SLP, STB     LCD_WriteReg(R17, 0x0137); // DC1[2:0], DC0[2:0], VC[2:0]     delay_ms(50);              // Delay 50 ms     LCD_WriteReg(R18, 0x0139); // VREG1OUT voltage     delay_ms(50);              // Delay 50 ms     LCD_WriteReg(R19, 0x1d00); // VDV[4:0] for VCOM amplitude     LCD_WriteReg(R41, 0x0013); // VCM[4:0] for VCOMH     delay_ms(50);              // Delay 50 ms     LCD_WriteReg(R32, 0x0000); // GRAM horizontal Address     LCD_WriteReg(R33, 0x0000); // GRAM Vertical Address     // Adjust the Gamma Curve (ILI9325)-----------------------------------------     LCD_WriteReg(R48, 0x0007);     LCD_WriteReg(R49, 0x0302);     LCD_WriteReg(R50, 0x0105);     LCD_WriteReg(R53, 0x0206);     LCD_WriteReg(R54, 0x0808);     LCD_WriteReg(R55, 0x0206);     LCD_WriteReg(R56, 0x0504);     LCD_WriteReg(R57, 0x0007);     LCD_WriteReg(R60, 0x0105);     LCD_WriteReg(R61, 0x0808);     // Set GRAM area -----------------------------------------------------------     LCD_WriteReg(R80, 0x0000); // Horizontal GRAM Start Address     LCD_WriteReg(R81, 0x00EF); // Horizontal GRAM End Address     LCD_WriteReg(R82, 0x0000); // Vertical GRAM Start Address     LCD_WriteReg(R83, 0x013F); // Vertical GRAM End Address     LCD_WriteReg(R96,  0xA700); // Gate Scan Line(GS=1, scan direction is G320~G1)     LCD_WriteReg(R97,  0x0001); // NDL,VLE, REV     LCD_WriteReg(R106, 0x0000); // set scrolling line     // Partial Display Control -------------------------------------------------     LCD_WriteReg(R128, 0x0000);     LCD_WriteReg(R129, 0x0000);     LCD_WriteReg(R130, 0x0000);     LCD_WriteReg(R131, 0x0000);     LCD_WriteReg(R132, 0x0000);     LCD_WriteReg(R133, 0x0000);     // Panel Control -----------------------------------------------------------     LCD_WriteReg(R144, 0x0010);     LCD_WriteReg(R146, 0x0000);     LCD_WriteReg(R147, 0x0003);     LCD_WriteReg(R149, 0x0110);     LCD_WriteReg(R151, 0x0000);     LCD_WriteReg(R152, 0x0000);     // set GRAM write direction and BGR=1     // I/D=00 (Horizontal : increment, Vertical : decrement)     // AM=1 (address is updated in vertical writing direction)     LCD_WriteReg(R3, 0x1018);     LCD_WriteReg(R7, 0x0133); // 262K color and display ON     return;   }   // Start Initial Sequence (ILI9320)-------------------------------------------   LCD_WriteReg(R229, 0x8000); // Set the internal vcore voltage   LCD_WriteReg(R0,   0x0001); // Start internal OSC.   LCD_WriteReg(R1,   0x0100); // set SS and SM bit   LCD_WriteReg(R2,   0x0700); // set 1 line inversion   LCD_WriteReg(R3,   0x1030); // set GRAM write direction and BGR=1.   LCD_WriteReg(R4,   0x0000); // Resize register   LCD_WriteReg(R8,  0x0202); // set the back porch and front porch   LCD_WriteReg(R9,  0x0000); // set non-display area refresh cycle ISC[3:0]   LCD_WriteReg(R10, 0x0000); // FMARK function   LCD_WriteReg(R12, 0x0000); // RGB interface setting   LCD_WriteReg(R13, 0x0000); // Frame marker Position   LCD_WriteReg(R15, 0x0000); // RGB interface polarity   // Power On sequence ---------------------------------------------------------   LCD_WriteReg(R16, 0x0000); // SAP, BT[3:0], AP, DSTB, SLP, STB   LCD_WriteReg(R17, 0x0000); // DC1[2:0], DC0[2:0], VC[2:0]   LCD_WriteReg(R18, 0x0000); // VREG1OUT voltage   LCD_WriteReg(R19, 0x0000); // VDV[4:0] for VCOM amplitude   delay_ms(200);             // Dis-charge capacitor power voltage (200ms)   LCD_WriteReg(R16, 0x17B0); // SAP, BT[3:0], AP, DSTB, SLP, STB   LCD_WriteReg(R17, 0x0137); // DC1[2:0], DC0[2:0], VC[2:0]   delay_ms(50);              // Delay 50 ms   LCD_WriteReg(R18, 0x0139); // VREG1OUT voltage   delay_ms(50);              // Delay 50 ms   LCD_WriteReg(R19, 0x1d00); // VDV[4:0] for VCOM amplitude   LCD_WriteReg(R41, 0x0013); // VCM[4:0] for VCOMH   delay_ms(50);              // Delay 50 ms   LCD_WriteReg(R32, 0x0000); // GRAM horizontal Address   LCD_WriteReg(R33, 0x0000); // GRAM Vertical Address   // Adjust the Gamma Curve   LCD_WriteReg(R48, 0x0000);   LCD_WriteReg(R49, 0x0007);   LCD_WriteReg(R50, 0x0103);   LCD_WriteReg(R53, 0x0407);   LCD_WriteReg(R54, 0x090F);   LCD_WriteReg(R55, 0x0404);   LCD_WriteReg(R56, 0x0400);   LCD_WriteReg(R57, 0x0404);   LCD_WriteReg(R60, 0x0000);   LCD_WriteReg(R61, 0x0400);   // Set GRAM area -------------------------------------------------------------   LCD_WriteReg(R80, 0x0000); // Horizontal GRAM Start Address   LCD_WriteReg(R81, 0x00EF); // Horizontal GRAM End Address   LCD_WriteReg(R82, 0x0000); // Vertical GRAM Start Address   LCD_WriteReg(R83, 0x013F); // Vertical GRAM End Address   LCD_WriteReg(R96,  0x2700); // Gate Scan Line   LCD_WriteReg(R97,  0x0001); // NDL,VLE, REV   LCD_WriteReg(R106, 0x0000); // set scrolling line   // Partial Display Control ---------------------------------------------------   LCD_WriteReg(R128, 0x0000);   LCD_WriteReg(R129, 0x0000);   LCD_WriteReg(R130, 0x0000);   LCD_WriteReg(R131, 0x0000);   LCD_WriteReg(R132, 0x0000);   LCD_WriteReg(R133, 0x0000);   // Panel Control -------------------------------------------------------------   LCD_WriteReg(R144, 0x0010);   LCD_WriteReg(R146, 0x0000);   LCD_WriteReg(R147, 0x0003);   LCD_WriteReg(R149, 0x0110);   LCD_WriteReg(R151, 0x0000);   LCD_WriteReg(R152, 0x0000);   // set GRAM write direction and BGR=1   // I/D=01 (Horizontal : increment, Vertical : decrement)   // AM=1 (address is updated in vertical writing direction)   LCD_WriteReg(R3, 0x1018);   LCD_WriteReg(R7, 0x0173); // 262K color and display ON }
    3. swimerror[30004]:commtimeout 6/10747 stm32/stm8 2010-12-23
                                       VDD 5V SWIM 5V GND 0V SWIM-RST 0.38V 板子连STLINK后,测的电压是这样
    4. stm32f107phy搭配问题 4/3928 stm32/stm8 2010-09-15
                                       dp83848,用下来确实挺好。如果想便宜,就用Realtek的
    5. 发送固定个数脉冲的方法 15/11484 stm32/stm8 2010-07-27
                                       TIM_TimeBaseStructure.TIM_Period = 7199;   TIM_TimeBaseStructure.TIM_Prescaler = 0;   TIM_TimeBaseStructure.TIM_ClockDivision = 0;   TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;   TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);   TIM_TimeBaseStructure.TIM_Period = 9;   TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure);   TIM_TimeBaseStructure.TIM_Period = 9;   TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure);   /* Master Configuration in PWM1 Mode */   TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1;   TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;   TIM_OCInitStructure.TIM_Pulse = 3599;   TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High;   TIM_OC2Init(TIM2, &TIM_OCInitStructure);   /* Select the Master Slave Mode */   TIM_SelectMasterSlaveMode(TIM2, TIM_MasterSlaveMode_Enable);   /* Master Mode selection */   TIM_SelectOutputTrigger(TIM2, TIM_TRGOSource_OC2Ref);   /* Slaves Configuration: PWM1 Mode */   TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1;   TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;   TIM_OCInitStructure.TIM_Pulse = 4;   TIM_OC1Init(TIM3, &TIM_OCInitStructure);   TIM_OC1Init(TIM4, &TIM_OCInitStructure);   /* Slave Mode selection: TIM3 */   TIM_SelectSlaveMode(TIM3, TIM_SlaveMode_Gated);   TIM_SelectInputTrigger(TIM3, TIM_TS_ITR1);   /* Select the Master Slave Mode */   TIM_SelectMasterSlaveMode(TIM3, TIM_MasterSlaveMode_Enable);   /* Master Mode selection: TIM3 */   TIM_SelectOutputTrigger(TIM3, TIM_TRGOSource_Update);   /* Slave Mode selection: TIM4 */   TIM_SelectSlaveMode(TIM4, TIM_SlaveMode_Gated);   TIM_SelectInputTrigger(TIM4, TIM_TS_ITR2);      /* TIM enable counter */   TIM_Cmd(TIM3, ENABLE);   TIM_Cmd(TIM2, ENABLE);   TIM_Cmd(TIM4, ENABLE); 这是配置的代码,板子上测试高电平的时候工作,低电平的时候有个定时器不工作,现在唯一的问题就是,空闲时的电平有时低有时高
    6. IAR无法烧写程序 9/10788 微控制器 MCU 2010-07-09
      我的建议是 直接新建个项目再测试一次
    7. [100分] Wince下修复SqlCE文件报错. 在线等. 8/4466 嵌入式系统 2010-06-04
      再顶一次
    8. 各位帮帮忙噢,,帮顶也给分的哦 27/6137 嵌入式系统 2010-05-25
      sf!!!!!!!!!!
    9. wince网络通讯 20/9316 嵌入式系统 2010-05-25
      嗯。刚看了下。 注册表里现在没有这个。 应该是需要注册表里添加mac 然后驱动读取注册表中的mac 手上没有BSP,系统也不是我做的。 那就无能为力了吧?
    10. 刚开始测试的时候可以直接改动  release 目录(就是NK.BIN同目录)下的platform.bib和platform.reg, 然后直接make image , 后期发布时  可以再files里面改  然后重新sysgen 就可以了
    11. 问下Keil C的注册机是不是都会被报木马? 11/6105 嵌入式系统 2010-03-16
      引用楼主 wangfan027 的回复: 好几个版本的注册机都被杀毒软件报木马了,有点怀疑是不是误报了
      看楼主的杀毒软件是哪款,一般杀毒软件对于破解软件 都认为是木马,默认都会把对应的破解给杀掉。
    12. 信号量有一个计数器,满足OSSemPend要求,计数器会减一(超时除外); OSSemCreat()中的值就是设置这个计数器
    13. 关于uboot地址重定位 9/4429 嵌入式系统 2010-01-12
      这个是因为链接的时候,函数的地址都被增加了TEXT_BASE。你可以在代码中搜索一下TEXT_BASE的值定义为多少,看看就明白了。  这个值往往也就是u-boot被拷贝到内存,内存的起始值。
    14. ce下 bmp 24位转8位 5/3588 嵌入式系统 2009-12-22
      第一,既然是24位的,又怎么会是黑白图?费解。 第二,你的代码都列出来了,那么,你遇到什么问题了呢? 24位bmp转8位,肯定是要损失效果的,做法无非就是把RGB低位的数据丢掉。
    15. WinDBG双机调试问题 14/5446 嵌入式系统 2009-12-15
      前短时间,我玩一下,当时也遇到一些问题 当时想着总结下的,,最后没写出来呵呵 我试过,单步调试没问题的,等我回去慢慢找下
    16. 引用 8 楼 ruritanian 的回复: 不用debug版本的,但是需要有kitl
      不DEBUG,怎么支持断点,没有断点怎么看STACK和SFR/内存/变量等等的情况
    17. 我的液晶,要命啊! 14/4174 嵌入式系统 2009-10-29
      灰度等级。1bpp是黑白屏,2bpp是4级灰度
    18. mark
    19. vxworks的DHCP客户端问题 2/4616 实时操作系统RTOS 2009-09-24
      是讲关于dhcp客户端IP地址申请的问题,与操作系统无关,不知道大家遇到过这种情况没有??
    20. wince5.0+2440 文件系统加载问题 12/4859 嵌入式系统 2009-08-31
      回去仔细的打印了我的分区表。。但是从结果分析上来看,分区表根本就没有问题。。。分区表没问题。应该加在第一个BINFS应改要没问题的。。。mark..继续关注

最近访客

< 1/1 >

统计信息

已有88人来访过

  • 芯积分:--
  • 好友:--
  • 主题:8
  • 回复:52

留言

你需要登录后才可以留言 登录 | 注册


现在还没有留言