搜索
bottom↓
回复: 1

用ATF16V8B写的一个步进电机驱动,可是模拟出来一条水平线,帮看看。

[复制链接]

出0入0汤圆

发表于 2007-11-23 09:31:18 | 显示全部楼层 |阅读模式
大家帮看看有什么问题,我是新手大家多包涵。

Name      stepper;
Partno    CA0018;
Date      12/19/99;
Revision  02;
Designer  Kahl;
Company   Logical Devices, Inc.;
Assembly  None;
Location  None;
Device    g16v8a;

/**  Inputs  **/

Pin 1        = clk;             /* Counter clock                */
Pin 2        = dir;             /* Counter clear input          */
Pin 11       = !oe;             /* Register output enable       */

/**  Outputs  **/

Pin [14..17] = [Q3..0];         /* Counter outputs              */

/** Declarations and Intermediate Variable Definitions **/

field count = [Q3..0];          /* declare counter bit field */

$define S0 'b'1110                        /* define counter states */
$define S1 'b'1100
$define S2 'b'1101
$define S3 'b'1001
$define S4 'b'1011
$define S5 'b'0011
$define S6 'b'0111
$define S7 'b'0110

$define up 'b'1
$define down 'b'0


/** Logic Equations **/

Sequenced count {                       /* free running counter */

present S0      if up           next S1;
                if down         next S7;

present S1      if up           next S2;
                if down         next S0;

present S2      if up           next S3;
                if down         next S1;

present S3      if up           next S4;
                if down         next S2;

present S4      if up           next S5;
                if down         next S3;

present S5      if up           next S6;
                if down         next S4;

present S6      if up           next S7;
                if down         next S5;

present S7      if up           next S0;
                if down         next S6;
}

阿莫论坛20周年了!感谢大家的支持与爱护!!

知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)

出0入0汤圆

 楼主| 发表于 2007-11-24 16:50:25 | 显示全部楼层
汗,就没有一个好心人?
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-7-24 03:21

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

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