-
• #2
Please check SPI pins on ESP8266 page
-
• #3
The hardware SPI uses the pins shown in the board layout (CLK:D14, MISO:D12, MOSI:D13, CS:D15).
reset D5
cs D4
connected everything correctly -
• #4
The hardware SPI uses the pins shown in the board layout (CLK:D14, MISO:D12, MOSI:D13, CS:D15).
reset D5
cs D4
connected everything correctly -
• #5
var SPI1 = new SPI(); // create a new software SPI
ESP8266 has one hardware SPI named SPI1.
SPI1.setup(......)
-
• #6
Fri 2018.10.26
Hello @user79559,
re: 'connected everything correctly'
I made this mistake the first time using SPI. Worth taking yet another look.
Under 'Data Transmission'
https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus
Unlike Tx-Rx wiring SPI is MOSI-MOSI
The Espruino device is the master so MOSI is an output to the input pin of the slave device
-
• #7
Connected TFT, does screen cleaning, then outputs half of the word " hi " and does reboot :)
-
• #8
Connected TFT, does screen cleaning, then outputs half of the word " hi " does reboot :)
-
• #9
...you may be short on power... What is your power supply setup?
-
• #10
I understand the problem. When you output a long word, it fails. And when you perform on a short command, there is no failure. Use this method is unrealistic. Maybe in the future it will make the library better
-
• #11
When you output a long word, it fails. And when you perform on a short command, there is no failure.
@user79559, could you please elaborate on that a bit more? (cannot see anywhere in your code something that displays "Hi...*).
The restart may have different causes:
- running out of heap space
- running out of time (js work has to complete in the breaks between ESP8266 has to tend Wifi business)
- running out of power (brown out... if ESP8266 is not solidly powered / has not enough decoupling capacitance across GND and VCC, or power supply is too weak - too many other things are on the 3.3V rail together with ESP8266 - ESP8266 Wifi operation takes it down...)
- running out of heap space
-
• #12
@MaBe, if you want to use the HW SPI, do you still need to create one with
new SPI()
? Can you not just use theSPI1
? SPI1 - all uppercase - is defined in ESP8266 (just checked0).var SPI1 = new SPI()
may mess with that. If you want to create the SW SPI, I'd - by my gut to stay way for sure from trouble / interference - usespi = new SPI();
to not mess with SPI1...>SPI // <--- entered in console =function () { [native code] } >SPI1 // <--- =SPI1 >SPI1.setup() // <--- =undefined >var s = SPI1; // <--- =SPI1 >SPI1 = new SPI(); // <--- =SPI: { } >SPI1 === s // <--- =false >SPI1 // <--- =SPI: { } >
Lines 5 and 14 and 11 show that you get new objects... and loose the HW SPI, I guess... do you? May be it just looks on the JS level that way, but not under the hood where it is created before JS takes place.
-
• #13
...found this ESP8266 reset cause list - http://iot-bits.com/esp8266/esp8266-reset-causes-rst-cause/
(right bow I experience 4... code stuck or failing....)
-
• #14
UPS, yes it is just SPI
-
• #15
or
- unaligned memory access
- unaligned memory access
Good day, everyone! I have a problem with module ILI9341. I'm plugging it in on esp12F. After loading and cleaning the screen appears, after which the esp is rebooted and so on. Please help if anyone knows what the problem is.