求助大神这是什么歌5,谢谢!

查看: 2160|回复: 3
40 pin TFT液晶屏设计的问题,求助!谢谢!
主题帖子精华
初级会员, 积分 66, 距离下一级还需 134 积分
在线时间0 小时
&& &我选择一款5寸的TFT屏幕,设计的时候遇到一些问题
1.我找了些手册看,它们背光电压都比较高,20V左右,有六七个LED那种,40脚的,驱动芯片我在ST官网上找的,但是我不知道外围元件参数怎么选,谁有好的方法告诉我下?
2.这种40脚的在板子上我留的接口是什么样的,是不是按照手册上那接口画的,最后与带排线的液晶屏相连呢?我自己画的接口顺序什么样的呢?是从1-40这样吗?到时候与液晶屏相连的
时候好不好连接呢?
3.还有那个DCLK信号都有个翻转电路,什么作用呢,延时的吗?
&&& 希望大家帮帮我啊,很着急啊
主题帖子精华
在线时间46 小时
你这个是不带驱动器的屏,STM32没法直接驱动,得加驱动器。DCLK是像素时钟。高压得你自己做电路产生。
其他的,看数据手册了。
我的淘宝小店:
主题帖子精华
初级会员, 积分 66, 距离下一级还需 134 积分
在线时间0 小时
回复【2楼】正点原子:
---------------------------------
谢谢原子哥,你说的驱动器是什么啊,如果我加了个高压电路,其他的还需要什么呢,可不可以直接用STM32的D0-D15直接连数据线了呢
主题帖子精华
在线时间46 小时
你这样是驱动不了的
得加ssd1963之类的驱动器。你百度下吧。
我的淘宝小店:
Powered by当前访客身份:游客 [
当前位置:
package com.example.
import java.util.A
import bsh.EvalE
import bsh.I
import android.os.B
import android.app.A
import android.view.V
import android.view.View.OnClickL
import android.widget.B
import android.widget.EditT
public class CalculatorActivity extends Activity implements OnClickListener{
EditText rsText =
boolean isClear = //用于记录依稀
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.calculator);
//fun 功能按钮
rsText = (EditText)findViewById(R.id.rsText);
Button btnDel = (Button)findViewById(R.id.delete);
Button btnPlu = (Button)findViewById(R.id.plus);
Button btnMin = (Button)findViewById(R.id.minus);
Button btnMul = (Button)findViewById(R.id.multiply);
Button btnDiv = (Button)findViewById(R.id.division);
Button btnEqu = (Button)findViewById(R.id.equ);
Button btnTono = (Button)findViewById(R.id.tonone);
Button btnLeft = (Button)findViewById(R.id.left);
Button btnRight = (Button)findViewById(R.id.right);
//num 数字按钮
Button num0 = (Button)findViewById(R.id.num0);
Button num1 = (Button)findViewById(R.id.num1);
Button num2 = (Button)findViewById(R.id.num2);
Button num3 = (Button)findViewById(R.id.num3);
Button num4 = (Button)findViewById(R.id.num4);
Button num5 = (Button)findViewById(R.id.num5);
Button num6 = (Button)findViewById(R.id.num6);
Button num7 = (Button)findViewById(R.id.num7);
Button num8 = (Button)findViewById(R.id.num8);
Button num9 = (Button)findViewById(R.id.num9);
Button dot = (Button)findViewById(R.id.dot);
//listener
btnTono.setOnClickListener(this);
btnLeft.setOnClickListener(this);
btnRight.setOnClickListener(this);
btnDel.setOnClickListener(this);
btnPlu.setOnClickListener(this);
btnMin.setOnClickListener(this);
btnMul.setOnClickListener(this);
btnDiv.setOnClickListener(this);
btnEqu.setOnClickListener(this);
num0.setOnClickListener(this);
num1.setOnClickListener(this);
num2.setOnClickListener(this);
num3.setOnClickListener(this);
num4.setOnClickListener(this);
num5.setOnClickListener(this);
num6.setOnClickListener(this);
num7.setOnClickListener(this);
num8.setOnClickListener(this);
num9.setOnClickListener(this);
dot.setOnClickListener(this);
public void onClick(View e) {
Button btn = (Button)e;
String exp = rsText.getText().toString();//获取一个视图View对象里的字符串
if(isClear &&(
btn.getText().equals(&0&)
//判断获取的字符串是否是0
||btn.getText().equals(&1&)
||btn.getText().equals(&2&)
||btn.getText().equals(&3&)
||btn.getText().equals(&4&)
||btn.getText().equals(&5&)
||btn.getText().equals(&6&)
||btn.getText().equals(&7&)
||btn.getText().equals(&8&)
||btn.getText().equals(&9&)
||btn.getText().equals(&.&))
||btn.getText().equals(&算数公式错误&)){
rsText.setText(&&);
if(btn.getText().equals(&C&)){
rsText.setText(&&);
}else if(btn.getText().equals(&清除&)){
if(exp==null || exp.trim().length()==0) //trim()去掉字符串头尾的空格
rsText.setText(exp.substring(0, exp.length()-1));//返回一个从0到exp.length()-1的字符串
}else if(btn.getText().equals(&=&)){
if(exp==null || exp.trim().length()==0)
exp = exp.replaceAll(&&&, &*&);
//替换符号
exp = exp.replaceAll(&&&, &/&);
exp = getRs(exp);
if(exp.endsWith(&.0&)){
exp = exp.substring(0, exp.indexOf(&.0&));//indexOf()返回 String 对象内第一次出现子字符串的字符位置
rsText.setText(exp);
rsText.setText(rsText.getText()+&&+btn.getText());
//按键完成后始终保持光标在最后一位
rsText.setSelection(rsText.getText().length());
exp 算数表达式
* @return 根据表达式返回结果
private String getRs(String exp){
Interpreter bsh = new Interpreter();
Number result =
exp = filterExp(exp);
result = (Number)bsh.eval(exp);
//这个也不太懂什么意思……
} catch (EvalError e) {
e.printStackTrace();
//打印在控制台上
return &算数公式错误&;
return result.doubleValue()+&&;
* @param exp 算数表达式
* @return 因为计算过程中,全程需要有小数参与.
private String filterExp(String exp) {
String num[] = exp.split(&&);
//将一个字符串分割为子字符串,然后将结果作为字符串数组返回
String temp =
int begin=0,end=0;
for (int i = 1; i & num. i++) {
temp = num[i];
if(temp.matches(&[+-/()*]&)){
//判断字符是否与指定的 正则表达式 相匹配
if(temp.equals(&.&))
//判断是否相等
end = i - 1;
temp = exp.substring(begin, end);
if(temp.trim().length() & 0 && temp.indexOf(&.&)&0)
num[i-1] = num[i-1]+&.0&;
begin = end + 1;
return Arrays.toString(num).replaceAll(&[\\[\\], ]&, &&);
filterExp函数时做什么用的看不懂,求助,谢谢!
共有5个答案
<span class="a_vote_num" id="a_vote_num_
遇到小数,比如 5+2.4 就转换为 5.0+2.4
目的是保持类型统一
--- 共有 3 条评论 ---
百度解决了嘿,打扰啦,Thank you~
(3年前)&nbsp&
不好意思再问个问题嘿,127行 bsh.eval(exp)返回的值是什么类型的呀,是想进行浮点数精度的处理,想通过把数值保留几位小数来处理,但是找了网上的方法好像都是处理double型的,谢谢您!
result = result.doubleValue();这个可以把result转换成double型吗?好像用了还是不行……
嘿嘿,我也是福建的哈泉州
(3年前)&nbsp&
哦哦,懂了,太谢谢了~
(3年前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
private String getRs(String exp){
exp = filterExp(exp);
result = eval(exp);
BigDecimal b = new BigDecimal(result);
//四舍五入,保留十位小数.
int saveBitNum = 10;
result = b.setScale(saveBitNum , BigDecimal.ROUND_HALF_UP).doubleValue();
} catch (EvalError e) {
e.printStackTrace();
//打印在控制台上
return &算数公式错误&;
return result+&&;
private static double eval(String expression) throws EvalError {
Interpreter bsh = new Interpreter();
Number result = (Number)bsh.eval(expression);
//返回表达式的结果
return result.doubleValue();
改成这样解决精度问题……有点假,保留十位小数……
<span class="a_vote_num" id="a_vote_num_
我勒个草,这个不是我的计算器么。
--- 共有 2 条评论 ---
133行也完全不知道神马意思?
return result.doubleValue()+"";
(2年前)&nbsp&
小龟大神,请问第156行的内容是什么意思啊?完全不懂,到底是用什么替换成什么?
return Arrays.toString(num).replaceAll("[\\[\\], ]", "");
(2年前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
你怎么不问我原作者呢。
--- 共有 1 条评论 ---
好吧我错了……我忘了是哪里下的啦嘿嘿,不好意思哈,下了好多个然后挑个简单的看……
(3年前)&nbsp&
<span class="a_vote_num" id="a_vote_num_
这代码写的够搓的!!
--- 共有 2 条评论 ---
为什么呀…这个代码短一些看着简单一些…好吧我是小菜…
(3年前)&nbsp&
你楼上的小龟写的
(3年前)&nbsp&
更多开发者职位上
有什么技术问题吗?
尼克FD的其它问题
类似的话题谢谢医生很详细的答案!那眼角的地方红血丝尾部还有一条长长的灰色的是什么原因啊、要紧不
您好:如果平时眼睛没有什么不舒服的地方,一般没什么影响,可抽空去医院检查一下。祝您健康快乐!
好的,谢谢您
您好,不谢,祝健康。
相似问答推荐
您可能关注的推广
护士家园推荐文章
Copyright & 2011 粤ICP备号-3 
提示:本网站旨在提供医患咨询互动服务,信息仅供参考,不能作为诊断及医疗的依据,医生门诊时间也请最终以医院当日公布为准。
网友、医生言论仅代表其个人观点,不代表本站同意其说法,请谨慎参阅,本站不承担由此引起的法律责任。射手女女真的准备不原谅我了吗?她发的状态又是什么意思?求指点谢谢!
该帖被浏览& 3,301&次,回复&6&次
我和一个女同事本来关系很好。我心情不好时她会一天询问好几次、晚上陪聊,我被客户说坏话的时候她会帮我说好话,她和我上班也经常在开开玩笑,打打闹闹的。上星期一天,本来心情就不好,然后她和另一同事开我玩笑开大了,我当时很生气。然后一气之下干脆就不和她们独自坐一辆车回去了,没坐班车,她连着给我打几个电话我都拒接,微信朋友圈上公开道歉了我也不鸟她,(我承认当时气过头了,也不够大气,面壁思过)。第二天上班也是一扑克脸,脸紧绷着,对她很冷、后来等我冷静下来了以后,反过来和她道歉,但是她一点也不鸟我了,现在基本不和我说话,看到我眼睛都不看一下,就连每天都吃的零食给她也不要了。
我道歉了以后,那天晚上她朋友圈就说了这样的话:今天看到一节目,很感动也很心酸。妻子终于原谅了出轨的丈夫,妻子太爱丈夫所以难以原谅,所以这份原谅太沉重,这份妥协太痛苦。所以要原谅一个人,真的太难太难,我想我是真的做不到。。。
她单身没有对象,同时这条状态发生在我道歉后的当晚,多数说的就是我,楼主大大,难道我们没有和好的机会了吗,能不能分析下她现在的心里状况?
分享到:&&
你真傻呀,既然当初很生气没理她,做得那么绝,连朋友圈道歉都不接受(此举已经让射手女丢了面子,她心里想既然做到这一步份上了,你都不接受原谅,那就算了,所以冷了),为嘛冷静下来又要向她道歉呢(射手女会认为那么诚心让你原谅,你不原谅,现在不想理你了,你又跑过来道歉,有点犯抽吧)?
就算后来你冷静下来了,你也要继续装酷,等过一段时间射手女淡忘丢面子这回事,你再找个时机靠近她,找个适题谈谈,误会不就解除掉了吗?
她只把你兄弟。兄弟。
我不喜欢你这样的男人,开不起玩笑,还不怎么宽容,都那样道歉了还不给台阶下,是我也不想做你的朋友。
回复1楼&lixiandao0116&&的帖子
像你这样开不起玩笑,又不给别人台阶下的人不是射手女的菜.过一阵子,射手女可能还是会和你说话,但是她肯定已经把你从恋人发展名单里删除了,最多做个好朋友了.她会减少和你接触的机会的.
回复1楼&#160;lixiandao;&#160;的帖子
你是不是男人,真弱智,还和好你以为小孩子过家家吗
看着很难了
对不起,不和匿名者聊天的。
填写显示名:
4到16个字符:中文,英文小写字母,数字或下划线
电话:  欢迎批评指正
Copyright &
SINA Corporation, All Rights Reserved
新浪公司 

我要回帖

更多关于 求助大神这是什么歌 的文章

 

随机推荐