USB和串口微控制器编程 [英] USB and serial ports Microcontroller programing

查看:119
本文介绍了USB和串口微控制器编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好每个人,我是使用C#,C,C ++和Java进行桌面编程的中间程序员,我开始使用微控制器PIC18f2550开发一个新项目。

I为Windows和Linux编写了设备驱动程序,但我不能开始编程微控制器,因为它应该发送USB描述符。问题不在于描述符本身,而在于如何发送它我必须使用双向USB连接设备,尽管微型和任何其他Microchip(PIC)微控制器中只有一个USB接口。我将一个插孔与USB端口接口引脚(RC5 / D +)(RC4 / D-)连接,另一个插孔与串行端口接口引脚(RC7 / RX)(RC6 / TX)连接。

现在我的问题是: 如何通过USB接口引脚和串口发送该描述符?

Hello Everybody,I''m an intermediate programer in Desktop programing using C#,C,C++ and java and I started a new project with microcontroller PIC18f2550.
I Programed the device driver for windows and linux but I can''t start programing the microcontroller as it should send the USB descriptor. The problem is not in the descriptor itself but in how to send it I have to connect the device with two way USB although there is only one USB interface in that micro and anyother Microchip(PIC) microcontrollers. I connected one jack with the USB ports interface pins (RC5/D+)(RC4/D-) and the another one with the serial ports interface pins(RC7/RX)(RC6/TX).
Now my question is: How to send that descriptor through the USB interface pins and the serial ports ones?

推荐答案

你不能将串口连接到USB端口,它们是不同的线路级别和协议,这与描述符和设置USB无关,而与数据的传输方式有关在电路层面。如果要将USB端口连接到串行端口,则需要一个像FTDI这样的中间芯片(此处 [ ^ ])。
You cannot wire a Serial port to a USB port, they are different line levels and protocols, this has nothing to do with the descriptors and setting up the USB and everything to do with how data is transmitted at the circuit level. If you want to connect a USB port to a serial port, you will need a go-between chip like the FTDI (Here[^]).


而不是使用串行引脚我找到了解决方案,它工作。我使用了两个微型计算机,每个都与计算机交互但现在转向速度问题我将使用FPGA但是我想知道它有2个USB-IF还是只有一个?
instead of using serial pins I found the solution and it worked. I used two micros and each one interacts with a computer but now move to the speed problem I''ll use a FPGA but I wanna know does it have 2 USB-IF or only one?


这篇关于USB和串口微控制器编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆