I use MC9S08DZ60 and I must make a CAN application, but I am not able to do it because, I have problems to set PLL and the CAN frequency.
Can someone help me?
Thanks.
Bye
Hi !
You don't have to use the PLL to make the CAN bus, and it is better to use the crystal directly.
In the installation path of CodeWarrior, there are some examples, and one of them is a demonstration of CAN on a HCS08DZ60. It uses 2 demo board from freescale connected together.
You can easily take the code of the CAN management and re-used it.
If you don't find the example code, I will give you the files I use.
jOJo
Hi Jo, I don't find the demonstration that you say.How is the name of example?
Thanks
fra
Hi Francy
The project is in C:\Program Files\Freescale\CodeWarrior for Microcontrollers V6.2\(CodeWarrior_Examples)\HCS08\Evaluation Board Examples\EVB9S08DZ60\C, but maybe it not present in all version of CodeWarrior.... I attached the project in a Zip.
jOJo
Thank Jo, I am seeing the example.I have another question.Ho can I make to change the frequency fo can?I set the bau rate in related register, how it is written in data sheet, but it is not the frequency that I want.
Thanks.
Fra
I remember that the baud rate was not a classical value in the example...
To set the baud rate you will have to read and understand AN1798 from Freescale. The datasheet of the DZ60 will also help you. The AN explain how to set up the baud rate of CAN. If you have a good knowledge of CAN, it will not be very difficult...
jOJo