S12X Conversion Sequence Length and WRAP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12X Conversion Sequence Length and WRAP

Jump to solution
1,136 Views
maatweeb
Contributor II

What is the difference between using the conversion sequence length and the WRAP bits?  If SCAN = 1 and MULT = 1 (continuous scan and multiple channels), won't the conversion sequence length and the WRAP bits be doing the same function?  Does one have a precendence over the other?  Can I only write to WRAP and leave conversion sequence at the default?  Currently I just set them to be equal, i.e. wrap at AN7 and conversion length = 8.

Labels (1)
0 Kudos
Reply
1 Solution
639 Views
kef
Specialist I

You can start conversion sequence from channel other than AN0. With default WRAP setting or on older S12 which don't have WRAP bits, you could start for example sequence of 8 channels from AN12. That would convert channels AN12 to AN15, then AN0 to AN3. I didn't try any wrapping myself yet, but I think with wrap set to 13, you could convert AN12,AN13, then AN0 to AN5. This makes sense in case tight layout asks you to skip some ATD pins.

View solution in original post

0 Kudos
Reply
2 Replies
640 Views
kef
Specialist I

You can start conversion sequence from channel other than AN0. With default WRAP setting or on older S12 which don't have WRAP bits, you could start for example sequence of 8 channels from AN12. That would convert channels AN12 to AN15, then AN0 to AN3. I didn't try any wrapping myself yet, but I think with wrap set to 13, you could convert AN12,AN13, then AN0 to AN5. This makes sense in case tight layout asks you to skip some ATD pins.

0 Kudos
Reply
639 Views
maatweeb
Contributor II

Sounds good.  Thanks.

0 Kudos
Reply