Search found 8 matches

by maxe
Sun Jan 17, 2021 4:11 am
Forum: ESP8266 boards
Topic: Using a 74HC595N with softSPI / bitbanging
Replies: 8
Views: 3358

Re: Using a 74HC595N with softSPI / bitbanging

Clever. Never heard about these operations. Really cool thanks.
by maxe
Sat Jan 16, 2021 4:37 am
Forum: ESP8266 boards
Topic: Using a 74HC595N with softSPI / bitbanging
Replies: 8
Views: 3358

Re: Using a 74HC595N with softSPI / bitbanging

In case anyone tries something similar: #!/usr/bin/env python from machine import SPI, Pin class ShiftRegister(): # For SPI: # MOSI -> SER # MISO -> Not used # SCK -> SRCLK # Latching -> RCLK def __init__(self, serPin, srclkPin, rclkPin, bits=8): # miso isn't used in SPI for 74HC595 set to inaccessi...
by maxe
Thu Jan 14, 2021 5:46 am
Forum: ESP8266 boards
Topic: Using a 74HC595N with softSPI / bitbanging
Replies: 8
Views: 3358

Re: Using a 74HC595N with softSPI / bitbanging

I just realized that there must also be something wrong in my code for accessing the outputs. I can control the first (Qa) but the others don't behave as expected. I thought:

shift.write(b'11111111')

would turn them all on. But that's not the case. Any idea?
by maxe
Thu Jan 14, 2021 5:26 am
Forum: ESP8266 boards
Topic: Using a 74HC595N with softSPI / bitbanging
Replies: 8
Views: 3358

Re: Using a 74HC595N with softSPI / bitbanging

For some reason it works now. The only thing is that you have to initialize the miso pin. So I just used GPIO5 which I can't access anyway. GPIO0 = MOSI -> SER GPIO3 = SCK -> SRCLK GPIO2 = latch -> RCLK 3.3V -> SRCLR OE -> empty from machine import Pin, SPI shift = SPI(-1, sck=Pin(3), mosi=Pin(0), m...
by maxe
Thu Jan 14, 2021 5:00 am
Forum: ESP8266 boards
Topic: Using a 74HC595N with softSPI / bitbanging
Replies: 8
Views: 3358

Using a 74HC595N with softSPI / bitbanging

Hi there, I try to make the 74HC595N work with the ESP-01. I currently do the following without success. The ESP-01 has 4 GPIO pins (GPIO0/2 + RXD(3) and TXD(1)). So to make the software SPI I hook up the following: GPIO0 -> SER GPIO2 -> RCLK GPIO3 -> SRCLK I pull SRCLR constantly high and I have fo...
by maxe
Mon Jan 11, 2021 2:10 am
Forum: ESP8266 boards
Topic: machine.SoftSPI not available for ESP-01 (esp8266)
Replies: 4
Views: 2556

Re: machine.SoftSPI not available for ESP-01 (esp8266)

Thanks I will give it a try right away. Shift register here I come :)
by maxe
Mon Jan 11, 2021 12:16 am
Forum: ESP8266 boards
Topic: machine.SoftSPI not available for ESP-01 (esp8266)
Replies: 4
Views: 2556

Re: machine.SoftSPI not available for ESP-01 (esp8266)

I use esp8266-1m-20200902-v1.13 and I have the really basic ESP-01 non S chip. There are GPIO0 and GPI2 while 1 and 4 are TX/RX but they could be used for software SPI. The problem is that the class isn't available. I am using the WebREPL anyway so I don't need the serial connection.
by maxe
Sun Jan 10, 2021 10:32 pm
Forum: ESP8266 boards
Topic: machine.SoftSPI not available for ESP-01 (esp8266)
Replies: 4
Views: 2556

machine.SoftSPI not available for ESP-01 (esp8266)

Hi there,

I am new to micropython so maybe my question is super obvious. I try to use a shift register with the ESP01 module. For that I would need the SPI but machine.SoftSPI isn't available. Did I flash the wrong firmware or does it simply not exist?

Thanks,
Max