电子工程师技术服务社区
- 社区首页
- 下载
- 3D 立方体在TFT中显示.zip
资料描述
转载请注明:http://www.ickey.cc/group-topic-id-13434-dialog-1.html#postlist 版权所有!
本节我们将原理图、代码和验证三部分来分析,主要是从下面3个方面进行讲解:
1.stm32f10x学习板原理图
2.程序编写
3.下载验证
一、stm32f10x学习板原理图
下面主要看的是stm32f10x学习板的触摸屏lcd部分的原理图。
二、程序编写
在写程序的时候,首先按一下步骤检查是否已经完备。
1.此学习板是通过jlink来烧录的,所以先确保jlink是正确驱动;
2.然后通过usb来供电
3.最后开启开发板的电源开关
4.程序包括触摸屏的驱动等知识,这个以后会慢慢讲,这里给大家来点稍微高级的。
程序有点多,主要贴出main函数仅供大家参考。
int main(void)
{
int i;
#ifdef debug
debug();
#endif
/* system clocks configuration **********************************************/
rcc_configuration();
/* nvic configuration *******************************************************/
nvic_configuration();
/*------------------- drivers initialization -------------------------------*/
/* initialize the lcd */
stm3210e_lcd_init();
/* clear the lcd */
lcd_clear(black);
/* set the lcd text color */
lcd_settext