Search found 29 matches

by cebersp
Wed Mar 03, 2021 2:44 pm
Forum: Raspberry Pi microcontroller boards
Topic: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output
Replies: 4
Views: 177

Re: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output

@rgcoldeman, thank you very much to point me to you project, which shows how to use DMA! What I don't understand: How do you know, that these channels are not used by anything? ( I had no knowledge of mem32[], so easy.) Yes, I think, DMA should be able to be clocked at a certain clock rate too and f...
by cebersp
Wed Mar 03, 2021 2:24 pm
Forum: Raspberry Pi microcontroller boards
Topic: Where can we find information about the inline assembler for Pico?
Replies: 12
Views: 422

Re: Where can we find information about the inline assembler for Pico?

Yes, I learned rp2040 is ARMv6. These things are new for me and the distribution of information is confusing for me. Thanks you very much that you have made available such wealth of good information in you github, Peter. Great!!! (I have studied your fft and filter code, at the moment I use Goertzel...
by cebersp
Wed Mar 03, 2021 2:15 pm
Forum: Raspberry Pi microcontroller boards
Topic: ADC input impedance
Replies: 2
Views: 97

Re: ADC input impedance

Yes, it is mentioned in the rp2040 datasheet, that you have to switch off the inputs. Pullup is active elsewise. If you want to see, what is going on, you can have a look at the registers with regPeek(). Christof # regpeek.py from machine import * @micropython.asm_thumb def regPeek(r0): # Address mo...
by cebersp
Wed Mar 03, 2021 10:18 am
Forum: Raspberry Pi microcontroller boards
Topic: Where can we find information about the inline assembler for Pico?
Replies: 12
Views: 422

Re: Where can we find information about the inline assembler for Pico?

OK, found it. Push and pop can only be used on low registers r0...r7. (((PUSH {<loreglist>})))
This seems to work:

Code: Select all

    
    mov(r5,r8)
    mov(r6,r9)
    mov(r7,r10)
    push({r5,r6,r7})
    
    .....
    
    pop({r5,r6,r7})
    mov(r8,r5)
    mov(r9,r6)
    mov(r10,r7)
    
by cebersp
Wed Mar 03, 2021 6:51 am
Forum: Raspberry Pi microcontroller boards
Topic: Where can we find information about the inline assembler for Pico?
Replies: 12
Views: 422

Re: Where can we find information about the inline assembler for Pico?

Regarding push and pop: Can I use this code from https://github.com/peterhinch/micropython-filters/blob/master/asm.py on Pico M0+?? EDIT: Tried it, it crashes. Even without using these registers. # Make r8-r11 safe to use by pushing them on the stack @micropython.asm_thumb def foo(r0): data(2, 0xe92...
by cebersp
Wed Mar 03, 2021 6:42 am
Forum: Raspberry Pi microcontroller boards
Topic: Where can we find information about the inline assembler for Pico?
Replies: 12
Views: 422

push - Solved

Hi, if i write @micropython.asm_thumb def dds(r0, r1): # Buffer, ctrl-array push({r8,r9}) ... I get: "Traceback (most recent call last): File "<stdin>", line 47, in dds SyntaxError: unsupported Thumb instruction 'push' with 1 arguments" For pop({r8,r9}) it is the same. What's wrong here? - Solved: O...
by cebersp
Wed Mar 03, 2021 6:29 am
Forum: Raspberry Pi microcontroller boards
Topic: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output
Replies: 4
Views: 177

Re: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output

Improved Version with fixed timing using the 1MHz system timer. Updates at 500kHz. (I still don't know how to finish code cleanly running on the second core. There is some discussion going on about this.) Christof # SinePwmF.py # DDS Sine Generator in second core by CWE # Example using Double PWM # ...
by cebersp
Mon Mar 01, 2021 6:36 pm
Forum: Raspberry Pi microcontroller boards
Topic: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output
Replies: 4
Views: 177

DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output

Hi, perhaps this might be of interest for someone? It is a Sine Generator using DDS. The wave is generated using the second core. To achieve higher resolution in combination with higher frequency it adds 2 pwm signals with 6bits each. Both channels from pin15 (1.5k) and pin15 (100k) are connected to...
by cebersp
Sat Feb 27, 2021 10:00 am
Forum: Raspberry Pi microcontroller boards
Topic: ulab for MicroPython?
Replies: 1
Views: 149

ulab for MicroPython?

Hi,
how can I precompile or get precompiled and load ulab for Pico in MicroPython ?
Thank you, Christof
by cebersp
Sat Feb 27, 2021 9:57 am
Forum: Raspberry Pi microcontroller boards
Topic: installing default libraries on pico
Replies: 7
Views: 247

Re: installing default libraries on pico

Hi,
per rightclick on the library in thonny you can upload the file to the board.
Christof