ATmega324pa and USART_0 and USART_1

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi !

 

I'm using USART_0 as a regular communication port.

 

USART_1 is used as a service port.

 

What I have noticed is that I have random interrupts on USART_1 when this port is not used (left floating).

 

 

What to do?

Make an pull-up or pull-down on USART_1 RX pin?

 

 

Thank you !

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

any input pin that's just left floating is going to pick up noise

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If it's not used just switch off the interrupt enable. Then you simply cannot get interrupts from the peripheral. Alternatively switch off the RXEN1 so it's not enabled for receive when you are not expecting anything. Again this would make it impossible for it to generate RX interrupts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, but them I have a problem when I need USART_1, how to enable it.

 

It's not practical to enable USART_1 through USART_0 and also through some pin.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mesko wrote:
It's not practical to enable USART_1 through USART_0 and also through some pin.

I have no idea what you are saying here.  Nor what a "service port" is.

 

Anyway, I typically enable the internal pullup on RXD to help with spurious start bits.

 

Have you told us what is connected to the USART pins?  Transceivers?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:

mesko wrote:
It's not practical to enable USART_1 through USART_0 and also through some pin.

I have no idea what you are saying here.  Nor what a "service port" is.

 

Anyway, I typically enable the internal pullup on RXD to help with spurious start bits.

 

Have you told us what is connected to the USART pins?  Transceivers?

 

By service port I mean maintenance/help port(USART_1), to keep track what's going on and download data.

 

On USART_0 is SIM900.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, the RX pin of your "service port" will be either open, or connected to the TX pin of your "service terminal" - or whatever you call it.

 

The TX pin of your "service terminal" will drive a known level when idle.

 

So put a pull up/down on your RX pin so that you can distinguish whether it's "open" or has the "terminal" connected ...