Hi Molly,

On Mon, 10 Aug 2020, 3:31 am 'Molly Smith' via [email protected], <
[email protected]> wrote:

>
> Hello,
>
> I'm trying to get 8-bit real values from the katADC yellow block in
> Simulink. I was wondering why the block outputs fixed 8.7 bit values
> instead? I found the following  explanation on one of the CASPER wikis but
> I'm still confused.
>
> "The ADC block converts analog inputs to digital outputs. Every clock
> cycle, the inputs are sampled and digitized to 8 bit binary point numbers
> in the range of -1 to 1 and are then output by the ADC. This is achieved
> through the use of two's-compliment representation with the binary point
> placed after the seven least significant bits. This means we can represent
> numbers from -128/128 through to 127/128 including the number 0. Simulink
> represents such numbers with a fix_8_7 moniker. "
>
> Does it make sense to use a reinterpret block to convert it back to 8-bits?
>

To be clear, the numbers are 8 bits already, they've just been divided by
2**7 to normalize to the range +/-1.
That said, yes, a reinterpret block would let you rescale to integer values
between -128 and 127 if this is what you want.
As Dan warns, this might have further downstream implications in your
design.

Cheers
Jack



> Thanks,
> Molly
>
> --
> You received this message because you are subscribed to the Google Groups "
> [email protected]" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/d197809c-a3a9-4618-9b0f-bcafaaf4c1a7n%40lists.berkeley.edu
> <https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/d197809c-a3a9-4618-9b0f-bcafaaf4c1a7n%40lists.berkeley.edu?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CAG1GKSnm4vCAg8kp%2BrE80cdS%3D5W7KJEMZvBTznQYJQHq8VMkFQ%40mail.gmail.com.

Reply via email to