2011-03-27 03:55 PM
Result of ADC Conversion in Dual Channel Simultaneous Injected Conversion
2011-05-17 05:29 AM
Either reading sounds kind of scary seeing as the ADC's are only 12-bit.
2011-05-17 05:29 AM
You can read the ADC as 16 bit right aligned or left aligned. Most folks read it right aligned.
Look at Figure 31 of RM0008, the all densities reference manual. Left aligned data in the injected group has one signed extended bit, the regular group has none, so you are observing normal results. The suspicious amongst us would conclude that ST deliberately designed it that way just to teach us a lesson about the need to read the reference manual. Cheers, Hal2011-05-17 05:29 AM
Thanks guys,
doesn't make sense to me. What's that signed extended bit good for? It just generates effort when shifting regular channels to the injected group or vice versa. best regards!2011-05-17 05:29 AM
Sign extension of a signed 12 bit result makes 16 bit signed arithmetic work properly. See for example, ''http://en.wikipedia.org/wiki/Two's_complement''