Search found 490 matches

by mcauser
Tue Sep 08, 2020 12:56 am
Forum: Programs, Libraries and Tools
Topic: MCP23008 General Purpose Driver
Replies: 8
Views: 993

Re: MCP23008 General Purpose Driver

I wrote a driver for the MCP23017, which is similar to the MCP23008, only with two 8-bit ports instead of one.
https://github.com/mcauser/micropython-mcp23017
You may be able to pinch some code/ideas from it.
by mcauser
Tue Sep 08, 2020 12:52 am
Forum: Programs, Libraries and Tools
Topic: nRF24L01+ specification ?
Replies: 6
Views: 615

Re: nRF24L01+ specification ?

According to the Nordic Semi website, yes, that Sep 2008 datasheet is the most recent: https://infocenter.nordicsemi.com/pdf/nRF24L01P_PS_v1.0.pdf https://infocenter.nordicsemi.com/topic/struct_nrf24/struct/nrf24L01p.html You can find an example here: https://github.com/micropython/micropython/tree/...
by mcauser
Wed Aug 26, 2020 9:18 am
Forum: Other Boards
Topic: MCUDev Black STM32F407VET6 + STM32F407ZET6 dev boards
Replies: 163
Views: 106579

Re: MCUDev Black STM32F407VET6 + STM32F407ZET6 dev boards

Perhaps it's time for a new thread. If you are using I2C with a char lcd, I am assuming you're talking about driving it with a PCF8574 or a MCP23008/MCP23017 backpack. https://github.com/dhylands/python_lcd has examples using both, and also plain old 4 or 8bit GPIO. The ESP8266 examples are compatib...
by mcauser
Wed Aug 26, 2020 4:39 am
Forum: Drivers for External Components
Topic: Drivers for EEPROM, FRAM and Flash chips
Replies: 10
Views: 2870

Re: Drivers for EEPROM, FRAM and Flash chips

One thing to watch out for when comparing FRAM with SPI Flash is that with FRAM, reads are destructive, and with Flash there's almost unlimited reads but write/erase cycles are limited. The limits may be well beyond the lifetime of your app, but worth a quick investigation.
by mcauser
Mon Aug 24, 2020 12:57 pm
Forum: ESP8266 boards
Topic: ets_delay_us uint16_t changed to uint32_t in >= SDK 2.2.x [SOLVED]
Replies: 4
Views: 601

Re: ets_delay_us uint16_t vs uint32_t

OK so, I have figured out why now. In my case-sensitive.dmg "on the metal" esp-open-sdk, I was bumping the VENDOR_SDK from 2.1.0 to 2.2.1 However... In >= 2.2.0, ets_delay_us() was updated to use a uint32_t! ESP8266_NONOS_SDK-2.1.0 /include/osapi.h void ets_delay_us(uint16_t us); ESP8266_NONOS_SDK-2...
by mcauser
Mon Aug 24, 2020 12:52 pm
Forum: ESP8266 boards
Topic: ets_delay_us uint16_t changed to uint32_t in >= SDK 2.2.x [SOLVED]
Replies: 4
Views: 601

Re: ets_delay_us uint16_t vs uint32_t

Interesting... When I make using docker , it needs to be void ets_delay_us(uint16_t us); . As it is currently in the repo: https://github.com/micropython/micropython/blob/master/ports/esp8266/etshal.h#L9 cd ports/esp8266 docker run --rm -v $HOME:$HOME -u $UID -w $PWD larsks/esp-open-sdk make When I ...
by mcauser
Sat Aug 22, 2020 3:10 pm
Forum: Drivers for External Components
Topic: LCDI2C : equivalent of Arduino's Liquid Crystal (support for custom char)
Replies: 1
Views: 717

Re: LCDI2C : equivalent of Arduino's Liquid Crystal (support for custom char)

Have you seen Dave Hyland's version?
His also works with the common "I2C backpack" (PCF8574), Adafruit's backpack (MCP23008), as well as 4 and 8-bit GPIO:
https://github.com/dhylands/python_lcd
by mcauser
Sat Aug 22, 2020 2:36 pm
Forum: ESP8266 boards
Topic: Write to register MCP lib and MCP23008 on ESP-12F
Replies: 3
Views: 659

Re: Write to register MCP lib and MCP23008 on ESP-12F

ie. to avoid the TypeError, wrap your value in a bytearray: # change io.write_gpio(5) # to io.write_gpio(bytearray([5])) The OLAT register address is 0x0A, but when the port pin is in output mode (pin's IODIR bit =0), you write to the GPIO register instead and it internally updates the OLAT register...
by mcauser
Sat Aug 22, 2020 2:04 pm
Forum: ESP8266 boards
Topic: how to show image in lcd display
Replies: 1
Views: 863

Re: how to show image in lcd display

Here's how you draw some random colours. >>> import random >>> for i in range(400): >>> display.write(None, bytearray([random.getrandbits(8)])) You use display.write(command=None, data=your-bytes) to send pixel data to the display. To understand what it is doing, try writing the same 2 bytes, hundre...