Martin Fisher great component Max7219_v2 a question Solved.

For general Flowcode discussion that does not belong in the other sections.
mnfisher
Valued Contributor
Posts: 1462
http://meble-kuchenne.info.pl
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 136 times
Been thanked: 713 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by mnfisher »

Just tested and seems to compile okay.

What target are you using - Arduino?

In the component properties - you need to set the SPI pins - including CS - the MAX7219 just uses clock and MOSI - but I didn't manage to find how to use an 'empty pin' - so make sure that the CLK and MOSI are selected correctly. MISO should be B4 and CS should be B2 to use hardware SPI (for speed!) )if you are using Arduino Uno or Nano / ATMega328p) - there is an issue with Arduino SPI CS - PB2 (D10) must be set as an output for hardware SPI to work. If you use software mode then you can choose pins as suit. Set a prescale - as far as I remember any speed will work - but try 'say' 1/16 as an initial test.

Need to call InitialiseLED then try calling Demo as a test that all is working as should be.

Martin

Viktor74
Posts: 26
Joined: Sun Sep 22, 2024 9:13 pm
Has thanked: 5 times
Been thanked: 4 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by Viktor74 »

Hi Martin, my project with an empty loop does not compile to a *.hex file, when I add the Max7219 component, it gives an error. I work directly with the Atmega328P chip through the UsbAsp programmer, not the arduino.
Attachments
MAX7219_4.png
MAX7219_4.png (172.78 KiB) Viewed 1047 times

mnfisher
Valued Contributor
Posts: 1462
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 136 times
Been thanked: 713 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by mnfisher »

Will test this evening - you also need to set the prescale value in properties - which might cause an issue?

mnfisher
Valued Contributor
Posts: 1462
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 136 times
Been thanked: 713 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by mnfisher »

Just tested using 328p as target - you do need to set a value for pre-scale (in properties) - gives an error if left blank.

Martin

Viktor74
Posts: 26
Joined: Sun Sep 22, 2024 9:13 pm
Has thanked: 5 times
Been thanked: 4 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by Viktor74 »

Hi Martin ! Thank you very much, it really helped, I hadn't paid attention to it at first. :oops:

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by jgu1 »

Hi Martin!

I have tryed to open a project I mad in FC8 I can´t compile in FC10 but ok in FC8. I have placed your component in a Lib an made the path in Globel location, do you have any idea what I do wrong, please.

Br Jorgen
Attachments
NyUdeurVirker. V.1.12.fcfx
(69.56 KiB) Downloaded 6 times
NyUdeurVirker. V.1.12.msg.txt
(1.78 KiB) Downloaded 10 times

mnfisher
Valued Contributor
Posts: 1462
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 136 times
Been thanked: 713 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by mnfisher »

Hi Jorgen,

Seem to have lots of component not found errors - the max7219 - needs changing to v9?

Also missing is OneWire - and I think the changes are a bit more involved (for example the the DS17b20 temperature monitor needs connecting to a OneWire component (LinkTo in properties)

Martin

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by jgu1 »

Hi Martin!

Thank you for reply. Do you mean that I first have to open my program in fc9?

I will try to create a link and test. ;)

Br jorgen

mnfisher
Valued Contributor
Posts: 1462
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 136 times
Been thanked: 713 times

Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by mnfisher »

No, just open in v10 should be okay - but you'll need to change the components to the newer versions. I can't remember if there is an easy 'replace' x with y option.

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 175 times

Flowcode v10 Re: Martin Fisher great component Max7219_v2 a question Solved.

Post by jgu1 »

Ok Martin, I will do that, you hear :D

Thank´s

Post Reply