搜索
bottom↓
回复: 20

麻烦做过USR-Blaster的高手看看这个原理图能行否。

[复制链接]

出0入0汤圆

发表于 2009-7-14 09:58:29 | 显示全部楼层 |阅读模式
99格式文件
点击此处下载 ourdev_461159.rar(文件大小:55K) (原文件名:MYBLASTER-99.rar)

AD格式文件
点击此处下载 ourdev_461160.rar(文件大小:366K) (原文件名:MYBLASTER-AD.rar)


(原文件名:USBBLASTER.jpg)

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

曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……

出0入0汤圆

 楼主| 发表于 2009-7-14 10:33:51 | 显示全部楼层
点击此处下载 ourdev_461185.pdf(文件大小:1.20M) (原文件名:MYBLASTER.pdf)

出0入0汤圆

 楼主| 发表于 2009-7-14 19:03:54 | 显示全部楼层
浮一下

出0入0汤圆

 楼主| 发表于 2009-7-14 22:34:09 | 显示全部楼层
咋没人回呢,睡前顶起

出0入0汤圆

发表于 2009-7-14 23:37:50 | 显示全部楼层
基本原理图都差不多,关键是写入cpld的文件和写入eeprom的文件是否对应

出0入0汤圆

发表于 2009-7-14 23:38:49 | 显示全部楼层
不知道楼主有相应的烧写文件么?是RevB还是RevC的

出0入0汤圆

 楼主| 发表于 2009-7-15 09:13:36 | 显示全部楼层
刚学,听说CPLD管脚随便连接,只要先定义,RevB还是RevC未知,想先做出板来试,所以叫大家帮看看行得通不

出0入0汤圆

 楼主| 发表于 2009-7-15 09:15:31 | 显示全部楼层
Altium 中的3D板图

(原文件名:BPCB.jpg)

出0入0汤圆

发表于 2009-7-15 09:57:53 | 显示全部楼层
你能把你的少些文件传上来吗?不管是RevB还是RevC的。

出0入0汤圆

 楼主| 发表于 2009-7-15 10:08:15 | 显示全部楼层
原理图和PCB图在顶楼啊,CPLD文件这坛里搜

出0入0汤圆

发表于 2009-7-15 16:20:55 | 显示全部楼层
楼主没明白我的意思,cpld的管脚是可以随便定义但是程序里有一些特殊设置可能与你的原理图不匹配,比如说有些用的24M的晶振有的是12M的,对应的烧写程序就要有改动,并不是任意拿个别人的程序就能用的

出0入0汤圆

 楼主| 发表于 2009-7-15 17:55:21 | 显示全部楼层
谢LS,我意思是烧写程序可以更改(按这个图编译)的前提下,这个原理图可以做成么?

出0入0汤圆

 楼主| 发表于 2009-7-15 19:11:37 | 显示全部楼层
8楼】 quray
积分:184
派别:
等级:------
来自:
你能把你的少些文件传上来吗?不管是RevB还是RevC的。  
__________________________

现在看明白了:  少些=烧写 ,呵呵

出0入0汤圆

发表于 2009-7-15 19:42:48 | 显示全部楼层
这个BLASTER的原理图有点怪异,用了一片244又用16245不知道意义何在,我认为楼主可以再论坛找一下以前发过的帖子

出0入0汤圆

 楼主| 发表于 2009-7-15 20:06:18 | 显示全部楼层
2选一么,只用一种。以前发过的帖子看了

出0入0汤圆

发表于 2009-7-15 20:18:02 | 显示全部楼层
明白了,电源也是二选一,而且接口也是USB与并口二选一,不过觉得没啥必要,要论硬件原理的话应该差不多,只要FT245RL的外围电路对就差不多了,关键还是烧写程序要与原理图对应

出0入0汤圆

 楼主| 发表于 2009-7-15 21:25:29 | 显示全部楼层
外接电源是方便给目标板供电,并口是为了烧写CPLD,没有蛋哪有鸡,2个JTAG输出是主要是用164245,如果没有用244,毕竟244容易搞到。

看样子是可行了,研究固件了。

出0入0汤圆

 楼主| 发表于 2009-7-15 21:36:27 | 显示全部楼层
回来 谢谢 wxbr

出0入0汤圆

发表于 2009-7-15 22:03:11 | 显示全部楼层
我的用的是ft245rl,在用nios的时候虽然能用,但总报不支持nios这样的警告,看着很不爽,不知道哪位大侠能解决这个问题啊。

出0入0汤圆

 楼主| 发表于 2009-7-20 21:43:34 | 显示全部楼层
CPLD描述改为Verilog HDL:(有不对的么?)

//-----------------------------------------------------------------------------
// Serial/Parallel converter, interfacing JTAG chain with FTDI FT245BM
//-----------------------------------------------------------------------------
// Copyright (C) 2005-2007 Kolja Waschk, ixo.de
//-----------------------------------------------------------------------------
// This code is part of usbjtag. usbjtag is free software; you can redistribute
// it and/or modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the License,
// or (at your option) any later version. usbjtag is distributed in the hope
// that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.  You should have received a
// copy of the GNU General Public License along with this program in the file
// COPYING; if not, write to the Free Software Foundation, Inc., 51 Franklin
// St, Fifth Floor, Boston, MA  02110-1301  USA
//-----------------------------------------------------------------------------

//LIBRARY ieee;
//USE ieee.std_logic_1164.all;
//USE ieee.std_logic_unsigned.all;

//-----------------------------------------------------------------------------
//Verilog HDL Version.
//Converted by helloshi
//Interfacing JTAG chain with FTDI FT245RL and EPM240T100C5

module jtag_logic(CLK,nRXF,nTXE,B_TDO,B_ASDO,B_TCK,B_TMS,B_NCE,B_NCS,B_TDI,B_OE,nRD,WR,D);

        input CLK ;        // external 24/25 MHz oscillator
        input nRXF ;       // FT245RL nRXF
        input nTXE ;       // FT245RL nTXE
        input B_TDO  ;     // JTAG input: TDO, AS/PS input: CONF_DONE
        input B_ASDO ;     // AS input: DATAOUT, PS input: nSTATUS
        output reg B_TCK ; // JTAG output: TCK to chain, AS/PS DCLK
        output reg B_TMS ; // JTAG output: TMS to chain, AS/PS nCONFIG
        output reg B_NCE ; // AS output: nCE
        output reg B_NCS ; // AS output: nCS
        output reg B_TDI ; // JTAG output: TDI to chain, AS: ASDI, PS: DATA0
        output reg B_OE  ; // LED output/output driver enable
        output reg nRD ;   // FT245RL nRD
        output reg WR ;    // FT245RL WR
        inout  reg [7:0]D; // FT245RL D[7..0]


        // There are exactly 16 states. If this is encoded using 4 bits, there will
        // be no unknown/undefined state. The host will send us 64 times "0" to move
        // the state machine to a known state. We don't need a power-on reset.
       
        parameter   // states;
                wait_for_nRXF_low          = 4'b0000,
                set_nRD_low                = 4'b0001,
                keep_nRD_low               = 4'b0010,
                latch_data_from_host       = 4'b0011,
                set_nRD_high               = 4'b0100,
                bits_set_pins_from_data    = 4'b0101,
                bytes_set_bitcount         = 4'b0110,
                bytes_get_tdo_set_tdi      = 4'b0111,
                bytes_clock_high_and_shift = 4'b1000,
                bytes_keep_clock_high      = 4'b1001,
                bytes_clock_finish         = 4'b1010,
                wait_for_nTXE_low          = 4'b1011,
                set_WR_high                = 4'b1100,
                output_enable              = 4'b1101,
                set_WR_low                 = 4'b1110,
                output_disable             = 4'b1111;
                                        
        reg carry;
        reg do_output;
        reg [7:0]ioshifter;
        reg [8:0]bitcount;
        reg [4:0]state, next_state; // states;
       
        always @(CLK, nRXF, nTXE, state, bitcount, ioshifter, do_output) //sm: PROCESS

        begin
                case (state)
               
                        // ============================ INPUT
               
                        wait_for_nRXF_low :
                                if (nRXF == 1'b0)
                                        next_state <= set_nRD_low;
                                else
                                        next_state <= wait_for_nRXF_low;
                               
                        set_nRD_low :
                                next_state <= keep_nRD_low;
                       
                        keep_nRD_low :
                                next_state <= latch_data_from_host;
                               
                        latch_data_from_host :
                                next_state <= set_nRD_high;
                       
                        set_nRD_high :
                                if (bitcount[8:3] != 6'b000000)
                                        next_state <= bytes_get_tdo_set_tdi;
                                else if (ioshifter[7] == 1'b1)
                                        next_state <= bytes_set_bitcount;
                                else
                                        next_state <= bits_set_pins_from_data;
                       
                        bytes_set_bitcount :
                                next_state <= wait_for_nRXF_low;
                       
                        // ============================ BIT BANGING
                               
                        bits_set_pins_from_data :
                                if (ioshifter[6] == 1'b0)
                                        next_state <= wait_for_nRXF_low; // read next byte from host
                                else
                                        next_state <= wait_for_nTXE_low; // output byte to host
                               
                        // ============================ BYTE OUTPUT (SHIFT OUT 8 BITS)
                       
                        bytes_get_tdo_set_tdi :
                                next_state <= bytes_clock_high_and_shift;
                       
                        bytes_clock_high_and_shift :
                                next_state <= bytes_keep_clock_high;
                               
                        bytes_keep_clock_high :
                                next_state <= bytes_clock_finish;
                               
                        bytes_clock_finish :
                                if (bitcount[2:0] != 3'b111)
                                        next_state <= bytes_get_tdo_set_tdi; // clock next bit
                                else if (do_output == 1'b1)
                                        next_state <= wait_for_nTXE_low; // output byte to host
                                else
                                        next_state <= wait_for_nRXF_low; // read next byte from host
                       
                        // ============================ OUTPUT BYTE TO HOST
                       
                        wait_for_nTXE_low :
                                if (nTXE == 1'b0)
                                        next_state <= set_WR_high;
                                else
                                        next_state <= wait_for_nTXE_low;
                               
                        set_WR_high :
                                next_state <= output_enable;
                               
                        output_enable :
                                next_state <= set_WR_low;
                               
                        set_WR_low :
                                next_state <= output_disable;
                       
                        output_disable :
                                next_state <= wait_for_nRXF_low; // read next byte from host
                               
                        default :
                                next_state <= wait_for_nRXF_low;
                               
                endcase
        end // PROCESS sm;

        //always @(posedge CLK, state, ioshifter, B_TDO, bitcount, carry) //out_sm: PROCESS
        always @(posedge CLK) //out_sm: PROCESS

        begin
                //if CLK = '1' AND CLK'event THEN
                       
                        if (state == set_nRD_low || state == keep_nRD_low || state == latch_data_from_host )
                                nRD <= 1'b0;
                        else
                                nRD <= 1'b1;
                       
                        if (state == latch_data_from_host)
                                ioshifter[7:0] <= D;
                       
                        if (state == set_WR_high || state == output_enable)
                                WR <= 1'b1;
                        else
                                WR <= 1'b0;
                       
                        if (state == output_enable || state == set_WR_low )
                                D[7:0] <= ioshifter[7:0];
                        else
                                D[7:0] <= 8'bzzzzzzzz;       
                       
                        if (state == bits_set_pins_from_data )
                        begin
                                B_TCK <= ioshifter[0];
                                B_TMS <= ioshifter[1];
                                B_NCE <= ioshifter[2];
                                B_NCS <= ioshifter[3];
                                B_TDI <= ioshifter[4];
                                B_OE  <= ioshifter[5];
                                ioshifter <= {6'b000000 , B_ASDO , B_TDO};
                        end
                       
                        if (state == bytes_set_bitcount )
                        begin
                                bitcount <= {ioshifter[5:0] , 3'b111};
                                do_output <= ioshifter[6];
                        end
                       
                        if (state == bytes_get_tdo_set_tdi )
                        begin
                                if (B_NCS == 1'b1)
                                        carry <= B_TDO; // JTAG mode (nCS=1)
                                else
                                        carry <= B_ASDO; // Active Serial mode (nCS=0)
                                B_TDI <= ioshifter[0];
                                bitcount <= bitcount - 9'b000000001;
                        end
                       
                        if (state == bytes_clock_high_and_shift || state == bytes_keep_clock_high )
                                B_TCK <= 1'b1;
                       
                        if (state == bytes_clock_high_and_shift )
                                ioshifter <= {carry , ioshifter[7:1]};
                       
                        if (state == bytes_clock_finish )
                                B_TCK <= 1'b0;
               
                        state <= next_state;
                       
        end
endmodule
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-6-1 09:31

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

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