FT232R Help

Latest insider preview :joy:

I tried browsing to the driver and selected the folder, all it said was USB device determined to be up to date already.

Well I got frustrated and just ordered the breakout board form sparkfun. When I plugged it in It instantly came up on the COM Port and installed the correct drivers. Guess my bread board skills need work haha I have no idea what I did wrong.

@Brett I have a quick question for you. If I am using COM2 on the G30 dev board and my FT232R comes up on COM3 of the PC, what do I put in SerialPort()? Would COM2 go in there and then COM3 goes in Tera Term on the PC? Vice versa? Or do they both have to be the same COM?

I know baud rate and everything else has to be the same.

it depends where you’re talking about.

On the PC, you’d connect to COM3, in your app or TT for example, yes. On the G30, you will only talk about COM2.

Um, yeah. Well, the good news is we proved what the fault was and you can move forward again

@Brett Ok thank you that is what I thought.

Haven’t moved much farther forward lol…When I try to do SerialPort.Write(buffer[], int offset, int count) I get a SystemArguement Exception in Hardware.SerialPort. COM port is open on the PC already and I have the pins TX to RX and RX to TX. FT232 is powered off the USB Bus.

Note I am not using handshaking. Maybe one of the handshake lines needs to be pulled? I am not sure how to configure it to not use them.

@Gus_Issa Are handshake lines required when using COM2 on the G30?

Not required

Ok cool I figured it out…super silly mistake…forgot commport.Open() after the constructor. Successfully can send a message from the G30 to tera term on my PC. Except I can’t figure out how to type text into Tera Term to send to the G30 lol.

turn on local echo in TTerm, so you can see it on the screen. I assume you’re using debug.print to output what it receives (what you read) so that you can see it in VS?

Yep the local echo was the problem, thank you.

I am actually taking it a step further and instead of printing, I use my SendLine() to return it back to tera term (since there won’t be a console in the final unit).

Works like a charm!!! Thanks for all the help guys!

Now I just need to get my GPIB converter working. Having issues with the PICKIT identifying my PIC. MY GOD DO I HATE PICS. GHI is my salvation.

just to be clear, if your app was sending stuff back over the same channel, then you would have seen your text come out - local echo just shows you what you type, as you type, so can’t really be called “the problem”. Great to hear you’ve got another thing ticked off the list. PICs, hmmm, yeah I have nothing!

I implemented the return messages after I fixed the echo so I didn’t know it was even sending before. I realized every time I hit a key the transmit LED was lighting up even though there was no echo on the screen.

Ah man this feels great. Went from zero hardware experience to learning micro controllers, I2C, SPI, UART, GPIB, and Parallel interface hardware and software (and getting them all working together) in just a few months. Definitely could not have done that without everyone here (or using C). Now that I could code everything in a language I know well, I would actually have a chance of getting a PIC working (not that I intend to but that was the daunting reality I was facing before my friend told me about GHI)

2 Likes

Hm might need to implement handshaking. It lets me type the first sentence in tera term but after I send it, tera term starts sending 1 letter at a time and not letting me type a sentence the buffer. Not sure why it doesn’t do it the first time.

no you don’t. It’s your code.

2 Likes

I figured it out. I didn’t realize you had to hit enter on tera term to send an EOL so I thought each letter that was being sent had one but none of them did >.<