2

Author Topic: ATmega8 USART  (Read 586 times)

0 Members and 1 Guest are viewing this topic.

Offline MaiGoL7Topic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
ATmega8 USART
« on: December 20, 2012, 09:25:37 AM »
Hi buddies.
I want to ask how can be "created" a new TXD because I need two TX and the first one is working. I wanted to switch to an ATmega128 but my request was denied, so I'm stuck at this point, how to create a new TXD.
Also the frame must be something like this:
0|byte|1 when all the frame is 1 that would mean that the buffer is empty.
And when that frame is sent, another ATmega8 must receive that value.

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,343
  • Helpful? 81
Re: ATmega8 USART
« Reply #1 on: December 20, 2012, 11:32:47 AM »
If the communication is from Atmega to Atmega, I suggest you use the I2C bus or the I2C bus instead of the UART bus.
How to use I2C (called "two-wire interface" or "TWI" in the Atmega data sheet) and SPI is described pretty well in the data sheet for the Atmega microprocessors.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,943
  • Helpful? 98
Re: ATmega8 USART
« Reply #2 on: December 20, 2012, 10:35:03 PM »
Do a web search for
"bit banging"
'Software serial"
"software UART"
To learn how this can be done.

The basic idea here is to control the logic level of one output pin with software. The pin is set to a high or low with precise timing to send a stream of data bits serially.

 


Get Your Ad Here