一乐电子

一乐电子百科

 找回密码
 请使用微信账号登录和注册会员

QQ登录

只需一步,快速开始

快捷登录

手机号码,快捷登录

搜索
楼主: 无锡风
收起左侧

M8 数控电源 测试版

  [复制链接]
发表于 2009-5-30 12:45 | 显示全部楼层
那位老师能把电源和PC的通信讲解下,写一个上位软件就好了
发表于 2009-5-30 14:34 | 显示全部楼层
原帖由 g54188 于 2009-5-30 12:45 发表 https://www.yleee.com.cn/images/common/back.gif
那位老师能把电源和PC的通信讲解下,写一个上位软件就好了

试了下PC通信,没问题
RS232接口,软件在\i2c-comm\other_OS\win\ 里面,可以通过PC设置最大电流,电压的设置

readme里面有讲

I2C commands for the DC power supply:
=====================================
# set Imax to 0.20A:
i2ctalk i=20
# get current I value:
i2ctalk i
# store current settings
i2ctalk s
# set Umax to 2.1V:
i2ctalk u=21# get current voltage value:
i2ctalk u
发表于 2009-5-30 18:14 | 显示全部楼层
原帖由 jbzzz 于 2009-5-30 14:34 发表 https://www.yleee.com.cn/images/common/back.gif

试了下PC通信,没问题
RS232接口,软件在\i2c-comm\other_OS\win\ 里面,可以通过PC设置最大电流,电压的设置

readme里面有讲

I2C commands for the DC power supply:
================================== ...

对这个不懂,请问下上位机软件用什么编译呢?谢谢!!!
发表于 2009-5-30 20:09 | 显示全部楼层
编译?不会啊
直接命令行操作的
发表于 2009-5-30 20:54 | 显示全部楼层
完整说明:
This is the I2C communication software for
I2C communication over RS232.

This directory contains the linux source code. The subdirectory
linux_pre has a pre-compiled binary.

The software is also available for Windows (dos command line
utility), MacOS and Solaris. For details and pre-compiled
binaries see subdirectory other_OS.
Only windows requires a slightly modified source code. Mac and
Solaris can use the Linux source code.

i2c_rs232_pintest is a program to test the RS232 pins used for
the purpose of the I2C communication.

If you do not have anymore a RS232 port then just use a PL2303
(or similar) USB to rs232 connector.




I2C commands for the DC power supply:
=====================================

# set Imax to 0.20A:
i2ctalk i=20
# get current I value:
i2ctalk i
# store current settings
i2ctalk s
# set Umax to 2.1V:
i2ctalk u=21
# get current voltage value:
i2ctalk u

-------------------------------------------------
All software is copyright GPL V2.
Author: Guido Socher
发表于 2009-5-31 00:30 | 显示全部楼层
原帖由 无锡风 于 2009-5-30 10:45 发表 https://www.yleee.com.cn/images/common/back.gif


居然(在8M熔丝位)有这么大的交流电压值?
而且,居然(其他没有任何改变)仅仅是“改刷成4MHz”,就“测不出交流电压”?
怎么样分析之?


我觉得可能还是M8本身的AD硬件的限制造成的吧,请看作者在源程序中的这段注释:
       /* enable analog to digital conversion in free run mode
        *  without noise canceler function. See datasheet of atmega8 page 195
        * We set ADPS2=1,ADPS1=0,ADPS0=1 to have a clock division factor of 32.
        * This is needed to stay in the recommended range of 50-200kHz
        * ADEN: Analog Digital Converter Enable
        * ADIE: ADC Interrupt Enable
        * ADIF: ADC Interrupt Flag
        * ADFR: ADC Free Running Mode
        * ADCSR: ADC Control and Status Register
        * ADPS2..ADPS0: ADC Prescaler Select Bits
  * REFS: Reference Selection Bits (page 203)
        */
我估计这也是作者为什么使用4MHz的原因
发表于 2009-5-31 00:35 | 显示全部楼层
原帖由 g54188 于 2009-5-30 12:02 发表 https://www.yleee.com.cn/images/common/back.gif

我这里改为500,负载电流大于2.5A(2.70A)就无输出了,改成800就正常了,按照FAT兄说的800表示8A,那么500就应该是5A了,为什么在2.5A就保护了呢?不明白了


请问是使用我改过的程序吗?如果是,我的短路保护使用了两个条件:1、电流>设定的短路电流值,就是您上面说的500这里,2、电流>键盘设定值的3倍。两个条件满足其一,就进入短路保护状态。因此,如果您设定的电流值是900mA以下,而负载刚接上只要>2.7A就保护了。
发表于 2009-5-31 00:39 | 显示全部楼层
原帖由 g54188 于 2009-5-30 12:45 发表 https://www.yleee.com.cn/images/common/back.gif
那位老师能把电源和PC的通信讲解下,写一个上位软件就好了


上位机软件好象作者也提供了,在程序包里的
\i2c-comm\other_OS\win目录下,I2ctalk.exe
 楼主| 发表于 2009-5-31 06:53 | 显示全部楼层
原帖由 fat 于 2009-5-31 00:30 发表 https://www.yleee.com.cn/images/common/back.gif
我觉得可能还是M8本身的AD硬件的限制造成的吧,请看作者在源程序中的这段注释:
       /* enable analog to digital conversion in free run mode
        *  without noise canceler function. See datashee ...


附上M8的中文资料
 楼主| 发表于 2009-5-31 07:07 | 显示全部楼层
原帖由 无锡风 于 2009-5-31 06:53 发表 https://www.yleee.com.cn/images/common/back.gif
附上M8的中文资料


刚刚超出2M的文件大小,无法上传。

本版积分规则

QQ|一淘宝店|手机版|商店|电子DIY套件|一乐电子 ( 粤ICP备09076165号 ) 公安备案粤公网安备 44522102000183号

GMT+8, 2025-5-1 00:27 , Processed in 0.047385 second(s), 30 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表