EmbeddedRelated.com
Forums

Serial port throughput

Started by linnix September 30, 2011
> > > =A0The serial link is still up. > > What does that mean? DCD or something?
I can still send a reset command from the PC to the PIC, so the PIC receiver is still running.
> > I have come across non Maxim 232 parts that fall over at 115200 baud.... > I think you need a scope on it or some debug equipment....
Yes, it's a TI clone. Perhaps i need to check out others. My guess is that the charge pump is not suppling enough voltage for the transmitter.
In article <504aad6c-3911-425c-be0f-ff047b65fd22
@q26g2000vby.googlegroups.com>, me@linnix.info-for.us says...
> > > > > I have come across non Maxim 232 parts that fall over at 115200 baud.... > > I think you need a scope on it or some debug equipment.... > > Yes, it's a TI clone. Perhaps i need to check out others. My guess > is that the charge pump is not suppling enough voltage for the > transmitter.
That's unlikely, first of all because if that were the case, the correct function would resume after a brief pause to allow the caps to recharge. But you say that only a reset enables TX again. That's usually a clear indication that something's wrong with the code. I'm not familiar with the 24, have you checked the possible failure modes for the USART module? Does your code check there is enough space in the USART TX buffer before placing a new byte? Does you code clear any fault bit? Claudio
On 2011-09-30, linnix <me@linnix.info-for.us> wrote:
>> >> > &#4294967295;The serial link is still up. >> >> What does that mean? DCD or something? > > I can still send a reset command from the PC to the PIC, so the PIC > receiver is still running. >
If that's the case, then you really should check what you are doing with regard to flow control and what your peer is expecting. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
linnix wrote:
>> >>> The serial link is still up. >> >> What does that mean? DCD or something? > > I can still send a reset command from the PC to the PIC, so the PIC > receiver is still running. >
Ah - thanks! -- Les Cargill
On Oct 1, 4:56=A0am, linnix <m...@linnix.info-for.us> wrote:
> > I am not sure if this is a logic (PIC24) or signal (Max3232) problem. > My guess is that the transmitter is overwhelming the Max3232 charge > pump, which is running at 5V with 10uF cap on VCC and 1uF cap charge stor=
ages. =A0 Sounds unlikely, but very easy to check with a couple of LEDs, one on the uC and one on the RS232. Since RX seems OK, I'd try a sustained uC-only TX, continual send 55H "U", and a frequency counter can show you gaps, or any disturbances. Start with a tiny self-loop TX, and then use more and more of your original code.
On Sep 30, 7:59=A0pm, linnix <m...@linnix.info-for.us> wrote:
> On Sep 30, 10:46=A0am, Rocky <robertg...@gmail.com> wrote: > > > > > > > On Sep 30, 6:56=A0pm, linnix <m...@linnix.info-for.us> wrote: > > > > I am pumping data from PIC24/Max3232 to PC at 115000 baud. =A0It work=
s
> > > in burst of 4K blocks. =A0However, after 10K to 30K of data, the > > > transmitter shutdown momentally. =A0The serial link is still up. =A0I=
can
> > > issue a micro reset from the serial link, which is the fastest way to > > > restart the transmission. =A0The average throughput is around 15000 b=
ps
> > > (bits), including the shutdown/reset cycle. =A0Without the reset cycl=
e,
> > > i can probably get up to 25000 bps. > > > > I am not sure if this is a logic (PIC24) or signal (Max3232) problem. > > > My guess is that the transmitter is overwhelming the Max3232 charge > > > pump, which is running at 5V with 10uF cap on VCC and 1uF cap charge > > > storages. =A0Would increasing caps help? > > > I presume you're using a circular buffer - putch or suchlike to insert > > characters and the interrupt extracts them. > > > Do you have BufOp (the interrupt output pointer) declared as volatile? > > Check that every time you add a character to the buffer that you > > enable the TX interrupt and that you ONLY extract characters in the > > interrupt routine and don't try and output a character directly if the > > UART is currently not busy. You should be getting throughtput of > > closer to 90kbps. > > It's not interrupt driven. =A0Actually, i am using the Microchip sample > code to slow down the port: > > =A0 =A0 U1TXREG =3D ch; > =A0 =A0 Nop(); > =A0 =A0 while(U1STAbits.TRMT =3D=3D 0); >
Which particular PIC24? Are you sure it isn't the routine feeding the data to your TX routine? As you say, it can't get much simpler :)
im Granville wrote:
> I'd try a sustained uC-only TX, continual send 55H >"U", and a frequency counter can show you gaps, or any disturbances.
Making a note to remember this. A true embedded scholar ... ;) -- Roberto Waltman [ Please reply to the group, return address is invalid ]
On 9/30/2011 12:56 PM, linnix wrote:
> I am pumping data from PIC24/Max3232 to PC at 115000 baud.
Does the PC that you are using have a "true" serial port or are you working through a USB-to-RS232 converter? If the latter, who's USB driver are you using? I've experienced a similar "hanging" or "stalling" problem with both an older FTDI driver and a Prolific driver. Update to the latest FTDI drive fixed the problem. I switch to avoid the Prolific driver. In my scenario the RS232 port was still up, but communications stalled.
On Sep 30, 11:32=A0pm, Rocky <robertg...@gmail.com> wrote:
> On Sep 30, 7:59=A0pm, linnix <m...@linnix.info-for.us> wrote: > > > > > > > > > On Sep 30, 10:46=A0am, Rocky <robertg...@gmail.com> wrote: > > > > On Sep 30, 6:56=A0pm, linnix <m...@linnix.info-for.us> wrote: > > > > > I am pumping data from PIC24/Max3232 to PC at 115000 baud. =A0It wo=
rks
> > > > in burst of 4K blocks. =A0However, after 10K to 30K of data, the > > > > transmitter shutdown momentally. =A0The serial link is still up. =
=A0I can
> > > > issue a micro reset from the serial link, which is the fastest way =
to
> > > > restart the transmission. =A0The average throughput is around 15000=
bps
> > > > (bits), including the shutdown/reset cycle. =A0Without the reset cy=
cle,
> > > > i can probably get up to 25000 bps. > > > > > I am not sure if this is a logic (PIC24) or signal (Max3232) proble=
m.
> > > > My guess is that the transmitter is overwhelming the Max3232 charge > > > > pump, which is running at 5V with 10uF cap on VCC and 1uF cap charg=
e
> > > > storages. =A0Would increasing caps help? > > > > I presume you're using a circular buffer - putch or suchlike to inser=
t
> > > characters and the interrupt extracts them. > > > > Do you have BufOp (the interrupt output pointer) declared as volatile=
?
> > > Check that every time you add a character to the buffer that you > > > enable the TX interrupt and that you ONLY extract characters in the > > > interrupt routine and don't try and output a character directly if th=
e
> > > UART is currently not busy. You should be getting throughtput of > > > closer to 90kbps. > > > It's not interrupt driven. =A0Actually, i am using the Microchip sample > > code to slow down the port: > > > =A0 =A0 U1TXREG =3D ch; > > =A0 =A0 Nop(); > > =A0 =A0 while(U1STAbits.TRMT =3D=3D 0); > > Which particular PIC24?
PIC24FJ256DA206
> Are you sure it isn't the routine feeding the data to your TX routine? > As you say, it can't get much simpler :)
I wish life is that simple. Just when i am trying to get back to test it. My drive crashed, along with all the MPLAB tools. Got another drive, with flesh XP. But MPLAB no longer install on the same XP in the same computer. LONG WEEKEND waiting for Microchip support. I hated the AVR tool's dependencies on JRE, but at least i know how to get around it. Don't know how to deal with MPLAB, .net2, netbean or whatever.