Hi Harold, Could you explain your hw design? How it powered for example? Can you see the data bits from the FT chip with an oscilloscope? I know it sounds stupid, but is the internal pull-up enabled for portb? As you use C I am not sure if there is anything about watching files or doing something with tris by the debugger as you do it upfront receiving chars. Tamas On Jan 11, 2008 12:35 PM, Spehro Pefhany wrote: > At 03:06 PM 1/10/2008, you wrote: > >I've got a relatively complex program running on a 24HJ256GP610. I'm > using > >an FT245R for USB interface. This chip has a parallel interface to the > >PIC. For debug, I made a small loop that reads data from the FT245R and > >sends it back. Prior to the read, I sent a string to the chip. The string > >write works properly, but the read always reads a null byte. However, if > I > >run the code in debug with the ICD-2, it works fine! I am not changing > >optimization or anything. Just debug or program. The rest of the code > >works fine. It's just this reading from the FT245R that does not work. > > > >So... what is different between running something under debug? > > > >THANKS! > > > >Harold > > Check your initialization. Debug does some things with TRIS registers, > which don't happen without debug. > > >Best regards, > > Spehro Pefhany --"it's the network..." "The Journey is the > reward" > speff@interlog.com Info for manufacturers: > http://www.trexon.com > Embedded software/hardware/analog Info for designers: > http://www.speff.com > > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist