SPI help needed
| Author | Message | ||||
| robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2558 |
hi lewis, is this the board/module you are dealing with: https://wiki.seeedstudio.com/Wio_RP2040_mini_Dev_Board-Onboard_Wifi/ https://wiki.seeedstudio.com/Wio_RP2040_Module_Build-in_Wireless_2.4G/ if so, i've not managed to find the schematic for the module as yet - this will document the connections between the Rp2040 and ESP8285. first step is to find out if there is a UART connection between the two, as this will be far easier to work with than SPI. there is a good summary of SPI here: https://en.wikipedia.org/wiki/Serial_Peripheral_Interface (this same page is referenced by the MicroMite manual) while it may at first appear daunting, the crux of the matter is that there only a few fixed features of SPI, and a great many things that are left up to the designer of any particular device: there must always be a clock (SCK) line; on every slave device there must always be either a data in line (MOSI) or a data out line (MISO), or possibly both. there may be a chip select (SS) line, there may be some sort of handshaking line. each clock pulse may send data in just one direction (master to slave or vice versa), or data may be exchanged in both directions at once. the number of bits transferred per transaction may be absolutely anything between 1-bit and many hundreds of bits. it does not have to be a multiple of 8. depending on how intelligent a slave device is, it may only act on SCK and the one data line (MOSI or MISO), for instance like a TTL shift register chip, or it may use SS to signal that a message sent to it should be acted upon in some complicated way (an example being a WiFi node). the SPI functionality implemented by MMbasic may cover the requirements of the device you are dealing with, or it may not. even if not, the good thing is that it should be fairly easy to 'roll your own' SPI routines in BASIC. they may be a little slower than using the hardware SPI of the RP2040, but they will work. cheers, rob :-) Edited 2022-01-24 22:26 by robert.rozee |
||||