Search found 73 matches

by manitou
Wed Apr 22, 2015 6:46 pm
Forum: General Discussion and Questions
Topic: Simulating Tone
Replies: 7
Views: 6475

Re: Simulating Tone

sure enough, the 2nd value is counter() ... 784 42787 831 64417 880 94750 932 94894 988 25294894 1047 50494894 .... and the sounds stops when the counter suddenly gets BIG. The following worked: for i in note: tim.counter(0) tim.freq(i) print(i) pyb.delay(300) Should the counter reset be in the firm...
by manitou
Wed Apr 22, 2015 4:30 pm
Forum: General Discussion and Questions
Topic: Simulating Tone
Replies: 7
Views: 6475

Re: Simulating Tone

I thought it might be garbage collection, but gc.disable() didn't seem to fix it. some more timer results (with first sketch) . numbers are (timer,channel) stops: (2,2) (5,2) (2,3) (2,4) (5,3) (5,4) (2,1) OK: (8,2) (8,1) (9,1) (9,2) (4,1) (12,1) but I still don't know why ?? timers 2 and 5 are 32-bi...
by manitou
Fri Apr 17, 2015 6:53 pm
Forum: MicroPython pyboard
Topic: CRC hardware on pyboard
Replies: 9
Views: 9675

CRC hardware on pyboard

I'm trying to test the CRC hardware on the pyboard (ref manual chapter 4) using stm. If I enable the CRC peripheral, values do change in the CRC data register, but they don't match any test vectors for CRC32. Here is a session, where i enable the CRC peripheral, reset it, set data register to 0, and...
by manitou
Fri Apr 17, 2015 4:39 pm
Forum: Drivers for External Components
Topic: HTU21D temperature/humidity I2C sensor
Replies: 8
Views: 11281

HTU21D temperature/humidity I2C sensor

Here's a simple proof-of-concept class for the HTU21D temp/humidity I2C sensor https://github.com/manitou48/pyboard/blob/master/htu21d.py Breakout board from Sparkfun https://www.sparkfun.com/products/12064 connected to IC1 on pyboard. >>> from htu21d import HTU21D >>> htu21d = HTU21D() >>> htu21d.r...
by manitou
Tue Apr 14, 2015 12:33 am
Forum: General Discussion and Questions
Topic: Logging ADC data to SD-card
Replies: 9
Views: 12726

Re: Logging ADC data to SD-card

Did another test using timer 2 as the timestamp instead of the micros function, but keeping the values from micros to compare them (red in the plots). Seems like the timer for micros does stop during the jitter, while timer 2 still runs. Wow, you are right about micros() losing interrupts. The SD d...
by manitou
Sat Apr 11, 2015 7:04 pm
Forum: General Discussion and Questions
Topic: STAccel script in STM32F4 DISC
Replies: 12
Views: 12069

Re: STAccel script in STM32F4 DISC

SpotlightKid wrote:You need to copy staccel.py to your flash on the Discovery board, of course.
Yep, that fixed it. duh. I was mistakenly assuming that since the staccel.py was in the firmware directories that it might magically be accessible...
thanks
by manitou
Sat Apr 11, 2015 11:41 am
Forum: General Discussion and Questions
Topic: STAccel script in STM32F4 DISC
Replies: 12
Views: 12069

Re: STAccel script in STM32F4 DISC

hmmm, i just started testing with DISCOVERY, got LEDs to flash, but Accel isn't working, i edited boards/STM32F4DISC/staccel.py... what am i missing? Micro Python v1.4.1-12-g282ca09-dirty on 2015-04-11; F4DISC with STM32F407 >>> import staccel Traceback (most recent call last): File "<stdin>", line ...
by manitou
Sat Apr 04, 2015 9:49 pm
Forum: MicroPython pyboard
Topic: Can you get the supply voltage?
Replies: 21
Views: 22062

Re: Can you get the supply voltage?

As noted above, I'd prefer that adc.read_core_vref() return the estimated Vcc value assuming the internal VREF is 1.21v, or even just return the raw 12-bit ADC values (EDIT: use ADC channel 17). I varied the input voltage to the pyboard 3.3v pin and used pyb.ADC(17).read() to get the raw ADC value. ...
by manitou
Wed Apr 01, 2015 4:16 pm
Forum: Development of MicroPython
Topic: A couple of questions re maths
Replies: 9
Views: 7674

Re: A couple of questions re maths

no real help, but i modified your code to just load s15 and store it in array[1], import array a = array.array("f", [3.0, 4.0, 0.0]) # Use same register R3 as float.cod @micropython.asm_thumb def mult(r0): mov(r3, r0) # r3 = address of array[0] data(2, 0xD3ED, 0x007A) # flds s15, [r3] add(r3, 4) # a...
by manitou
Tue Mar 24, 2015 11:05 pm
Forum: MicroPython pyboard
Topic: low power support?
Replies: 26
Views: 23515

Re: low power support?

Here are results (milliamps from a DMM) for my pyboard low power tests. Config clock 168Mhz 84 42 24 8 USB power spin-loop 65ma 37 23 16 11 ma some IO off 54ma 30 sleep/wfi 26 18 13 ma some IO off 15ma 10 3.3v power spin-loop 61ma some IO off 52ma 29 sleep/wfi 24 16 13 some IO off 14ma 9 6 5 4 ma st...