ATtiny5上的492字节演示



演示通常比相同数量的游戏具有更复杂的图形。 毕竟,您不必在用户交互和其他计算上花费资源。 拟议的程序在具有512字节ROM,32字节RAM和16个处理器寄存器的ATtiny5微控制器上运行。 Rakettitiede是芬兰的“火箭科学”(包括与英语措词单元相同的含义)以及软件公司的名称。

演示的电路板:



除了LTC1799组件以外,这里的一切都是熟悉的。 这是由电阻器配置的时钟。 它的工作频率为12 MHz。 另一个在相同频率下相当稳定的矩形脉冲发生器是合适的。 为了从微控制器的三个输出获得VGA监视器所需的五个信号,在LED和电阻上使用分压器,分压器也使用监视器中内置的75欧姆电阻。 程序可以将每个输出切换为零,一个和高阻抗状态。

由于在Hackaday竞赛中对应用程序的接受结束了,因此作者在此处发送了该演示的中间版本,除了文本输出之外,该演示的功能相同:


它占用了394个字节,即197个16位字:

avra -l pentaveega.lst pentaveega.asm AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010) Copyright (C) 1998-2010. Check out README file for more info AVRA is an open source assembler for Atmel AVR microcontroller family It can be used as a replacement of 'AVRASM32.EXE' the original assembler shipped with AVR Studio. We do not guarantee full compatibility for avra. AVRA comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of avra under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. Pass 1... Pass 2... done Assembly complete with no errors. Segment usage: Code : 197 words (394 bytes) Data : 0 bytes EEPROM : 0 bytes 

经过优化后,该演示减少为354,然后为352个字节。 但是后来作者决定在图片中添加文本,之后程序开始占用492个字节:


该代码位于此处的 Bitbucket以及Hackaday上,作为单独的文件: pentaveega.asmtn5def.incpentaveega.hex

该设备可以分为三种版本:使用适配器板的两种类型的面包板上,以及印刷电路板(在CC-BY-SA 4.0下,位于Bitbucket上单独项目文件夹中的文件)。 根据第一种选择,请注意在组装过程中连接显示器连接器的方式:





Source: https://habr.com/ru/post/zh-CN455168/


All Articles