Support for the new PIC's and AVR's

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
DirkB
Posts: 61
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 3:55 pm
Been thanked: 4 times

Support for the new PIC's and AVR's

Post by DirkB »

I have the impression that there is currently only support for ESP32. I have to start a project with the Attiny84. But I can only buy the Attiny84A, for example. I can't get any usable results with this chip. There is no Uart, what about the USI? According to the data sheet, the USI generates an interrupt. What do I have to do to use the USI as a MIDI component? When will the new PIC's and AVR's, especially the small Attinys, be supported?

I have already posted two articles on this topic.

viewtopic.php?f=4&t=2192
viewtopic.php?f=4&t=2344

Many thanks

Dirk

medelec35
Matrix Staff
Posts: 1466
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 515 times
Been thanked: 474 times

Re: Support for the new PIC's and AVR's

Post by medelec35 »

Hi Dirk
I have created a new fcd for you to try for the Attiny 84A
Browse to this location using File Explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR\
If Flowcode is already open, then you will need to reload your project.
If you run any component updates, then the fcdx you added will be overwritten.

Note: you won't see any data within the fields when selecting Attiny 84A
DirkB wrote:
Mon Apr 29, 2024 9:14 am
I can't get any usable results with this chip. There is no Uart, what about the USI?
Sorry, if you need to use UART then can you try a different target device that supports UART.

DirkB wrote:
Mon Apr 29, 2024 9:14 am
What do I have to do to use the USI as a MIDI component?
MIDI requires asynchronous comms and USI is for synchronous comms which is why its not used for UART
You could try the UARTT Software Timer component for Midi, but the Baud rates are limited to the timer interrupt frequencies.
Attachments
ATTINY84A.fcdx
(14.63 KiB) Downloaded 9 times
Martin

DirkB
Posts: 61
Joined: Thu Dec 10, 2020 3:55 pm
Been thanked: 4 times

Re: Support for the new PIC's and AVR's

Post by DirkB »

Hello Martin,

many thanks for that. Unfortunately there is an error message when compiling. I have attached the compiler message and test project. Do you have any ideas?

Thank you
Dirk
Attachments
Attiny84A.fcfx
(12.12 KiB) Downloaded 9 times
Attiny84A.msg.txt
(8.09 KiB) Downloaded 14 times

medelec35
Matrix Staff
Posts: 1466
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 515 times
Been thanked: 474 times

Re: Support for the new PIC's and AVR's

Post by medelec35 »

Hi Dirk.
Your project is compiling OK for me.
It looks like you have the wrong toolchain installed.
The compiler messages are showing you have the Flowcode V8 toolchain.
You will need to go to here and sign in.
Download and install the Arduino/AVR toolchain.
If it is installed and still not working, then select File > Global settings... > Locations tab and make sure the path for AVR is

Code: Select all

C:\Program Files (x86)\Flowcode\Common\Compilers\avrv5
Also make sure your component library is up to-date.
Martin

DirkB
Posts: 61
Joined: Thu Dec 10, 2020 3:55 pm
Been thanked: 4 times

Re: Support for the new PIC's and AVR's

Post by DirkB »

Hello Martin,,
the path was wrong, I don't know why. However, I still had to learn something about Fuse bits. Oscillator mode, CLK-Out and Clk divided by 8 can be taken out of the configuration. This is set with fuse bits. Now it works roughly. The sine signal from the PWM is not a smooth wave, but looks like a sine wave of small saw teeth. According to the data sheet, there are several PWM modes, normal mode, CTC mode, fast PWM mode and phase correct PWM mode. How can I set this? My component library is actually always up to date.

Thank you very much
Dirk

Post Reply