Most recent activity
-
- 64 comments
- 18,387 views
-
Hello,
I try to connect a radio module using an SPI link (on SPI3, Espruino Pico, Firmware V1.90)
Here is my code :SPI3.setup({sck:B3, miso:B4, mosi:B5, baud:10000, mode:0, order:'msb'}); var registreW = {data : 0x81, count : 1}; var modeASK = {data : 0x23, count : 1}; var returnedData; returnedData = SPI3.send(registreW,A7); console.log(returnedData[0]); returnedData = SPI3.send(modeASK,A7); console.log(returnedData[0]);
NSS Pin is A7.
Since this code doesn't work (communication doesn't work), I had a look at signals with the logic state analyzer.
I attach a screen capture. In fact, NSS PIN is set high too early, when the last byte is not totally sent. I looked at the code line 212, the PIN change seems to be executed without knowledge of end of transmission, but I can be wrong !!
Help will be greatly appreciated.
Best regards
GeekBot -
I did some more measurements.
Battery voltage 2.78V
3.3 V output : 2.5V
LED1 turned on, Espruino running.
I confirm that the transistor has just some mV of voltage drop.
Since, I estimate the current over 35 mA, I have to look at the regulator datasheet to see if it is an expected value.
Anyway, I manage with these figures!
GeekBot -
@Gordon, thank you, I will do accurate measurements and reporting tomorrow. I come back to you.
Best regards
GeekBot -
-
@Gordon, eventually I have a doubt; the 'Bat' pin you talk about is the 'VBat' pin (PIN2 of J2 on Pico, called 5V on the schematic) ?
Because there is also the VBAT on the schematic which is the PIN 1 on J1, and called BAT_IN on the Pico coloured diagram on the web site.
According to our discussion, I guess the 'Bat' is the 5V on the schematics, but I need to be absolutely sure.
Thanks a lot
GeekBot
I use a Saleae logic analyzer. You can purchase one on their website.
It works great.
GeekBot