Searching \ for '[PIC]:UART problem' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'UART problem'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:UART problem'
2001\03\05@221150 by David Huisman

flavicon
face
Does anyone have any example "C" code for Interrupt driven TX routine using
UART
? I have looked at piclist.com and cannot find what I need there.

I can get the TX started but it will not stop.

I tried using TXEN to stop it, but then it reconfigures the port to hi-Z.

Currently I initiate transmission by loading TXREG with 1st data byte from
tx_buffer[0] and inc tx_ptr to 1.
Next I set TXIE to true.

In the interrupt routine I poll (TXIF & TXIE)
Each time a byte is sent, I inc TX_Ptr and when all is sent I disable TXIE.

If I enable TXIE and load TXREG, the uart sends for a while and results in
stack overflow.
If I do not set TXIE, it transmits forever even though it never gets to the
int routine.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\03\05@224615 by James Cameron

flavicon
face
On Tue, Mar 06, 2001 at 01:55:47PM +1100, David Huisman wrote:
> I can get the TX started but it will not stop.

From my understanding of the UART on PIC 16F877 at least, the only way
to get this situation is to keep loading TXREG.  Assuming asynchronous
mode.  You are clearing SYNC or setting it?

I think you should offer your code for review.

--
James Cameron    spam_OUTquozlTakeThisOuTspamus.netrek.org     http://quozl.netrek.org/

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\03\05@230711 by David Huisman

flavicon
face
James,

Here is code for review.

Regards

David Huisman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\03\06@010442 by Dan Michaels

flavicon
face
David Huisman wrote:
>Does anyone have any example "C" code for Interrupt driven TX routine using
>UART
>? I have looked at piclist.com and cannot find what I need there.
>
>I can get the TX started but it will not stop.
>

Does this mean it keeps transmitting the "same" data over and over,
or different data?
=============

>
>Currently I initiate transmission by loading TXREG with 1st data byte from
>tx_buffer[0] and inc tx_ptr to 1.
>Next I set TXIE to true.
>

And of course, you did clear TXIF?
========

>In the interrupt routine I poll (TXIF & TXIE)
>Each time a byte is sent, I inc TX_Ptr and when all is sent I disable TXIE.
>

And clear TXIF?
=========

>If I enable TXIE and load TXREG, the uart sends for a while and results in
>stack overflow.

Return stack? or a s.w. stack you created?

If the former, then it sounds like you are not returning from interrupt
properly.
===========

>If I do not set TXIE, it transmits forever even though it never gets to the
>int routine.
>

You do know that you can use the UART for transmitting, without using
interrupts? Just wait for TXIF to be clear, and then load TXREG.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2001\03\06@081444 by Thomas McGahee

flavicon
face
Hmmm. I think I have found your problem.
You need some code.

Fr. Tom McGahee

----- Original Message -----
From: David Huisman <david.huismanspamKILLspamADVMININGTECH.COM.AU>
To: <.....PICLISTKILLspamspam.....MITVMA.MIT.EDU>
Sent: Monday, March 05, 2001 11:00 PM
Subject: Re: [PIC]:UART problem


{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\03\06@145258 by Orbit Communications

flavicon
face
Thomas,

You are right :)

I will re-post with attachment this time :)

Best Regards
David Huisman
----------------------------------------------------------------
Orbit Communications
Reliable RF data modules,wireless telemetry rfic and other
communication solutions

Web site: http://www.orbitcoms.com
Email: infospamspam_OUTorbitcoms.com

PO Box 3459, Tuggerah, NSW 2259, Australia
Phone:+61-2-4329-7765
Fax:+61-2-4329-7893
Mobile (within Australia): +61-0412-566-629
Mobile (International): +61-412-566-629
{Original Message removed}

2001\03\06@165358 by David Huisman

flavicon
face
Here is the code that should have been attached yesterday.

Regards


David Huisman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\03\06@170225 by Sam Linder

flavicon
face
must be vaporware.....  ;-)

-----Original Message-----
From: David Huisman [KILLspamdavid.huismanKILLspamspamADVMININGTECH.COM.AU]
Sent: Tuesday, March 06, 2001 1:42 PM
To: RemoveMEPICLISTTakeThisOuTspamMITVMA.MIT.EDU
Subject: Re: [PIC]:UART problem


Here is the code that should have been attached yesterday.

Regards


David Huisman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


2001\03\06@171053 by David VanHorn

flavicon
face
At 08:42 AM 3/7/01 +1100, David Huisman wrote:
>Here is the code that should have been attached yesterday.
>
>Regards

Here we see RISC code, taken to it's logical limit.
It takes no space, executes infinitely fast, yet accomplishes nothing.

:)

--
Dave's Engineering Page: http://www.dvanhorn.org
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body


2001\03\06@184857 by Thomas McGahee

flavicon
face
Hmmmm. You seem to still have the same problem: no code.

Fr. Tom McGahee

----- Original Message -----
From: David Huisman <david.huismanEraseMEspam.....ADVMININGTECH.COM.AU>
To: <EraseMEPICLISTspamMITVMA.MIT.EDU>
Sent: Tuesday, March 06, 2001 4:42 PM
Subject: Re: [PIC]:UART problem


{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspam_OUTspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2001\03\06@192503 by David Huisman

flavicon
face
The code was sent as attachments. Do I need to cut and paste code into email
itself ?

Regards

David Huisman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspamspammitvma.mit.edu with SET PICList DIGEST in the body


2001\03\06@195705 by Sam Linder

flavicon
face
It doesn't seem to make it to the list. Try sending it to yourself and see
what happens.

-----Original Message-----
From: David Huisman [EraseMEdavid.huismanspamspamspamBeGoneADVMININGTECH.COM.AU]
Sent: Tuesday, March 06, 2001 4:08 PM
To: RemoveMEPICLISTKILLspamspamMITVMA.MIT.EDU
Subject: Re: [PIC]:UART problem


The code was sent as attachments. Do I need to cut and paste code into email
itself ?

Regards

David Huisman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservSTOPspamspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservSTOPspamspamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body


2001\03\06@205002 by James Newton

face picon face
There is a limit on the size of an attachment sent to this list. You are
welcome to post it to piclist.com and then reference it from there.

James Newton, PICList Admin #3
KILLspamjamesnewtonspamBeGonespampiclist.com
1-619-652-0593 phone
http://www.piclist.com

----- Original Message -----
From: Sam Linder <EraseMESamLspamEraseMEIN-INC.COM>
To: <@spam@PICLIST@spam@spamspam_OUTMITVMA.MIT.EDU>
Sent: Tuesday, March 06, 2001 16:58
Subject: Re: [PIC]:UART problem


It doesn't seem to make it to the list. Try sending it to yourself and see
what happens.

{Original Message removed}

2001\03\06@232810 by James Cameron

flavicon
face
On Wed, Mar 07, 2001 at 11:08:29AM +1100, David Huisman wrote:
> The code was sent as attachments. Do I need to cut and paste code into
> email itself ?

Yes, the list server must be dropping your large file.  I received it
fine bypassing the list when you sent it to me.  Probably best to reduce
the code into the essential components rather than post the whole source
file.

I'm afraid I couldn't find anything wrong with your code, except what I
mentioned, but I didn't think that should have caused the problem.  If
you do find out what the cause was, please let me know.

--
James Cameron    spamBeGonequozlspamKILLspamus.netrek.org     http://quozl.netrek.org/

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservspam_OUTspammitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...