Excellent video. This helped me understand a problem I was having writing software to control an 8-channel relay board using the FTDI chip. Even when disconnected I was getting responses as if the board was connected. Then I watched your video and figured it out: I have a USB to serial converter on my PC too!! I would have never figured this out without your video. Now, how can I NOT recognize the USB to Serial converter?
Thank you. This was one of the first videos that did not bury me alive in excess complexity. For my upcoming project, I would like to have four 8 bit parallel ports. This could be two bidirectional 8 bit ports. Two ports, one for a 2 way data bus and the other a control and status port. I need to move many gigabytes of video data into and out of memory sims for a solid state video recorder project I have in mind. Not necessarily in real time. But, faster is better. Obviously. Think animation capture and video looping (up to almost two hours) of SD non compressed video. For my way of thinking this is WAY easier than serial data. I think the terms "serial and parallel: have become corrupted since my Z80/M68000 days of assembly language programming. Searches for "parallel ports" only turns up deep BS about Centronics printer ports! Geez!!!! I fell behind with so called high level languages which, to me anyway, are extremely complex to deal with. Especially direct IO functions. Yes, I am a pure hardware guy. Thanks again, your video has gotten my toe in the door.
does it make sense to use this to check a regular magnetic door sensor? sending +5v to the sensor it will respond with +5v if is closed, I know it is not intended for that, can this damage the port? what is the disadvantage/risk in doing something like that, any alternative/recommendation?
I've spent 2 days trying to get one of these to program a PIC18. Still not working, but I think it's because of the erratic clock signal. Apparently the issue goes away if you use an external oscillator. I just happened to have a 12MHz oscillator, so I superglued it on the chip and connected it with some magnet wire. But, when I try changing the settings with FT Prog, it keeps reverting back to the internal oscillator. It turns out that the chip is a clone. No surprise there though. I ordered a couple genuine chips from DigiKey, and also an FT232H. On the bright side, at least now I know the crazy clock isn't my code.
OK, so I can now confirm that the clock issue does not exist with authentic FTDI chips (FT232RNL) from Digikey. I paid $7.60 each for 2 modules, and then $15.87 (including shipping and tax) for the 2 authentic chips. That comes out to $15.53 each. For what it's worth, it's still cheaper than buying a module from FTDI.
Do you think it is possible to do this using the cheaper CH340 chip? It has RTS and DTR signals, but I'm not sure It's possible to control RX and TX like you did, individually...
Dear sir, I noticed inside video that the FTDI USB-to-serial converter had a squarely external crystal (must be connected to the FT232R chip). But in the market some of the converters uses internal oscillator. And it could become permanently unusable when run with FT Prog! This warning message shown in the FDTI utility web page. If this is correct, anyway to around with the possible damage issue? Many Thanks
FTProg can be used to configure the oscillator source for the chip. If you use FTProg to configure your chip to require an external oscillator, and no external oscillator exists, your chip will obviously no longer function. This is why the warning exists, and the solution is simply to not do this. I'd feel safe using FTProg as long as I paid close attention to ensure the oscillator settings were always valid.
unfortunately no, the FTDI chip just provides a serial port to devices which can accept USB devices. Your ArduinoMega could act like a USB keyboard to a computer, but you cannot plug a USB keyboard into an Arduino. It looks like Arduino can read the output of older PS/2 style keyboards!
visual studio code is a fancy text editor that can be used to write in any programming language (C, HTML, Python, etc). Visual studio is more commonly used to write applications using Microsoft languages (C#, F#, visual basic, etc).
It seems likely, but I'm not familiar with the modern Java libraries that interact with FTDI devices. The FTDI website may have documentation on this topic
Thank You so much for this very clear video, It solved 90 percent of my problems. I just need the additional c# code to read a pin with a button. I can't find a clear answer on the ftdi site or the internet. Is it as simple as ftdi.Read (dataBuffer, 8, ref bytesRead): //? When I do this the console just flashes without a reading. THX again.
Using a FDTI FT-232 to send data data and clock seemed very easy, looks like if I send data to a single by writing to it means I could possibly send NEC protocols using just the FTDI device. Logical '0' - in the NEC Protocol would be a 562.5µs pulse burst followed by a 562.5µs space, with a total transmit time of 1.125ms modulated at 38.222khz. Logical '1' - in the NEC Protocol would be a 562.5µs pulse burst followed by a 1.6875ms space, with a total transmit time of 2.25ms again modulated at 38.222khz. This would connect to a IR photo-transistor and IR LED, then again I could instead use a VS1838B Infrared receiver and the signal received by this device already demodulated. Otherwise a better choice for me is to send and receive the NEC signal as pure TTL level data. You see my stereo has jacks in the back for sending and receiving the NEC Protocols through either an external sensor, or by daisy chaining the components and have one of them act as a receiver for the other stereo components. In fact, my dual deck cassette has no IR receiver built in and relies solely on the receivers IR receiver.
P.S. I forgot to mention... The NEC protocol sends a leader, then sends 32bits of data. Control Byte followed by it's inverse, Data Byte followed by it's inverse. When I say inverse I should say 1's compliment. And I believe it sends the data lsb first for each byte, Anyway, sounds simple, I also need to decode that protocol too, should be just as easy...
Hi POW, the issue is that due to a FTDI clock bug, it cannot output square pulses. The problem is further described and demonstrated here: swharden.com/blog/2018-06-03-bit-bang-ftdi-usb-to-serial-converters-to-drive-spi-devices/#beware-of-the-ft232r-bit-bang-bug
If you're going to use Saleae clones in public at least have the decency to not rip-off their livelihood by using cracked versions of their logic analyser software. You can use the open source Sigrok or, you know, just buy their hardware in the first place... Btw is that a FTDI fake chip too?
JM thanks for your concern! The topic of cheap eBay analyzers vs official hardware was discussed in the video and on the website post (which promotes purchasing official Saleae hardware and includes links to their product page). I was unaware of the open source software Sigrok, thanks for suggesting it! The integrity of the FTDI chip is unknown, and was a sourcing choice of whoever produced the breakout board.
I got an email from someone saying that the timing problem described at 19:00 is only a bug in genuine FTDI chps. It seems the chips I use in this video are indeed genuine, otherwise the big-banging would be working better!
Excellent video. This helped me understand a problem I was having writing software to control an 8-channel relay board using the FTDI chip. Even when disconnected I was getting responses as if the board was connected. Then I watched your video and figured it out: I have a USB to serial converter on my PC too!! I would have never figured this out without your video. Now, how can I NOT recognize the USB to Serial converter?
Thank you. This was one of the first videos that did not bury me alive in excess complexity. For my upcoming project, I would like to have four 8 bit parallel ports. This could be two bidirectional 8 bit ports. Two ports, one for a 2 way data bus and the other a control and status port. I need to move many gigabytes of video data into and out of memory sims for a solid state video recorder project I have in mind. Not necessarily in real time. But, faster is better. Obviously.
Think animation capture and video looping (up to almost two hours) of SD non compressed video. For my way of thinking this is WAY easier than serial data. I think the terms "serial and parallel: have become corrupted since my Z80/M68000 days of assembly language programming. Searches for "parallel ports" only turns up deep BS about Centronics printer ports! Geez!!!! I fell behind with so called high level languages which, to me anyway, are extremely complex to deal with. Especially direct IO functions. Yes, I am a pure hardware guy.
Thanks again, your video has gotten my toe in the door.
Fantastic video, knew the FTDI could do this but never found a nice clear resource like this. Thanks!
Arsenio Dev I always wished there were a clear resource for how to do this, so I made one! Glad you found it useful
does it make sense to use this to check a regular magnetic door sensor? sending +5v to the sensor it will respond with +5v if is closed, I know it is not intended for that, can this damage the port? what is the disadvantage/risk in doing something like that, any alternative/recommendation?
This is so cool!! Never thought of using a FTDI converter like this, posibilities are endless. Thank you for making this video :)
I've spent 2 days trying to get one of these to program a PIC18. Still not working, but I think it's because of the erratic clock signal. Apparently the issue goes away if you use an external oscillator. I just happened to have a 12MHz oscillator, so I superglued it on the chip and connected it with some magnet wire. But, when I try changing the settings with FT Prog, it keeps reverting back to the internal oscillator. It turns out that the chip is a clone. No surprise there though. I ordered a couple genuine chips from DigiKey, and also an FT232H. On the bright side, at least now I know the crazy clock isn't my code.
OK, so I can now confirm that the clock issue does not exist with authentic FTDI chips (FT232RNL) from Digikey. I paid $7.60 each for 2 modules, and then $15.87 (including shipping and tax) for the 2 authentic chips. That comes out to $15.53 each. For what it's worth, it's still cheaper than buying a module from FTDI.
Do you think it is possible to do this using the cheaper CH340 chip? It has RTS and DTR signals, but I'm not sure It's possible to control RX and TX like you did, individually...
Dear sir, I noticed inside video that the FTDI USB-to-serial converter had a squarely external crystal (must be connected to the FT232R chip). But in the market some of the converters uses internal oscillator. And it could become permanently unusable when run with FT Prog! This warning message shown in the FDTI utility web page. If this is correct, anyway to around with the possible damage issue? Many Thanks
FTProg can be used to configure the oscillator source for the chip. If you use FTProg to configure your chip to require an external oscillator, and no external oscillator exists, your chip will obviously no longer function. This is why the warning exists, and the solution is simply to not do this. I'd feel safe using FTProg as long as I paid close attention to ensure the oscillator settings were always valid.
Scott Harden thank you for your advice and the video
Great video, Scott!
Can i use FT232 to connet USB keyboard with my ArduinoMega.Board:
FT232RL FT232 FTDI USB To TTL 3.3V 5.5V Serial Adapter Module Board
unfortunately no, the FTDI chip just provides a serial port to devices which can accept USB devices. Your ArduinoMega could act like a USB keyboard to a computer, but you cannot plug a USB keyboard into an Arduino. It looks like Arduino can read the output of older PS/2 style keyboards!
what are the differences between visual studio and visual studio code and witch one is better for coding also what does $" do?
visual studio code is a fancy text editor that can be used to write in any programming language (C, HTML, Python, etc). Visual studio is more commonly used to write applications using Microsoft languages (C#, F#, visual basic, etc).
@@swharden ok thanks
this video is very understandable, you explained it very well, thank you very much, it is a very good content
+1
Hello is there any chance I can do this with java with jssc lib thanks?
It seems likely, but I'm not familiar with the modern Java libraries that interact with FTDI devices. The FTDI website may have documentation on this topic
How to use it to make programing for servomechanism ??
Excellent video. Thank you for releasing this.
Thank You so much for this very clear video, It solved 90 percent of my problems. I just need the additional c# code to read a pin with a button. I can't find a clear answer on the ftdi site or the internet. Is it as simple as ftdi.Read (dataBuffer, 8, ref bytesRead): //? When I do this the console just flashes without a reading. THX again.
Using a FDTI FT-232 to send data data and clock seemed very easy, looks like if I send data to a single by writing to it means I could possibly send NEC protocols using just the FTDI device. Logical '0' - in the NEC Protocol would be a 562.5µs pulse burst followed by a 562.5µs space, with a total transmit time of 1.125ms modulated at 38.222khz. Logical '1' - in the NEC Protocol would be a 562.5µs pulse burst followed by a 1.6875ms space, with a total transmit time of 2.25ms again modulated at 38.222khz. This would connect to a IR photo-transistor and IR LED, then again I could instead use a VS1838B Infrared receiver and the signal received by this device already demodulated. Otherwise a better choice for me is to send and receive the NEC signal as pure TTL level data. You see my stereo has jacks in the back for sending and receiving the NEC Protocols through either an external sensor, or by daisy chaining the components and have one of them act as a receiver for the other stereo components. In fact, my dual deck cassette has no IR receiver built in and relies solely on the receivers IR receiver.
P.S. I forgot to mention... The NEC protocol sends a leader, then sends 32bits of data. Control Byte followed by it's inverse, Data Byte followed by it's inverse. When I say inverse I should say 1's compliment. And I believe it sends the data lsb first for each byte, Anyway, sounds simple, I also need to decode that protocol too, should be just as easy...
Nice video. Can you also bit-bang inputs so that I could read a SPI ADC?
Yes, but since bit-bang reads are slow you must make sure your device is sending data pretty slowly
what a video. thank you bro
Thank you stranger !
Labeling got the subscription
20:10
FT232H -> has better time chip
FT232R -> does not have that.
Nice tutorial. Don't understand what your trying to say at 19:14. "Looks really bad" means nothing to me. Don't understand it.
Hi POW, the issue is that due to a FTDI clock bug, it cannot output square pulses. The problem is further described and demonstrated here: swharden.com/blog/2018-06-03-bit-bang-ftdi-usb-to-serial-converters-to-drive-spi-devices/#beware-of-the-ft232r-bit-bang-bug
Sub'd. The electronics/programming world is so interesting, and I am about to start a few projects.
17:18 That must be painful to watch xD.
u are a genius
OMG!! love your website!!
you remind me of a teenage fred gwynn
While I appreciate this, most people are going to do a GUI since that’s what most people are use to…
fuck i am from future......
If you're going to use Saleae clones in public at least have the decency to not rip-off their livelihood by using cracked versions of their logic analyser software. You can use the open source Sigrok or, you know, just buy their hardware in the first place...
Btw is that a FTDI fake chip too?
JM thanks for your concern!
The topic of cheap eBay analyzers vs official hardware was discussed in the video and on the website post (which promotes purchasing official Saleae hardware and includes links to their product page).
I was unaware of the open source software Sigrok, thanks for suggesting it!
The integrity of the FTDI chip is unknown, and was a sourcing choice of whoever produced the breakout board.
I got an email from someone saying that the timing problem described at 19:00 is only a bug in genuine FTDI chps. It seems the chips I use in this video are indeed genuine, otherwise the big-banging would be working better!