Sam Choi

MC9S12XEP100 - Generating CAN-based message according to the transmission rate

Discussion created by Sam Choi on Apr 14, 2009
Latest reply on May 10, 2009 by James Murray

Hi there,

 

I am new to MCU design and just want to get some help on how to generate CAN message according to the official transmission rate. I am using the MC9S12XEP100, and I just figured out how to set up the ADC and be able to do the analog input conversion. I am wondering what I should do next in order to sample the converted ADC result and package them as CAN message. My concern is:

 

1) Should I use ECT, PIT, RTI, or I don't need to use interrupt at all? Let say if I want to sample the analog input for every 100ms, what is the best approach to do it?

 

2) I know the ADC module comes with an interrupt channel too, but I am not sure if it will work or not when this interrupt is time-driven (like interrupt every 100ms)rather than event-driven.

 

I am just confused with all the available counter, down-counter, and etc from the S12 family and just want to start with the best approach. Thanks for the help!

Outcomes