Hello,
I wanted to set up a SPI communication with a panel. Unfortunately I didn't succeed because the program comes to an end when the SPI interface is initialized.
- I use an Arduino Uno Board.
- Every 500ms the Arduino LED (Digital 13) is controlled.
- Before the endless loop the SPI interface is initialized.
- No further SPI activities to follow
If the SPI interface is deactivated - SPI is not initialized -, the program runs without objection. the LED flashes in the preset frequency. If I activate the SPI interface, the program gets stuck with this expression.
Can anyone help me?
Translated with www.DeepL.com/Translator
Error in the SPI interface
Moderator: Benj
-
- Posts: 89
- Joined: Wed Aug 31, 2016 4:48 pm
- Been thanked: 4 times
- Contact:
-
- Posts: 444
- Joined: Tue Apr 15, 2014 4:19 pm
- Location: Kajaani, Finland
- Has thanked: 345 times
- Been thanked: 227 times
- Contact:
Re: Error in the SPI interface
Hi!
Are you 100% sure the SPI bus is working and you are addressing right device?
On FC7 i remeber the ENC ethenet module had habit to stuck the program when trying to initialize the module, when it was not present...
Could this be same thing?
Have you tested that the display works?
Are you 100% sure the SPI bus is working and you are addressing right device?
On FC7 i remeber the ENC ethenet module had habit to stuck the program when trying to initialize the module, when it was not present...
Could this be same thing?
Have you tested that the display works?
Ill just keep the good work up!
-
- Posts: 89
- Joined: Wed Aug 31, 2016 4:48 pm
- Been thanked: 4 times
- Contact:
Re: Error in the SPI interface
Hello
" Are you 100% sure the SPI bus is working and you are addressing right device? "
-> I am sure that the SPI interface doesn't work under flowcode 8, because it works under Arduino-IDE with the same display.
" On FC7 i remeber the ENC ethenet module had habit to stuck the program when trying to initialize the module, when it was not present...
Could this be same thing? "
-> If this is the problem, the display should also not work under Arduino IDE.
" Have you tested that the display works? "
-> I am sure that the display will work, because with the Arduino IDE the display will work (the structure has not been changed).
" Are you 100% sure the SPI bus is working and you are addressing right device? "
-> I am sure that the SPI interface doesn't work under flowcode 8, because it works under Arduino-IDE with the same display.
" On FC7 i remeber the ENC ethenet module had habit to stuck the program when trying to initialize the module, when it was not present...
Could this be same thing? "
-> If this is the problem, the display should also not work under Arduino IDE.
" Have you tested that the display works? "
-> I am sure that the display will work, because with the Arduino IDE the display will work (the structure has not been changed).
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Error in the SPI interface
Hi,
You have the SPI properties set to CS on port C2, this should be B2
There is a note in the compiler output text about the need to set the SS pin as output or use as the CS pin
You have the SPI properties set to CS on port C2, this should be B2
There is a note in the compiler output text about the need to set the SS pin as output or use as the CS pin
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: Error in the SPI interface
Hi,
The Clk output of the SPI module and the LED are both connected to the B5 port.
Is that what you wanted?
Lagoda
The Clk output of the SPI module and the LED are both connected to the B5 port.
Is that what you wanted?
Lagoda
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Error in the SPI interface
No,
Your properties are set like this ..
Have you got CS connected on your device?
It would better to use B2 as CS
If not, then you must set B2 as an output (this is the AVR SPI SS pin)
Your properties are set like this ..
Have you got CS connected on your device?
It would better to use B2 as CS
If not, then you must set B2 as an output (this is the AVR SPI SS pin)
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: Error in the SPI interface
Hi Leigh,
I'm sorry!
I wanted to ask from Pascal_2016 but forgot to type the username in the address bar.
Best Regards,
Lagoda
I'm sorry!
I wanted to ask from Pascal_2016 but forgot to type the username in the address bar.
Best Regards,
Lagoda
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: Error in the SPI interface
Ah, I see what you mean, sorry, my mistake on that
You were right to ask
You were right to ask