From: news-1513678000@discworld.dascon.de   
      
   On 2026-01-17, Single Stage to Orbit wrote:   
   >> I'd suggest to have a look at the manual and SDK and see how to do it   
   >> from C then hand translate the C code into ASM...   
   >   
   > I've found the following:   
   >   
   > https://github.com/thejpster/rp-hal-rp2350-public/blob/main/rp   
   35x-hal/examples/pwm_blink.rs   
      
   Why not go to the primary source?   
      
   I believe the RP2xx0 datasheet has all you need in the PWM chapter (CH 4.5   
   for RP2040, or CH 12.5 for RP2350).   
      
   There is a list of registers with all the relevant bits explained.   
      
   > The funny thing is that the Pimoroni tiny2040 that I also have has a   
   > RGB LED on it, there's no data sheet for it but it appears to be   
   > reversed, in that all the GPIO pins attached to this LED are all active   
   > low, (i.e ~R GPIO18, ~B GPIO19, ~G GPIO20) so works in the opposite way   
   > to the LED on GPIO 25 on rp2040!   
      
   This is quite common - they probably used a 4-pin LED package with common   
   anode, so you have to drive the individual lines low to activate the LED.   
   You could use 3 external inverters or transistors to make them active high,   
   but why bother (the parts cost money and take up PCB space) when all it   
   takes to fix this is a single line of code on the software side?   
      
   cu   
   Michael   
   --   
   Some people have no respect of age unless it is bottled.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|