Using Sipeed TANG PriMER [3] – I2C / SPI with RISC-V

In the previous article, I wrote the RISC-V core on the FPGA and set up the environment to develop software with Arduino IDE. In this article, I will try to control the I/O of this RISC-V processor to run external devices. TANG PriMER FPGA Development Board Try to use SPI First, let’s use the SPI interface. The device to be connected is the EEPROM made by ROHM, which was used in this article.BR25L320 device Hardware The I/O pins on the TANG PriMER board correspond to the SPI signals as shown below. Note that only the SPI MOSI signal is not connected to the 2.54mm pitch pins on the board, and needs to be pulled out from the outer half-pitch header. Also, the SPI CS signal is implemented using GPIOs as shown in the program below. Software The following program is built on the ArduinoIDE to confirm that the EEPROM address

Read more

Using the Raspberry Pi Pico [5] – I2C communication with Micro Python

I2C on the Raspberry Pi Pico The RP2040 has two independent channels of I2C controllers (I2C0 / I2C1), which are available on the Raspberry Pi Pico from GP[0] to GP[27] pins. In this article, we tried to use this feature to read and write the digital temperature sensor and EEPROM. Connecting the TMP102 digital temperature sensor module The TMP102 device is a high-precision digital temperature sensor made by TI, with a built-in 12-bit ADC, a minimum resolution of 0.0625°C, and an accuracy of ±0.5°C without calibration or signal conditioning by external components. Here, we will use a SparkFun modulewith this temperature sensor IC and peripheral components (I2C pull-up resistor, etc.) to connect to a Raspberry pi pico. TMP102 Module Hardware connection The wiring between the Raspberry Pi Pico I/O terminals and the TMP102 module is shown below, and the I2C pull-up resistor and other necessary components are already mounted on

Read more