Coding examples for the S12

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

Coding examples for the S12

5,256 Views
SeaBee
Contributor I
I am using the NE64 flavor of the S12.  Is there some place that exists that you can find good examples of drivers for the chip peipherals? (SPI, I2C, ATD, ...)  The small details are killing me.  The ref. manual is not enough.
Labels (1)
0 Kudos
4 Replies

831 Views
SeaBee
Contributor I

_sam_

That website has a lot of great stuff.  I would like to see more sites like that if anyone has any.

0 Kudos

831 Views
samiran_cj
Contributor I
If you are not interested in reversing the beans and have some knowledge of C and assembly.

Willing to spend time in porting freescale DP256 C code to the NE64 architecture and want a good set of examples as a launching pad for understanding the metrowerks compiler and freescale mcu.

You could check out this site

http://www.mecheng.adelaide.edu.au/robotics/

Code is compatible with mc9s12 freescale. It considerably shortened my learning curve, unlike the voluminous ref. manual.
The examples work once you understand the dynamic of the bus clock. It is helpful to generate the NE 64 stationery and then include/add the project files.

Application notes are available from Freescale also, but i found them difficult to follow. There doesnt seem to be a good index to tell you what the app notes will do. I use the trial and error method as usual...seems to be the most effective method.


Hope this helps. :smileyvery-happy:
Sam.
0 Kudos

831 Views
CrasyCat
Specialist III

Hello

Just a suggestion.

Why not using Processor Expert, configure your peripheral using the GUI and let it generate low level drivers for you.

You can then look at the generated code and either use it as it is or take it as sample code for your application?

CrasyCat

0 Kudos

831 Views
imajeff
Contributor III
I think ProcessorExpert goes a little wild, and is not easy for beginners trying to reverse engineer.

I did it when developing a FreeRTOS port, but that was the hardest part of the port, and I already knew how the perriferals work.
0 Kudos