03-05-2014 05:59 PM
Hello all,
I've been scouring the web and the NI forum for the past couple days trying to find a solution for my problem but nothing yet.
I have a PIC18 micro with its UART connected to an FTDI chip which is plugged into my PC via USB. I'm trying to use labview to do some very basic reading and writing but I can't seem to get it to work. It will write data out to the chip just fine; but it wont read anything coming back. In fact it tells me that there are 0 bytes in the buffer. I've tried all of the built in labview example and none of them seem to work. I also tried the examples on the FTDI site and they don't work either. I am using DTR flow control.
I have a logic analyzer reading the tx/rx lines coming out of the PIC and they are as expected.
I can't get it to work in MAX either.
Does anyone have any ideas of what's going on?
I also noticed that even though I use some 'wait' blocks between writes, when I use my logic analyzer the waits don't happen, all the transmitted bytes are right after each other...I even bumped up the waits between each write to 5 whole seconds to see if it had anything to do with a delay getting on the bus.
Thanks for your help,
Jason
03-05-2014 07:54 PM
03-06-2014 12:31 PM
I am using the most current driver that is available on the FTDI website. Yes my connection does show up as a COM port in MAX. I am sending simple characters; q, t, Q, etc. I have many other programs that talk to the micro just fine; I have some c# code that useing SerialPort commands to talk to the micro; I have a bootloader from Microchip that has a terminal built in that works just fine; I have TCL code that communicates just fine. My cableing should all be correct.
I can get labview to transmit, but it doesn't see anything as available on the read port.
And I'm still curious why those 500ms delays between reads and writes don't seem to do anything.
I'm probing the tx/rx lines with a logic analyzer between the micro and the ftdi chip.
03-06-2014 12:54 PM
03-06-2014 01:05 PM
I'm using the basic serial write and read vi. Here is the lock diagram, the front panel, and captures of what occurs on the logic analyzer.
I've also attached what I expect as the result from another terminal application
03-06-2014 01:06 PM
the remaining attachments
03-06-2014 01:15 PM
03-06-2014 02:03 PM
No it does not require any termination. As you can see in the logic captures the micro is returning the expected information.
03-06-2014 03:15 PM
03-06-2014 03:38 PM
I don't see where I have it set to do that. If I add terminatation charicater enable and set it to false it still behaves the same.
And again if you look at the logic capture you can see that the micro sends back both a \r and a \n so that should be hindering the read function correct?