Modules in C for MC9s12xdp512

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

Modules in C for MC9s12xdp512

3,686 Views
RubenCG
Contributor III
Hi everybody,

I'm working with 16-bit MCU mc9s12xdp512 and Codewarrior compiler. I was trying to find some modules in C for SCI functions. I mean, I'm searching for sci.h and sci.c that includes the functions for working with this module.
I don't know where I can find them, perphaps I'll need sci.h,sci.c, timer.h,timer.c, spi.h, spi.c, pit.h, pit.c... I thought that these kind of modules are already made and it will be simple to download them.

Thanks in advance
Labels (1)
0 Kudos
Reply
6 Replies

1,226 Views
CrasyCat
Specialist III
Hello
 
Just create a project using the wizard and activate ProcessorExpert.
 
You can then configure what you want your drivers to do and ProcessorExpert will generate code for you.
 
CrasyCat
0 Kudos
Reply

1,226 Views
RubenCG
Contributor III
Thanks CrazyCat, but if I want to make my program without Processor Expert? Is it impossible to download these files (sci.c, sci.h, pit.c, pit.h...)?.
I don't know where are the function for initializating a sci channel or the timing for a periodic interrupt, etc. I thought that these "software drivers" for my mc9s12xdp512 are free and well-known but it becames a hard task.

Thank you
0 Kudos
Reply

1,226 Views
JimDon
Senior Contributor III
Here are some sample programs for the sci.

Scroll down to get to them. They were written for the DP256, but should work ok.
I'd be interested to know that they do work work on an xdp.
0 Kudos
Reply

1,226 Views
RubenCG
Contributor III
Thanks Jim, I keep an eye on them. I can't believe that Freescale doesn't have these simple functions for each MCU...The only way is the Processor Expert? I need to program a very-clean-simple-for-dummies-code, the PE is not the solution.
We keep in contact!
Ruben
0 Kudos
Reply

1,226 Views
JimDon
Senior Contributor III
Here is one idea.
Use PE to write some hard to follow, but correct code.

Look up the registers in the  specifications and re-write the code in a style you like and comment it.


0 Kudos
Reply

1,226 Views
RubenCG
Contributor III
I'm going to use your example and some PE-ideas to make the program on my own way... I hope in few days I could make some tests of sci and pit modules (based on your examples). I'll tell you the final result!

Thank you very much for your inestimable help.
Rbn
0 Kudos
Reply