Hello, first of all a happy new year to everyone here!
And here is my problem: I want to transfer a program from an ATMEGA328P to an ATTINY4313. I use a simple UART transfer in the program. when I compile the project now I get the following error:
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_Init_1':
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR\AVR_CAL_UART.c:661:24: error: 'URSEL' undeclared (first use in this function)
UCSR0C = ((1 << URSEL) | (1 << UCSZ01) | (1 << UCSZ00)); // configuration for 8 data bits (Combined UBRRHx/UCSRCx)
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR\AVR_CAL_UART.c:661:24: note: each undeclared identifier is reported only once for each function it appears in
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR\AVR_CAL_UART.c: In function 'FC_CAL_UART_Send_1':
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\AVR\AVR\AVR_CAL_UART.c11: error: lvalue required as left operand of assignment UDR0 = nChar;
Can anyone give me a tip? Thank you very much! Greetings Chris
UART compiler error ATTINY4313
-
- Posts: 37
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 12:47 pm
- Been thanked: 1 time
Re: UART compiler error ATTINY4313
Even if I create a new program and enter UART1 initialize as the only command, the error.... appears.
-
- Valued Contributor
- Posts: 1186
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 289 times
- Been thanked: 417 times
Re: UART compiler error ATTINY4313
Hi
Happy New Year to you too.
I created a simple chart using the ATTINY4313 with just the UART on Ch1. In the chart I initialise the UART then enter an endless loop. Chart won't compile to Hex citing all sorts of errors.
Changing the UART from ch1 to software did allow the chart to compile. Perhaps you could test using the software channel too?
Regards
Happy New Year to you too.
I created a simple chart using the ATTINY4313 with just the UART on Ch1. In the chart I initialise the UART then enter an endless loop. Chart won't compile to Hex citing all sorts of errors.
Changing the UART from ch1 to software did allow the chart to compile. Perhaps you could test using the software channel too?
Regards
Re: UART compiler error ATTINY4313
Hello, thanks for the answer.
With the ATMEGA328P (and other controllers) it works fine, without error messages. There seems to be something wrong with the 4313 implementation for flowcode, I'm afraid.
Regards Chris
With the ATMEGA328P (and other controllers) it works fine, without error messages. There seems to be something wrong with the 4313 implementation for flowcode, I'm afraid.
Regards Chris
Re: UART compiler error ATTINY4313
I made another attempt with an ATTINY2313.
With the 2313 (which has only half the memory of the 4313) it works as it should without any problems.
So it seems to be due to the implementation of the 4313 here...
With the 2313 (which has only half the memory of the 4313) it works as it should without any problems.
So it seems to be due to the implementation of the 4313 here...