Mohamed Othman

ATD and MSCAN for HCS12

Discussion created by Mohamed Othman on Sep 6, 2007
Latest reply on Sep 21, 2007 by Martyn Gallop
Hi,
I have two questions please regarding the ATD and the MSCAN modules of HCS12.
 
ATD:
The maximum digital reading of an analog channel should correspond to the voltage value of Vref. for example, if we have 10bit resolution channel and the signal connected to it reads x volt, then the digital reading value d is:
d= x * (1023/Vref).
So, if Vref= 4.4V and x = 2.5v then d=511.
the point is that 1023 which is the digital max reading is converted from the value Vref. what is happening to me is that 1023 corresponds to 5V regardless of the value of Vref. so if I connected Vref to 4.4V reference, then the max digital value will be about 900. from my understanding, this shouldn't happen, and Vref is always corresponds to the digital value of 1023 (10bit resolution).
can anyone please tell me where is the mistake?
 
MSCAN:
In case we use the acceptance ID that accepts all messages (by setting the Mask to not mask any bits), can we check the ID of the received message in software?
in other words, let's say I want to receive all messages by not masking any acceptance ID and then check the Acceptance ID registers in the RX buffer upon receiving (using the interrupt routine) to see if the desired message was received, can we do that?
or we have to stick to the Acceptance ID and masks and once the message is received, its Acceptance registers in the RX buffer are all gone?
 
thank you a lot, and I really appreciate the help,
 
bye.
 
 

Outcomes