I am trying to convert the "rs232 simple echo" demo to a AVR Atmega128.
It will compile ok but if I try to create a HEX file it gives the error:
C:\Program Files (x86)\Flowcode 6\CAL\/AVR\AVR_CAL_UART.c:600:8: error: #error "UART channel 1 not available on this device"
This chip has two channels.
I went to "project options" change to atmega128 and the clock speed to 16mhz. Saved it and complied to "C". I went to the component dialog and when I select channel 1 the port pins change to the correct pins (E.0,E.1). It shows: Software; Channel1; Channel2; as selections.
What have I missed?
JoeT
convert rs232 demo to avr
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: convert rs232 demo to avr
Hi Joe,
Nothing you have missed just a minor bug, this is something that will be completely fixed in the next patch release.
For now you should be able to fix the issue by copying the file below into your Flowcode/CAL/AVR folder.
Then place the updated FCD into the FCD/AVR folder.
Let me know how you get on.
Nothing you have missed just a minor bug, this is something that will be completely fixed in the next patch release.
For now you should be able to fix the issue by copying the file below into your Flowcode/CAL/AVR folder.
Then place the updated FCD into the FCD/AVR folder.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: convert rs232 demo to avr
I downloaded the files and replace the old files with these.
Shut down flowcode and restarted.
No difference.
I tried software uart and it seems to work. At least compile to hex without errors.
But after I downloaded to the avr, I would get data but it was trash.
I tried different baud rates on the terminal program but no help.
When in project options can I change the crystal freq to a number like 14745600 hz?
Are only the selections in the drop down allowed?
I was wondering if this was the problem with the software uart.
JoeT
Shut down flowcode and restarted.
No difference.
I tried software uart and it seems to work. At least compile to hex without errors.
But after I downloaded to the avr, I would get data but it was trash.
I tried different baud rates on the terminal program but no help.
When in project options can I change the crystal freq to a number like 14745600 hz?
Are only the selections in the drop down allowed?
I was wondering if this was the problem with the software uart.
JoeT
Re: convert rs232 demo to avr
I am able to write to a 16x2 LCD from the program. With the clock (avr) freq of 14745600hz.
So the freq select seems to work with a inserted value.
If I type to the LCD via rs232 I get trash.
JoeT
So the freq select seems to work with a inserted value.
If I type to the LCD via rs232 I get trash.
JoeT
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: convert rs232 demo to avr
Hi Joe,
Sorry for the delay.
Sorry for the delay.
The drop down selection in the project options also allows for direct number entry so you can put in custom values like this. If this setting is wrong then it explains why your data is not working as the baud will be being calculated incorrectly for your hardware.When in project options can I change the crystal freq to a number like 14745600 hz?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel