Sigma-Delta on PIC24FJ128GC006

General discussion on mikroC PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
HyperUniverse
Posts: 282
Joined: 17 Jun 2009 10:42

Sigma-Delta on PIC24FJ128GC006

#1 Post by HyperUniverse » 13 Oct 2021 10:16

Hi,

I have this PIC24FJ128GC006 and I'm trying to get the Sigma-Delta converter working, but it's confusing me.

On the very first page, the datasheet is telling us it’s a 16-bit Sigma-Delta.
Later the same datasheet is showing us one 16 bit register SD1RESH, and then a second one 16 bit register SD1RESL (that would make it a 32-bit).
Furthermore, the same datasheet is giving us the option to:
1. Round result to 16-bit
2. Don’t round it at all (would that be a 32-bit? how come when the first page is telling us it's just a 16-bit?????)
3. Round result to 24-bit
4. Round result to 8-bit

And this is confusing me.

Basically, I'm trying to get an unsigned long int 0 to 65534, but all I can get is a signed (or so it appears as it is 32767 at max value, and is 65534 at zero value)

What is it that I don't do or get right?


How can I get a 32-bit (SD1RESH +SD1RESL) on a 16-bit processor?

Thanks.

Post Reply

Return to “mikroC PRO for dsPIC30/33 and PIC24 General”