jackfxq
发表于 2024-12-26 10:20:22
{:4_250:}
明明乾坤
发表于 2025-1-11 13:12:37
我就买的这种,还没开始研究,过几天研究一下
浦江一水
发表于 2025-1-11 21:32:31
明明乾坤 发表于 2025-1-11 13:12
我就买的这种,还没开始研究,过几天研究一下
本帖用的是多年前选购的"清翔电子"板,例程较少. 现在好像还在出售,可能是已升级优化的,应该更好些吧.
明明乾坤
发表于 2025-1-13 13:39:56
浦江一水 发表于 2025-1-11 21:32
本帖用的是多年前选购的"清翔电子"板,例程较少. 现在好像还在出售,可能是已升级优化的,应该更好些吧....
嗯嗯,是的
suixilpc
发表于 2025-1-15 07:09:09
浦江老师,这块是清翔的单片机学习吧,从今天起在从头跟您学一遍。
浦江一水
发表于 2025-1-15 13:01:12
suixilpc 发表于 2025-1-15 07:09
浦江老师,这块是清翔的单片机学习吧,从今天起在从头跟您学一遍。
感谢你的浏览和留言。
我们都算是单片机的爱好者, 学习路上的同行者、坛友,互相交流,对我切莫以“老师”相称。
本帖所用的开发学习板,是清翔电子的V3.0版本。大约在七年前收藏的,当初感觉比较基础经典,性价比较高。现在清翔电子有V3.5版本,好像是升级了,例程也多了。
近来学习Ai8051U芯片,本人感觉,用于这款实验板, 还是比较方便的。
本帖中我写了七个实验课题,并给出了源码工程包。
这些都是自己在长期实战中悟得的一些个人片面习惯算法,与商家给出的例程都是不同的。
假如你有兴趣按此实验体验一下的话,注意每个实验的个性特点和知识点,给一点点提示:
01_跑马灯LED.rar
这个实验比较简单,体现了对工程文件的组成结构,力求简明,简化路径设置。
驱动IO时,使用了移位函数,简化了代码书写。
02_8位数码管显示.rar
这个实验体现了使用字符串显示函数,一种以不变应万变的手法,来控制数码管的多态显示。
03-LCD1602 4KEY USART1.rar
这个实验体现了对传统LCD1602的控制显示,4键八值的实现,以及简易串口屏的实现。
04-8x8点阵LED显示字符串.rar
这个实验体现了对点阵LED显示屏的动态移位显示。
06-PWM呼吸灯.rar
这个实验体现了单片机PWM的运用,为以后动态跟踪控制算法打下一点基础。
07-TestOLED1306.rar
由于单色显示屏,一字节表示八个点像素,不便于直接对屏缓存实现位控制和绘图,而是采用对RAM缓存编程、整体刷新屏幕的算法,实现字符串显示和基本绘图,具有一定的实用性。
08-TestLCD7735(80x160).rar
本实验体现了对彩色屏幕的基本驱动、图标显示和中西文混合显示技术,以及小字库制作的一种不同方法。
在实验中,欢迎提出各种质疑,本人将尽力作出解释。
在此,祝你实验学习顺利愉快,有所收获。
suixilpc
发表于 2025-1-15 17:51:22
谢谢您抽出宝贵的时间给与回复并给出以后在学习中的提示。
setsor
发表于 2025-2-1 04:39:58
Pujiang Yishui Posted on 2024-12-5 10:39As
is customary, let's start with a marquee experiment.
(Supplement the electrical schematic diagram of this development board, so that readers can easily understand it according to the program)
Hello,
I followed your knowledge insight and it worked in my "PreChin Puzhong 51 A3" case.
In my case, the LED port is P2.
浦江一水
发表于 2025-2-1 09:38:01
setsor 发表于 2025-2-1 04:39
Hello,
I followed your knowledge insight and it worked in my "PreChin Puzhong 51 A3" case.
很好,祝贺您实验顺利.
谢谢您的留言,为本帖增光添彩.
跑马灯程序实验于普中51_A3,原P1端口修改为P2即可, 原理是相同的.
QX-51的电原理图贴在二楼,可与其他传统51开发板对照参考.
理论上讲, 本帖的各实验程序,只要注意端口稍改,都可实验于其他传统51开发板, 可移植性较强.
Very good, congratulations on your successful experiment.
Thank you for your message, which adds luster to this post.
The LED chaser program experiment conducted on the P51_A3, and the original P1 port was modified to P2, the principle is the same.
The electrical schematic diagram of QX-51 is posted on the second floor, which can be compared and referred to with other traditional 51 development boards.
Theoretically speaking, all the programs in this post can be experimented on other traditional 51 development boards as long as the ports are slightly modified, and they have strong portability.
setsor
发表于 2025-2-2 01:44:44
Pujiang Yishui Posted on 2024-12-5 20:53Thanks
to the two moderators of "Guoxue Xinyong" and "" for their encouragement and support, as well as the praise of friends upstairs.
The second experimental procedure is about the digital tube display ...
感谢你分享的示例。我正在调整适配PHz-51 A3。这种方案对LET数码管有所不同,基于74HC138驱动,组合使用P2.2、P2.3、P2.4端口和P0端口的LED1-LED8。
u8 code T_COM[]={ 0x1c, 0x18,0x14,0x10,0x0C,0x08,0x04,0x00 }; // Mask digit codes for P2 port (P2.2 P2.3 P2.4)
// LED1,LED2,LED3,LED4,LED5,LED6,LED7,LED8
//********************** Display scan function ************************
void DisplayScan(void)
{
P2 &= 0xE3; // Clear the mask 0xE3 on P2 bit
// (P2.2 = 0 P2.3 = 0 P2.4 = 0)
P2 |= T_COM; // Activate LED(DispN) segment
P0 = LED8; // Write LED digits on current segment
if (++DispN >= 8) DispN = 0; // Reset to 0 after 8 digits
}