So far MicroPython uses only two of the RTC 32-bit backup registers available (20 on Pyboard, 32 on PYBD).
On a PYBV11 BKP1R..BKB18R are available for general usage.Keeping data inside RTC avoids powering backup RAM.
Search found 135 matches
- Thu Jan 10, 2019 10:53 am
- Forum: MicroPython pyboard
- Topic: Save data on power down
- Replies: 14
- Views: 8560
- Fri Jan 04, 2019 9:41 am
- Forum: MicroPython pyboard
- Topic: Save data on power down
- Replies: 14
- Views: 8560
Re: Save data on power down
A 9V battery on MCU VBAT will destroy the MCU. Don't do this!
On a Pyboard VBAT is not MCU VBAT, I guess MCU VBAT is named VBACK on the board.
A CR2032 on VBACK is sufficient.
On a Pyboard VBAT is not MCU VBAT, I guess MCU VBAT is named VBACK on the board.
A CR2032 on VBACK is sufficient.
- Thu Jan 03, 2019 10:39 pm
- Forum: MicroPython pyboard
- Topic: LCD example library? (it's for a birthday present)
- Replies: 4
- Views: 2762
Re: LCD example library? (it's for a birthday present)
Just one for now.... import lcd160cr import uctypes lcd = None frame_cnt = 0 frame = None rtc = pyb.RTC() def idle_wait(dt=0): pyb.delay(dt) def d01_clock(dt=40, sh=1, fmt='%2d:%02d:%02d', init=0): global frame_cnt if init == 2: return 'clock', -1 elif init == 3: return if init: lcd.set_spi_win(2, 2...
- Thu Jan 03, 2019 10:06 pm
- Forum: MicroPython pyboard
- Topic: Save data on power down
- Replies: 14
- Views: 8560
Re: Save data on power down
VBAT should be between 1.7V and 3.3V. Disabling RTC tick needs special handling as it is pretty hard to disable RTC once it is running . However, using a Pyboard Lite would be perfect as it doesn't have a LSE crystal, so RTC tick always comes from LSI, which runs from Vdd.
- Thu Jan 03, 2019 9:20 am
- Forum: MicroPython pyboard
- Topic: LCD example library? (it's for a birthday present)
- Replies: 4
- Views: 2762
Re: LCD example library? (it's for a birthday present)
Did you have a look at https://www.youtube.com/watch?v=OOz9U_YdstM ?
If there is a demo that matches your needs I will provide you with that code.
If there is a demo that matches your needs I will provide you with that code.
- Thu Jan 03, 2019 9:16 am
- Forum: MicroPython pyboard
- Topic: Save data on power down
- Replies: 14
- Views: 8560
Re: Save data on power down
A CR2032 provides ~220mAh capacity. Assuming VBAT consumption is ~10 µA this would give ~3 years of operation.
At 1/256 s RTC tick frequency typical Pyboard VBAT consumption is more like 1.5 µA. This will result in a shelf life of >10 years.
With RTC disabled VBAT is << 1 µA.
At 1/256 s RTC tick frequency typical Pyboard VBAT consumption is more like 1.5 µA. This will result in a shelf life of >10 years.
With RTC disabled VBAT is << 1 µA.
- Wed Jan 02, 2019 4:01 pm
- Forum: MicroPython pyboard
- Topic: Save data on power down
- Replies: 14
- Views: 8560
Re: Save data on power down
With a Pyboard either RTC backup registers or static backup RAM (4kByte) can be used for such tasks.
For a simple ODOmeter something like:
would do the job.
As long as VBAT is powered the content of RTC_BKP9R will be valid.
For a simple ODOmeter something like:
Code: Select all
import stm
stm.mem32[stm.RTC+stm.RTC_BKP9R] += 1
As long as VBAT is powered the content of RTC_BKP9R will be valid.
- Mon Dec 03, 2018 11:55 am
- Forum: MicroPython pyboard
- Topic: Is there a way to increase RAM?
- Replies: 7
- Views: 4434
Re: Is there a way to increase RAM?
There are 192kB of SRAM on the F405. A PYBV11 shows: >>> micropython.mem_info(1) stack: 484 out of 15360 GC: total: 102656, used: 1440, free: 101216 64 kB SRAM is used for filesystem cache and ~30kB SRAM for static variables and stack (depending on build options). Using 64k as file system cache is a...
- Tue Nov 27, 2018 4:36 pm
- Forum: Drivers for External Components
- Topic: pinout for the Colour LCD skin LCD160CRv1.0H
- Replies: 10
- Views: 8873
Re: pinout for the Colour LCD skin LCD160CRv1.0H
Note that LCD160CR needs to be turned on by pulling X4 high. It's also worth mentioning that LCD160CR supports UART communication, but there is no HW flow control. Minimal interface in I2C mode is: VIN, GND, SCL, SDA and X4 to turn on the display. Instead of X4 the 3.3V input on the 10-pin connector...
- Wed Nov 07, 2018 6:46 pm
- Forum: General Discussion and Questions
- Topic: javascript time stamp to python date
- Replies: 1
- Views: 1440
Re: javascript time stamp to python date
Use:
Code: Select all
UNIX_TIME = 946681200
mpy_ts = js_ts - UNIX_TIME*1000