ATmega128 USART assyncronous connection
Quote from average_simulide_enjoyer on November 27, 2024, 6:17 pmI made a program for ATmega128 for USART assyncronous connection, specifically.
However, i have no idea how i get or send stuff, i probably need a serial port/monitor. How do i connect it to the ATmega?
I made a program for ATmega128 for USART assyncronous connection, specifically.
However, i have no idea how i get or send stuff, i probably need a serial port/monitor. How do i connect it to the ATmega?
Quote from arcachofo on November 28, 2024, 6:51 pmHi.
You can use Serial Terminal (click on "Serial terminal"): https://simulide.com/p/component-list/#peripherals
Hi.
You can use Serial Terminal (click on "Serial terminal"): https://simulide.com/p/component-list/#peripherals
Quote from average_simulide_enjoyer on December 3, 2024, 6:22 pmi tried to use the serial terminal, by connecting Rx to PD2 and Tx to PD3 (Rx and Tx of USART1), but nothing is happening
I KNOW this code works cuz in a real ATmega128, it worked connected to a real computer
i tried to use the serial terminal, by connecting Rx to PD2 and Tx to PD3 (Rx and Tx of USART1), but nothing is happening
I KNOW this code works cuz in a real ATmega128, it worked connected to a real computer
Quote from average_simulide_enjoyer on December 3, 2024, 7:13 pmit didnt work still
it didnt work still
Quote from arcachofo on December 3, 2024, 7:20 pmAlso I'm assuming that the Serial Terminal is configured for the same baudrate, etc than the USART in the Atmega.
Also I'm assuming that the Serial Terminal is configured for the same baudrate, etc than the USART in the Atmega.
Quote from average_simulide_enjoyer on December 3, 2024, 7:39 pmIt is set to 9600, like the default one.
Ill send the hex file tomorow, and maybe the sim1 file if u wish to see if it's well done
It is set to 9600, like the default one.
Ill send the hex file tomorow, and maybe the sim1 file if u wish to see if it's well done
Quote from average_simulide_enjoyer on December 4, 2024, 4:53 pmQuote from arcachofo on December 3, 2024, 7:14 pmMaybe share something that I can try?
this is the USART setup:
UBRR1H = 0;
UBRR1L = 207;
UCSR1A = 0b00000010;
UCSR1B = 0b10011000;
UCSR1C = 0b00001110;
(as u can see, or not, i enable double speed, maybe its that the issue? it uses the next baudrate value, maybe i need to put the next baudrate too in the monitor)im sending my simulation file and the hex file with the program. try sending s and d. its suposed to switch to s mode, and then u can use the switches to make the DC motor rotate
https://www.mediafire.com/file/3s3lvdzu2c2by0v/atmega128_USART1.zip/file
Quote from arcachofo on December 3, 2024, 7:14 pmMaybe share something that I can try?
this is the USART setup:
UBRR1H = 0;
UBRR1L = 207;
UCSR1A = 0b00000010;
UCSR1B = 0b10011000;
UCSR1C = 0b00001110;
(as u can see, or not, i enable double speed, maybe its that the issue? it uses the next baudrate value, maybe i need to put the next baudrate too in the monitor)
im sending my simulation file and the hex file with the program. try sending s and d. its suposed to switch to s mode, and then u can use the switches to make the DC motor rotate
https://www.mediafire.com/file/3s3lvdzu2c2by0v/atmega128_USART1.zip/file
Quote from arcachofo on December 5, 2024, 5:35 amThank you.
Found the problem: an error in a configuration file, to fix it replace the file attached here:
data/AVR/mega64_128/mega64_perif.xmlAlso connect Rx to Tx and Tx to Rx:
Thank you.
Found the problem: an error in a configuration file, to fix it replace the file attached here:
data/AVR/mega64_128/mega64_perif.xml
Also connect Rx to Tx and Tx to Rx:
Uploaded files: