Search found 8 matches
- Fri Aug 20, 2021 8:44 am
- Forum: Raspberry Pi microcontroller boards
- Topic: Pi Pico push seems to truncate value at 5 bits
- Replies: 2
- Views: 1384
Re: Pi Pico push seems to truncate value at 5 bits
Thanks very much - I can see that now. I just assumed loading a register with an immediate value was like normal assembler.
- Thu Aug 19, 2021 8:31 am
- Forum: Raspberry Pi microcontroller boards
- Topic: Pi Pico push seems to truncate value at 5 bits
- Replies: 2
- Views: 1384
Pi Pico push seems to truncate value at 5 bits
The following clip is very basic but as far as I can see is giving the wrong result. Where am I going wrong? I wanted to implement a tachometer by decrementing X until a pin goes HIGH. I thought I could get the X value out by just moving X into ISR then pushing it. As below:..... Frequency in statem...
- Tue Aug 17, 2021 6:59 am
- Forum: Raspberry Pi microcontroller boards
- Topic: PIO: where am I going wrong? [SOLVED-ish]
- Replies: 16
- Views: 14505
Re: PIO: where am I going wrong? [SOLVED-ish]
The following clip is very basic but as far as I can see is giving the wrong result. Where am I going wrong? I wanted to implement a tachometer but decrementing X until a pin went HIGH. I thought I could get the X value out by just moving X into ISR then pushing it. As below:..... import rp2 code]@r...
- Sun Jul 18, 2021 10:47 am
- Forum: General Discussion and Questions
- Topic: AS5600 magnetic rotary sensor
- Replies: 5
- Views: 4107
Re: AS5600 magnetic rotary sensor
Thanks - I will go through some other drivers and revise mine.
- Sun Jul 18, 2021 1:05 am
- Forum: General Discussion and Questions
- Topic: AS5600 magnetic rotary sensor
- Replies: 5
- Views: 4107
Re: AS5600 magnetic rotary sensor
From the cPython documentation. "Descriptors are used throughout the language. It is how functions turn into bound methods. Common tools like classmethod(), staticmethod(), property(), and functools.cached_property() are all implemented as descriptors." I got the impression from this that descriptor...
- Sat Jul 17, 2021 9:24 pm
- Forum: General Discussion and Questions
- Topic: AS5600 magnetic rotary sensor
- Replies: 5
- Views: 4107
Re: AS5600 magnetic rotary sensor
Thanks Pythoncoder, Why I liked descriptors in this setting: 1. I think Attributes are simple and intuitive use and avoid exposing separate getter and setter functions to the user. 2. I tried using properties but these (at least in my implementation) where much more verbose and actually harder to pr...
- Sat Jul 17, 2021 12:35 am
- Forum: General Discussion and Questions
- Topic: AS5600 problem
- Replies: 1
- Views: 981
AS5600 problem
One problem fixed.
Silly me.
There as a simple logic problem - I did not write back to register cache when setting a new value.
Silly me.
There as a simple logic problem - I did not write back to register cache when setting a new value.
- Fri Jul 16, 2021 11:48 pm
- Forum: General Discussion and Questions
- Topic: AS5600 magnetic rotary sensor
- Replies: 5
- Views: 4107
AS5600 magnetic rotary sensor
Hi, I am new to github, and writing i2c drivers so I need some help. I am writing a driver for the AS5600. I have made all the registers and bitfields in data sheet attributes of a class. There is an early example of a higher level class that inherits from above, with a simple useage example. I am u...