+ Post New Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 38
  1. #1
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    PIC Parallel Communication

    I am thinking of use the MAX155 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..?

  2. #2
    Full Member level 6
    Points: 2,302, Level: 11

    Join Date
    Apr 2015
    Posts
    366
    Helped
    72 / 72
    Points
    2,302
    Level
    11

    Re: PIC Parallel Communication

    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.
    Engineers who only use simulators are only Simulated Engineers.



    •   AltAdvertisment

        
       

  3. #3
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

    Quote Originally Posted by Vbase View Post
    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..?



  4. #4
    Full Member level 6
    Points: 2,302, Level: 11

    Join Date
    Apr 2015
    Posts
    366
    Helped
    72 / 72
    Points
    2,302
    Level
    11

    Re: PIC Parallel Communication

    Quote Originally Posted by VirusX2 View Post
    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.
    Engineers who only use simulators are only Simulated Engineers.



  5. #5
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

    Quote Originally Posted by Vbase View Post
    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..?



  6. #6
    Full Member level 6
    Points: 2,302, Level: 11

    Join Date
    Apr 2015
    Posts
    366
    Helped
    72 / 72
    Points
    2,302
    Level
    11

    Re: PIC Parallel Communication

    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.
    Engineers who only use simulators are only Simulated Engineers.



  7. #7
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

    Quote Originally Posted by Vbase View Post
    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 ..?



  8. #8
    Advanced Member level 1
    Points: 2,589, Level: 11

    Join Date
    Mar 2015
    Posts
    481
    Helped
    88 / 88
    Points
    2,589
    Level
    11

    Re: PIC Parallel Communication

    Quote Originally Posted by VirusX2 View Post
    usb full speed can't transfer 1Mbyte/s ..?
    As per wikipedia it is possible it seems, But never tried in practical to test the maximum speed of the USB.



    •   AltAdvertisment

        
       

  9. #9
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

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



    •   AltAdvertisment

        
       

  10. #10
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

    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..?



  11. #11
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

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



  12. #12
    Super Moderator
    Points: 69,564, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,205
    Helped
    3246 / 3246
    Points
    69,564
    Level
    64

    Re: PIC Parallel Communication

    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



  13. #13
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

    Quote Originally Posted by KlausST View Post
    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..?



  14. #14
    Super Moderator
    Points: 69,564, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,205
    Helped
    3246 / 3246
    Points
    69,564
    Level
    64

    Re: PIC Parallel Communication

    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



  15. #15
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

    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



  16. #16
    Super Moderator
    Points: 69,564, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,205
    Helped
    3246 / 3246
    Points
    69,564
    Level
    64

    Re: PIC Parallel Communication

    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



  17. #17
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

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



  18. #18
    Super Moderator
    Points: 69,564, Level: 64
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,205
    Helped
    3246 / 3246
    Points
    69,564
    Level
    64

    Re: PIC Parallel Communication

    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



  19. #19
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

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



  20. #20
    Member level 3
    Points: 1,003, Level: 7

    Join Date
    Nov 2014
    Posts
    65
    Helped
    1 / 1
    Points
    1,003
    Level
    7

    Re: PIC Parallel Communication

    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..?



    •   AltAdvertisment

        
       

--[[ ]]--