Hi Peter,
When I replied, I looked at your flowchart and to me, it looks like you are not using the firmware correctly.
That's why I mentioned how it works with the UART.
That was for information only and you don't need to know that to get it all to work as it's all done behind the scenes.
Perhaps while waiting for Ben, you could load the firmware from the link, into the Ardunio (no need for any modifications), and load the SPI Demo your PC.
See how that works as it's easy to use.
The demo (fcsx type file which is App Developer) runs in simulation mode, which will directly communicate with the Ardunio, controlling the SPI function.
all you do is stop the simulation make changes to the demo file then run the simulation again.
You don't need to create your own firmware to get it to work, I was stating the option was there if the commands required are not available for example.
Hopefully, I have not got the wrong end of the stick?
If I have, I apologise.
UNO-SCADA
-
- Matrix Staff
- Posts: 1996
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 630 times
- Been thanked: 666 times
- p.erasmus
- Posts: 434
- Joined: Thu Dec 03, 2020 12:01 pm
- Location: Russia / Россия
- Has thanked: 104 times
- Been thanked: 88 times
Re: UNO-SCADA
Hi Martin,
Thank you for all your valuable input ,I appreciate it
It could well be me having the cat by the tail and this is an effort to sort this out as I have been asking for some time now about this new API
the old one is History but worked
I need this SPI /I2C HW simulation I use it all day every day and it stopped around 5 weeks ago after the fisrt update
I am sorry if I souded rude was never the intension !!!
Thank you for all your valuable input ,I appreciate it

It could well be me having the cat by the tail and this is an effort to sort this out as I have been asking for some time now about this new API
the old one is History but worked

The old injector I new exactly how to use ,This could be the problem and I am trying to find out what I am doing wrongWhen I replied, I looked at your flowchart and to me, it looks like you are not using the firmware correctly.

I need this SPI /I2C HW simulation I use it all day every day and it stopped around 5 weeks ago after the fisrt update
I am sorry if I souded rude was never the intension !!!
Regards Peter - QME Electronics
-
- Matrix Staff
- Posts: 1996
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 630 times
- Been thanked: 666 times
Re: UNO-SCADA
Hi, peter, not a problem.
Have you read the App Developer guide which can be found here.
It will take you through using App developer step by step.
It is intended for complete beginners to Flwoocde so there will be lots of information you know, but maybe worth a read?
APP Developer will do exactly that!
Have you read the App Developer guide which can be found here.
It will take you through using App developer step by step.
It is intended for complete beginners to Flwoocde so there will be lots of information you know, but maybe worth a read?
Martin
-
- Matrix Staff
- Posts: 1940
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 506 times
- Been thanked: 689 times
Re: UNO-SCADA
Hello,
The CS pin for me is working fine with the API CS Pin property of the cal_spi1 component set to 10 to generate the CS signal on pin 10.
The MOSI problem appears to be something to do with complications surrounding drawing the traces on the data recorder window. If you set the Scope Traces property to no then the MOSI signal works correctly and the SPI packets are sent together correctly in a single transaction.
I'm investigating now why the MOSI data is not there when Scope Traces is set to Yes.
The CS pin for me is working fine with the API CS Pin property of the cal_spi1 component set to 10 to generate the CS signal on pin 10.
The MOSI problem appears to be something to do with complications surrounding drawing the traces on the data recorder window. If you set the Scope Traces property to no then the MOSI signal works correctly and the SPI packets are sent together correctly in a single transaction.
I'm investigating now why the MOSI data is not there when Scope Traces is set to Yes.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
- p.erasmus
- Posts: 434
- Joined: Thu Dec 03, 2020 12:01 pm
- Location: Russia / Россия
- Has thanked: 104 times
- Been thanked: 88 times
Re: UNO-SCADA
Ben
Can you please upload the project after you are happy that all is working,
I would like to use it as a starting point
Thank you
Can you please upload the project after you are happy that all is working,
I would like to use it as a starting point
Thank you
Regards Peter - QME Electronics
-
- Matrix Staff
- Posts: 1940
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 506 times
- Been thanked: 689 times
Re: UNO-SCADA
Hello,
Right I've found a bug in the SPI code on the Arduino firmware and this has now been fixed with the latest file here.
https://www.flowcode.co.uk/wiki/index.p ... _component
Here is your project file with Scope Traces set to no, this will work with either the current firmware or the new firmware. If you set Scope Traces to yes then this will only work with the new firmware.
Hopefully this fixes the SPI problem. did you say you're having a problem with I2C too?
Right I've found a bug in the SPI code on the Arduino firmware and this has now been fixed with the latest file here.
https://www.flowcode.co.uk/wiki/index.p ... _component
Here is your project file with Scope Traces set to no, this will work with either the current firmware or the new firmware. If you set Scope Traces to yes then this will only work with the new firmware.
Hopefully this fixes the SPI problem. did you say you're having a problem with I2C too?
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
- p.erasmus
- Posts: 434
- Joined: Thu Dec 03, 2020 12:01 pm
- Location: Russia / Россия
- Has thanked: 104 times
- Been thanked: 88 times
Re: UNO-SCADA
Hi Ben.
Thank you very much,I will give it a go
Yes I have problems with the I2C as well and Martin (mnf) also has an issue with the Digital pins ,
I left the I2C as I completed my work with a PIC and Ghost.
I will soon start with a I2C project again and then may be we can look into it or if you have a small moment you could just check it
I appreciate your help and sorry about me letting off some steam, it was never meant in a bad way please except my appologies
Thank you very much,I will give it a go

Yes I have problems with the I2C as well and Martin (mnf) also has an issue with the Digital pins ,
I left the I2C as I completed my work with a PIC and Ghost.
I will soon start with a I2C project again and then may be we can look into it or if you have a small moment you could just check it
I appreciate your help and sorry about me letting off some steam, it was never meant in a bad way please except my appologies

Regards Peter - QME Electronics
-
- Matrix Staff
- Posts: 1940
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 506 times
- Been thanked: 689 times
Re: UNO-SCADA
I've also now found and fixed a problem with I2C, interestingly this one was ok with Scope traces set to Yes but has the issue when set to no.
Anyway this was a component bug so the API Slave components have now all been updated.
I've not seen any issues with the digital pins yet but if you are aware of an example of them not working then I would be very willing to try and get this sorted for you too.
Anyway this was a component bug so the API Slave components have now all been updated.
I've not seen any issues with the digital pins yet but if you are aware of an example of them not working then I would be very willing to try and get this sorted for you too.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
- p.erasmus
- Posts: 434
- Joined: Thu Dec 03, 2020 12:01 pm
- Location: Russia / Россия
- Has thanked: 104 times
- Been thanked: 88 times
Re: UNO-SCADA
Thank you very much Ben,much appreciated I will ask Martin again what was his specific issue,
may be he can post it if it still exists
may be he can post it if it still exists

Regards Peter - QME Electronics
- p.erasmus
- Posts: 434
- Joined: Thu Dec 03, 2020 12:01 pm
- Location: Russia / Россия
- Has thanked: 104 times
- Been thanked: 88 times
Re: UNO-SCADA
Ben.
Thank you for your efforts the SPI is working again as it was working with the old injector,
I have one/two questions question though.
The Coms Template is still based on the byte transactions and some time ago we dicussed that it is bettre to use the Transaction mode as the code will also work on ESP32 and STM devices and the byte versions does not work on ESP-STM32
will you guys update the templates or should I just change it as I have been doing
In the past we used the SPI or I2C cal component then the injector and the UNO_Scada
now we have the cal component or the SPI/I2C Mater component connecting directly to the UNO:_Scada I am lost as wat is the function of the DataTransfer Components ??
Regards
Thank you for your efforts the SPI is working again as it was working with the old injector,
I have one/two questions question though.
The Coms Template is still based on the byte transactions and some time ago we dicussed that it is bettre to use the Transaction mode as the code will also work on ESP32 and STM devices and the byte versions does not work on ESP-STM32
will you guys update the templates or should I just change it as I have been doing

In the past we used the SPI or I2C cal component then the injector and the UNO_Scada
now we have the cal component or the SPI/I2C Mater component connecting directly to the UNO:_Scada I am lost as wat is the function of the DataTransfer Components ??
Regards
Regards Peter - QME Electronics