i searched to know if someone did that before, but i didn't find anything, some C code to read and write using Arduino, but when i try to convert it i failed because i'm new at MicroPython and Raspberry Pi Pico, this code i get in from different sources in YouTube video where i get that Microwire or (3-wire protocole) is something like SPI protocol,

from machine import SPI, Pin
import ustruct
import time
import sys

### Connecting Pins
SK = 2
DI = 3
DO = 4
CS = Pin(5, Pin.OUT, value = 1)

### Variables
REG_READ = 0x02
REG_WRITE = 0x01
REG_WREN = 0x00

### Initialize spi protocole
spi = SPI(0, baudrate = 2000000, polarity = 1, phase = 1, bits = 8, firstbit = SPI.MSB, sck=Pin(SK), mosi=Pin(DI), miso=Pin(DO))

### read data
data = bytearray()
#spi.write_readinto(b'\x00\x00\x00', data)
print(data) # output bytearray(b'')

i want to read the ROM of 93C46 which is a 1Kb (1024 byte) , ORG connected to GND which it's 8 bit that some info about the chip: https://www.circuits-diy.com/93c46-1k-eeprom-datasheet/ 93c46-1Kb-EEPROM Wiring Raspberry Pi Pico to 93C46

any one know how i can reach that?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.