完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
|
|
相关推荐
1个回答
|
|
|
#include
#include void st7920LcdInit(void) { u8 i; SPI_Init(); delay_ms(100); PE_DDR|=0x20; PE_CR1|=0x20; PE_CR2|=0x20; sendCodeST7920(0x0c);//整体显示 sendCodeST7920(0x01);//清屏 sendCodeST7920(0x02); for(i=0;i<64;i++) lcd_buffer=' '; //memset(lcd_buffer,' ',sizeof(lcd_buffer)); } void sendCodeST7920(u8 Lcd_cmd) { E_CLK LCD_DELAY() E_SET SPI_sendchar(0xF8); SPI_sendchar(Lcd_cmd & 0xF0); SPI_sendchar(Lcd_cmd << 4); LCD_DELAY() E_CLK LCD_DELAY() } void sendDataST7920(u8 Lcd_data) { E_CLK LCD_DELAY() E_SET SPI_sendchar(0xFA); SPI_sendchar(Lcd_data & 0xF0); SPI_sendchar(Lcd_data << 4); LCD_DELAY() E_CLK LCD_DELAY() } [/tr][/td] |
|
|
|
|
只有小组成员才能发言,加入小组>>
1018 浏览 1 评论
1849 浏览 0 评论
1830 浏览 1 评论
3254 浏览 5 评论
3581 浏览 9 评论
1021浏览 1评论
1850浏览 1评论
如何知道嵌入式电子控制单元 (ECU) 中的RAM使用情况?
1360浏览 1评论
1852浏览 0评论
1178浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 05:39 , Processed in 0.600219 second(s), Total 74, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
3488