Acadia Lab 203 + Lab 231
在做完 Lab 6 之后,惊觉选做实验缺口很大,于是遍历了一遍夏任务,找到了一条最省力的路线。
做完 Lab 6 的连线不用拆,可以接下来做以下两个实验:
Lab 203 网络时钟
核心代码如下:
void write_data(int dat) {
int i=,temp;
RS_H;
EN_L;
temp=dat & 0xf0;
for (i=; i < ; i++)
{
if (temp&0x80)
digitalWrite(DB[i],HIGH);
else
digitalWrite(DB[i],LOW);
temp <<= ;
delay();
}
EN_H;
delay();
EN_L;
temp=(dat & 0x0f)<<;
for (i=; i < ; i++)
{
if (temp&0x80)
digitalWrite(DB[i],HIGH);
else
digitalWrite(DB[i],LOW);
temp <<= ;
delay();
}
EN_H;
delay();
EN_L;
}
视频地址如下:
Lab 231 计算器
核心代码如下:
void getResult(void){
char c;
op1=;
op2=;
while((c = getchar())!=' '){
op1 = op1* + c - ;
}
op=getchar();
c = getchar();
while((c = getchar())!=' '&&c!='\n'){
op2 = op2* + c - ;
}
switch(op){
case '+': result_num=op1+ op2; break;
case '-': result_num = op1- op2; break;
case '*': result_num = op1* op2; break;
case '/': result_num = op1/ op2; break;
}
int i=;
if(result_num >=){
while(result_num!=){
result[i]= result_num %+;
result_num = result_num /;
i--;
}
}
else if (result_num==)result[i]='';
else{
result_num =- result_num;
while(result_num!=){
result[i]=result_num %+;
result_num = result_num /;
i--;
}
result[i]='-';
i--;
}
while(i>){
result[i]=' ';
i--;
}
}
视频地址如下:
http://v.youku.com/v_show/id_XMTI2MTkzMzY0NA==.html
Acadia Lab 203 + Lab 231的更多相关文章
- Innovus Lab和Lab Guide下载地址 | Innovus教程 - Flow系列 - 数据准备
本文转自:自己的微信公众号<集成电路设计及EDA教程> <Innovus Lab和Lab Guide下载地址 | Innovus教程 - Flow系列 - 数据准备> ...
- Acadia Lab 228 + Lab 222
又是一对串烧实验,布好线后非常方便就可以一起完成. 连线方案一模一样: Lab 228 数码管骰子 核心代码如下: def loop() : global cnt global btn_read,se ...
- 6.824 Lab 5: Caching Extents
Introduction In this lab you will modify YFS to cache extents, reducing the load on the extent serve ...
- 常用增强学习实验环境 I (MuJoCo, OpenAI Gym, rllab, DeepMind Lab, TORCS, PySC2) (转载)
原文地址:http://blog.csdn.net/jinzhuojun/article/details/77144590 和其它的机器学习方向一样,强化学习(Reinforcement Learni ...
- Cloud Lab: 泰晓实验云台【转】
转自:http://tinylab.org/cloud-lab/ 可快速构建的计算机课程在线实验平台 由 Wu Zhangjin 创建于 2017/10/06 评论 打赏 项目描述 泰晓实验云台 项目 ...
- Ubuntu下常用强化学习实验环境搭建(MuJoCo, OpenAI Gym, rllab, DeepMind Lab, TORCS, PySC2)
http://lib.csdn.net/article/aimachinelearning/68113 原文地址:http://blog.csdn.net/jinzhuojun/article/det ...
- hapi lab测试框架简单使用
1. 依赖安装 yarn init yarn add lab code 2. 基本模式 const Lab = require('lab'); const Code = require('code') ...
- Jupyer Notebook, Jupyter Lab 虚拟环境配置
虚拟环境 conda create -n python36 python=3.6 使用以下命令激活: activate python36 Notebook 安装插件 conda install nb_ ...
- GitHub Learning Lab
GitHub Learning Lab https://lab.github.com/ https://github.community/t5/GitHub-Learning-Lab/bd-p/lea ...
随机推荐
- mysql5.5字符集设置的一点变化(对于中文乱码问题,需要设置mysql字符集)
工作中因为字符集问题没少头疼,还犯过一次错误,还好拯救及时,没有发生重大事故,唉,弄清楚点还是非常有必要的: 例如我的工作环境为CTR+redhat5+mysql5.5 在导入sql语句的时候必须要注 ...
- Visual Studio 14 初试,vNext
下了几天的VS 2014 .终于安装上了,花了好几天时间, VS 2014 下载地址, http://www.visualstudio.com/en-us/downloads/visual-stud ...
- 坑的可以呀re
.findall() 直接匹配字母和数字 元字符:. ^ $ * + ? {} [] () \ import re print(re.findall("alex"," ...
- javascript slice
定义和用法 slice() 方法可提取字符串的某个部分,并以新的字符串返回被提取的部分. 语法 stringObject.slice(start,end) 参数 描述 start 要抽取的片断的起始下 ...
- eclipse项目debug方法
属性查看代码在哪里存 本地项目启动 1,2步骤需要success
- Twitter-Snowflake,64位自增ID算法详解
Twitter-Snowflake算法产生的背景相当简单,为了满足Twitter每秒上万条消息的请求,每条消息都必须分配一条唯一的id,这些id还需要一些大致的顺序(方便客户端排序),并且在分布式系统 ...
- JsonException: Max allowed object depth reached while trying to export from type System.Single
在进行类转json字符串时,报错JsonException: Max allowed object depth reached while trying to export from type Sys ...
- 使用Servlet上传文件
使用浏览器向服务器上传文件其本质是打开了一个长连接并通过TCP方式传输数据.而需要的动作是客户端在表单中使用file域,并指定该file域的name值,然后在form中设定enctype的值为mult ...
- C连接MySQL数据库开发之Windows环境配置及测试(转)
http://blog.csdn.net/xyang81/article/details/26814633(转)
- js判断是否是移动设备登陆网页
var browser = { versions: function () { var u = navigator.userAgent, app = ...