MSGID: 11ab9d85   
   REPLY: 6c0e9188   
   PID: PyGate 1.5.2   
   TID: PyGate/Linux 1.5.2   
   CHRS: ASCII 1   
   TZUTC: 0000   
   REPLYADDR news-1513678000@discworld.dascon.de   
   REPLYTO 3:633/10 UUCP   
   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.   
      
   --- PyGate Linux v1.5.2   
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)   
   SEEN-BY: 105/81 106/201 128/187 129/14 305 153/7715 154/110 218/700   
   SEEN-BY: 226/30 227/114 229/110 112 134 200 206 300 317 400 426 428   
   SEEN-BY: 229/470 616 664 700 705 266/512 291/111 292/854 320/219 322/757   
   SEEN-BY: 342/200 396/45 460/58 633/10 280 414 418 420 422 509 2744   
   SEEN-BY: 712/848 770/1 902/26 2320/105 5020/400 5075/35   
   PATH: 633/10 280 229/426   
      
|