ICD and USB UART device


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,042

    Question ICD and USB UART device

    Just received this device (FTDI USB UART IC FT232RL):
    https://www.amazon.ca/Adapter-Serial.../dp/B075N82CDL

    Has anyone been able to use a USB UART device to use ICD in Microcode Studio? Or any RS232 device for that matter?

    I'm using PBP v3.0.8.4, MCS+ v5.0.0.5 and a Blinky program on 16F877:

    Code:
    #CONFIG
        __config _HS_OSC & _WDT_OFF & _WRT_OFF & _BODEN_ON & _LVP_OFF  & _CPD_OFF & _PWRTE_OFF & _DEBUG_OFF
    #ENDCONFIG
    
    DEFINE  OSC     20
    
    ADCON1 = 7              ' A/D off, all digital
    
    TRISD = %00000000
    PORTD = %00000000
    
    START:  PORTD = %00100000
            PAUSE   500      
            PORTD = %00000000
            PAUSE   500      
            GOTO    START
    
    Finish: end
    I have GND connected, TX on device to RX on PIC, RX on device to TX on PIC.

    It compiles normally using ICD Compile/Program, I add a Break at PAUSE 500 to stop it, I select COM4 (confirmed in Device Manager, FTDI is there) and click RUN.

    It just sits there, until a window shows up with MCS offering me ideas on things to check.
    Last edited by Demon; - 11th April 2023 at 04:53.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,546


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: ICD and USB UART device

    Has anyone been able to use a USB UART device to use ICD in Microcode Studio? Or any RS232 device for that matter?
    never in a reliable way , ever

    apita making a separate model to suit every different osc and config variation for every chip i use .
    and after all that effort to be met errors or a stubborn refusal to connect or it only works for a few minutes , then you need to recompile to continue, just junk imo a total waste of time.
    xc8 mplabx , wonderful, better than arduino ide for debugging too
    Warning I'm not a teacher

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,038


    Did you find this post helpful? Yes | No

    Default Re: ICD and USB UART device

    Did you check the USB-UART if it works with a serial output from PIC to PC?

    Ioannis

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,042


    Did you find this post helpful? Yes | No

    Default Re: ICD and USB UART device

    Quote Originally Posted by Ioannis View Post
    Did you check the USB-UART if it works with a serial output from PIC to PC?

    Ioannis
    I haven't done any serious test except plugging it on day 1 and trying it using ICD and MCS+5, like a kid on Christmas morning.

    The circuit has CTS, RTS, RXD, TXD, GND and VCC; that leads me to believe it's capable of the same communication as our old MAX232 ICs. It might even be faster for all I know; I have no docs on this device.

    It seems to be the new thing for UART communication over USB, but these boards all seem to love the FT232RL IC. Even Sparkfun likes it:
    https://learn.sparkfun.com/tutorials...et-the-ft232rl

    But you're right; I have no clue how this affects the serial component of USART comms. At this point, I mistrust myself as much as this new components (I've been out of the loop for so long).

    I was hoping one of us had used these with success. If all else fails, I'll do like before and resort to LEDs and LCDs to debug my project. I do remember something about USB and interrupts in general not liking ICD - or something of the sort, which sucks cause my project is mainly USB.

    My old 16F877 support both USART and UART comm, so does the SAM E70 in a PICKIT4. I don't see why this would be a problem, unless Microcode Studio absolutely needs serial, but again, I don't see why, since it's seeing the new COM4 from the PICKIT4.

    I'll try some basic serial exchanges with MCS once I get my LCD wired up. Right now I'm up to my eyeballs learning C++ and VB.NET using Visual Studio 2022.

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,042


    Did you find this post helpful? Yes | No

    Default Re: ICD and USB UART device

    Quote Originally Posted by Ioannis View Post
    Did you check the USB-UART if it works with a serial output from PIC to PC?

    Ioannis
    I might be doing a lot more testing on that UART device real soon. I was researching C++ code for Microsoft Flight Simulator 2020 and found this little gem.

    https://forums.flightsimulator.com/t...s2022/514651/2

    I can't believe I had never thought of using the UART device as my main commmunication device for my project, I was only planning on using it for ICD.

    Turns out I may not even have to bother with the whole generate-USB-code problem (MCS generates VB5, I'm using VB.NET - I don't even know yet how much code modifications that would require).

    I remember testing USART at relatively high speeds with decent success.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,038


    Did you find this post helpful? Yes | No

    Default Re: ICD and USB UART device

    I have not done anything yet with simulators but I think the data required is not that much. So Serial communication is enough for your needs.

    I do use regularly a small FTDI232 board that has Tx, Rx, GND and +5V as outputs with great success on Laptops that lack real serial ports. These little boards do not support other serial control lines though (CTS, RTS etc) and are made by a friend of mine here in Greece.

    In general I remember only one USB-2-Serial device that had problems. Can't remember what brand it was, but for sure it was a driver issue.

    I do not see why the MCS will not work. Just be sure that your adapter works with a simple test.

    I am glad you are delving into C++ and Visual Studio, something I always wanted to do but never had the nerve to.

    Ioannis

  7. #7
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: ICD and USB UART device

    You mention learning C++ then reference VB v5 and VB.net. Are you learning a couple? I started with the PC programming using Visual Basic v2015. I don't use it that often, and must consult the 5 books I bought when I dove in trying to learn.

Similar Threads

  1. USB pic18f4550 USB COMPOSITE DEVICE
    By Saitama in forum USB
    Replies: 6
    Last Post: - 6th April 2023, 21:30
  2. Replies: 1
    Last Post: - 5th October 2011, 09:59
  3. MCP2200 - USB to UART Converter
    By pedja089 in forum USB
    Replies: 6
    Last Post: - 14th November 2010, 17:14
  4. usb - device not recognised
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th January 2007, 18:47
  5. USB device
    By Haitham Rifai in forum USB
    Replies: 2
    Last Post: - 5th December 2005, 10:07

Members who have read this thread : 2

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts