搜索
bottom↓
回复: 13

好资料:软USB之CDC-232、CDC-IO、CDC-SPI

[复制链接]

出0入0汤圆

发表于 2012-8-10 20:28:33 | 显示全部楼层 |阅读模式
本帖最后由 BXAK 于 2012-8-10 20:30 编辑







SUMMARY
=======
    The CDC-232 performs the CDC (Communication Device Class) connection over
    low-speed USB. It provides the RS-232C interface through virtual COM
    port. The AVR-CDC is originally developed by Osamu Tamura.
    Akira Kitazawa has significantly contributed to improve this software.


SPECIFICATION
=============
    AVR-CDC with USART (ATmega8/48/88/168)
        speed:     600 - 38400bps
        datasize: 5-8
        parity:   none/even/odd
        stopbit:  1/2
        controls: DTR, RTS, CTS

    AVR-CDC with USART (ATtiny2313)
        speed:     600 - 38400bps
        datasize: 8
        parity:   none
        stopbit:  1

    AVR-CDC without USART (ATtiny45/85)
        speed:    1200 -  4800bps
        datasize: 8
        parity:   none
        stopbit:  1
        supply current: 8-15mA

    The RTS indicates that the receive buffer is not full, and the CTS stops
    sending data at '0' input. These controls cannot be controlled/read by the
    host PC (ATmega).

    Internal RC Oscillator is calibrated at startup time on ATtiny45/85.
    When the other low speed device is connected under the same host
    controller, the ATtiny45/85 may fail to be recognized by the downstream
    broadcast packet.

    Although the CDC protocol is supported by Windows 2000/XP/(Vista/7), Mac
    OS 9.1/X, and Linux 2.4 or 2.6.31-, low-speed bulk transfer is not allowed
    by the USB standard. Use CDC-232 at your own risk.


USAGE
=====
    [Windows XP/2000/Vista/7]
    Download "avrcdc_inf.zip" and read the instruction carefully.

    [Mac OS X]
    You'll see the device /dev/cu.usbmodem***.

    [Linux]
    The device will be /dev/ttyACM*.
    Linux <2.6.31 does not accept low-speed CDC without patching the kernel.
    Replace the kernel to 2.6.31 or higher.


DEVELOPMENT
===========
    Build your circuit and write firmware (cdcmega*.hex/cdctiny*.hex) into it.
    C1:104 means 0.1uF, R3:1K5 means 1.5K ohms.

    This firmware has been developed on AVR Studio 4.18 and WinAVR 20100110.
    If you couldn't invoke the project from cdc*.aps, create new GCC project
    named "at***" under "cdc232.****-**-**/" without creating initial file.
    Select each "default/Makefile" at "Configuration Options" menu.

    There are several options you can configure in
    "Project/Configuration Options" menu, or in Makefile

    (General)
    Device      Select MCU type.   
    Frequency   Select clock. 16.5MHz is the internal RC oscillator.
                (ATtiny45/85)
                3.3V Vcc may not be enough for the higher clock operation.

    (Custom Options) add -D*** to select options below.
    UART_INVERT Reverse the polarity of TXD and RXD to connect to RS-232C
                directly (ATtiny45/85).
                Enables software-inverters (PC0 -|>o- PB0, PC1 -|>o- PB1).
                Connect RXD to PB0 and TXD to PC1. The baudrate should be
                <=2400bps (ATmega48/88/168).

    Rebuild all the codes after modifying Makefile.

    Fuse bits
                          ext  H-L
        ATtiny2313         FF CD-FF
        ATtiny45/85        FF CE-F1
        ATtiny45/85(Xtal)  FF 6E-FF / FF 6E-F1 (PLL)
        ATmega8               8F-FF
        ATmega48/88/168    FF CE-FF

        SPIEN=0, WDTON=0, CKOPT(mega8)=0,
        Crystal: Ex.8MHz/PLL(45,461), BOD: 1.8-2.7V

    * Detach the ISP programmer before restarting the device.

    The code size of AVR-CDC is 2-3KB, and 128B RAM is required at least.


USING AVR-CDC FOR FREE
======================
    The AVR-CDC is published under an Open Source compliant license.
    See the file "License.txt" for details.

    You may use this driver in a form as it is. However, if you want to
    distribute a system with your vendor name, modify these files and recompile
    them;
        1. Vendor String in usbconfig.h
        2. COMPANY and MFGNAME strings in avrcdc.inf/lowbulk.inf

CDC-232、CDC-IO、CDC-SPI源代码 及 Driver 直接到原网下载
转自原网:http://www.recursion.jp/avrcdc/

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

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

月入3000的是反美的。收入3万是亲美的。收入30万是移民美国的。收入300万是取得绿卡后回国,教唆那些3000来反美的!

出0入0汤圆

发表于 2013-1-6 16:01:29 | 显示全部楼层
挺好的,大家好象不喜欢,可惜了

出0入0汤圆

发表于 2013-2-6 18:40:25 | 显示全部楼层
怎么移植啊。自己编译总是不能用。Orz

出0入0汤圆

发表于 2013-2-6 19:06:25 | 显示全部楼层
我的内核貌似不支持low speed device bulk

出0入0汤圆

发表于 2013-2-8 17:12:19 | 显示全部楼层
发送是没问题了。但是貌似接收的时候那个该死的usbInterrupt就是不就绪

出0入0汤圆

发表于 2013-2-8 17:52:21 | 显示全部楼层
VUSB 挺有意思的!用软件做 USB!

出0入0汤圆

发表于 2013-2-8 18:25:18 | 显示全部楼层
eriks626 发表于 2013-2-8 17:52
VUSB 挺有意思的!用软件做 USB!

做bulk-in/bulk-out就不行了。很多的hub和操作系统都会ban掉

出0入0汤圆

发表于 2013-2-8 19:31:36 | 显示全部楼层
蛮好的,更好的学习USB

出0入0汤圆

发表于 2013-2-8 20:46:13 | 显示全部楼层
早就做过,但总是没有专用的USB芯片好

出0入0汤圆

发表于 2013-2-16 17:02:26 | 显示全部楼层
Thanks you!!

出0入0汤圆

发表于 2013-2-16 20:13:20 | 显示全部楼层
软USB没意义,支持usb的单片机C8051F320也才10元左右,费这个劲没必要

出0入0汤圆

发表于 2013-5-24 16:36:28 | 显示全部楼层
请问有人成功移植用在PIC 晶片吗?

出0入0汤圆

发表于 2013-5-30 22:31:28 | 显示全部楼层
谢谢楼主的分享的资料,支持!

出0入0汤圆

发表于 2013-5-30 23:03:10 来自手机 | 显示全部楼层
Mark…
来自:amoBBS 阿莫电子论坛 Windows Phone 7 客户端
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-27 06:02

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

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