Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC Parallel Communication

Status
Not open for further replies.

VirusX2

Member level 4
Joined
Nov 18, 2014
Messages
74
Helped
1
Reputation
2
Reaction score
0
Trophy points
6
Activity points
544
I am thinking of use the Maxim, which offers 8 S & H channels so I will have simultaneous sampling. This IC communicates in parallel with the outside world, with 5Mhz clock makes conversion to max 3,8 uS so I will have a total conversion time of 3.8 * 8 = 30.4 uS + 800ns sampling gives us a conversion time = 31.2 uS so Fs = 1 / 31.2 uS = 32 kSPS per channel. So throughput is 32 kSPS * 8 = 256 kSPS about. Each sample is 1 byte (8-bit ADC) so I need a 256 KByte/s minimum communication speed; Is this thought correct?

If so, can i achieve this speed with pic18f4553 running at 48MHz..?
 

You'll be able to read the bytes from MAX155 with even slower pic.
Of course you have to check if you have enough time between reading the bytes to process the bytes.
 

You'll be able to read the bytes from MAX155 with even slower pic.
Of course you have to check if you have enough time between reading the bytes to process the bytes.

I want to send the bytes over full-speed USB to PC. Can i achieve to send each byte exactly after the reading or i have to save it locally on PIC or a memory and then send them to PC..?
 

I want to send the bytes over full-speed USB to PC. Can i achieve to send each byte exactly after the reading or i have to save it locally on PIC or a memory and then send them to PC..?
You can load the bytes to the USB RAM one by one. The USB which is almost independent module will send packets of data to the PC every 1ms.
Full speed USB can send up to about 1MB per second, I don't know how much it is in practice. In the fastest delivery there is no check for errors and it is recommended for applications like audio.
Using USB requires designing your driver for the PC. If you use HID class USB then your PC already has a driver but HID USB is limited to max 64KB/s , not enough for you. Communication class USB or Mass Storage class may give you the speed you need but you need a driver for the PC. I have experience with HID class only and I find if slower than serial RS232.
 

You can load the bytes to the USB RAM one by one. The USB which is almost independent module will send packets of data to the PC every 1ms.
Full speed USB can send up to about 1MB per second, I don't know how much it is in practice. In the fastest delivery there is no check for errors and it is recommended for applications like audio.
Using USB requires designing your driver for the PC. If you use HID class USB then your PC already has a driver but HID USB is limited to max 64KB/s , not enough for you. Communication class USB or Mass Storage class may give you the speed you need but you need a driver for the PC. I have experience with HID class only and I find if slower than serial RS232.

Doesn't Microchip already have drivers for CDC USB device for Windows? I think that it has.. With RS232 what's the maximum speed i can catch..?
 

The Microchip driver is for CDC USB to serial converter, it simulates a COM Port in your PC, I don't know of any other driver. That driver wont be useful for you.
The max speed of COM Port in a PC is about 10KB/s. The max speed I managed to get with USB HID is 8KB/s.
Transferring 256KB/s is something I don't have experience with so I can't advise you how to achieve it.
If you are sampling audio with your ADC then look at Microchip examples of audio USB.
 

The Microchip driver is for CDC USB to serial converter, it simulates a COM Port in your PC, I don't know of any other driver. That driver wont be useful for you.
The max speed of COM Port in a PC is about 10KB/s. The max speed I managed to get with USB HID is 8KB/s.
Transferring 256KB/s is something I don't have experience with so I can't advise you how to achieve it.
If you are sampling audio with your ADC then look at Microchip examples of audio USB.

usb full speed can't transfer 1Mbyte/s ..?
 

So with what type of communication can i achieve this speeds..?
 

I took dsPIC33EV256GM102 from a friend, but it don't have USB module. Can i send the data i need through serial port @ 70 MIPS? One thought is to buffer the data from adc to an SD Card (for big capacity) and then transfer it to PC. what do you think..?
 

I am thinking of use FTDI products, have anyone experience with them..?
 

Hi,

FT2232H is high speed USB. With a simple PLD you could manage to transfer the data directely from ADC to FTDI. Afaik it has 4kBytes FIFO inside.
Try 245 parallel mode.

Then the ucontroller is free from processing load.

Klaus
 

Hi,

FT2232H is high speed USB. With a simple PLD you could manage to transfer the data directely from ADC to FTDI. Afaik it has 4kBytes FIFO inside.
Try 245 parallel mode.

Then the ucontroller is free from processing load.

Klaus

Thank for your answer. Have you used it..? What speed did you achieved..?
 

Hi,

i already did a 300kbyte/s with a FT245RL (full speed type)

currently we are testing on a FT2232H (high speed)
one channel is for microcontroller communication, it does not need that high speed. The other channel is for SRAM->FPGA->USB->PC high speed data transfer. We did not test speed yet. But datasheet says 10MBytes/s.

from ftdi.com:
USB to parallel FIFO transfer data rate up to 10Mbyte/sec.
Single channel synchronous FIFO mode for transfers up to 40 Mbytes/sec.

I hope we can test it next week.

Klaus
 

300kbyte/s is very impressive. Have you faced errors or wrong data in the communication..??
I'll be pleased if you can inform me about the next week's test of FT2232H
 

Hi,

Code:
Have you faced errors or wrong data in the communication..??
Never. I think the USB prtocol, or maybe the ftdi driver has some built in error detection. But i don't k ow.

The 300kBytes/s were with dd2 drivers and VB6 at the PC side.

Klaus
 

I'll try it for 300kbyte/s. I'll use dd2 drivers with C#.net
 

Hi,

although i got 300kBytes/s i don´t recommend it in your application, because any other traffic on the USB may decrease throughput.
I recommend to use a high speed device instead.

Klaus
 

I am thinking of order the C232HM-EDHSL-0 ready cable based on FT232H. Isn't a good choice..?
 

OK so i have an A/D with parallel output (8-bit). Can i connect the A/D's output (D0-D7) directly to the FT245R FIFO (D0-D7) and handle only the control signals (WR or RD) from my PIC? That saves me microcontroller pins. Or i must connect the A/D's output to a PORT on my PIC and from another PORT send the data to the FT245R..?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top