New To CodeWarrior 5.0

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

New To CodeWarrior 5.0

1,964 Views
vivek31be
Contributor I

Hi,

 

I have downloaded Codewarrior v5.0 special edition for evaluating its capabilities before actually going for purchse but I am not finding any document and help. I am able to write small codes but not able to debug them properly.

 

Please help, My evaluation is in the direction of How To

 

1) write optimized c code?

2) find different librararies?

3) debug and simulate different instruements like 7 segment display, LED, Terminal, command etc.

 

Please help. If any one having ample codes and how to use and debug them, it will be greatful. Since, examples given in codewarrior itself are poorly documented and don't know how to simulate them.

 

I am attaching installed plugins version file.

Labels (1)
Tags (1)
0 Kudos
3 Replies

434 Views
admin
Specialist II

hello ,

I am new to the Code warrior too working on the same version.. I am basically using a HCS12X(MC9S12XDP512) MCU.

I did not understand the attatched file u sent bt i could certainly help u with the sample programs of  turning on the LED which I worked on.

[1] 

      #include<hidef.h>
      #include<<mc9s12xdp512.h>
      #pragma LINK_INFO DERIVATIVE "mc9s12xdp512"
      void main(void)
      {
     DDRB  = 0x03;   //enabling PORTB as output//
     PORTB = 0xFF;   // PORTB_PB0/1/2/3 can be used to individually access the port pins//

 

[2]

     #include<hidef.h>
    #include<<mc9s12xdp512.h>
    #pragma LINK_INFO DERIVATIVE "mc9s12xdp512"
    void delay( void)
    {
    unsigned int i;
   for(i=0;i<50000;i++);
   }
  void main(void)
  {
  DDRB  = 0x03;
  a:
 PORTB = 0xFF;
 delay();
 PORTB = 0;
 delay();
 goto a;

 

 

[ 3.] //Program to check the status of the push button on led //
--------------------------------------------------------------------------------------------------------------------------------------
#include <hidef.h>     
#include <mc9s12xdp512.h>
#pragma LINK_INFO DERIVATIVE "mc9s12xdp512"
#define inbit PORTB_PB4          
#define outbit PORTB_PB0
unsigned char status;
void main(void)
{
DDRB  = 0x0F;                            // initializing the upper nibble to inputs n lower to outputs//
PUCR_PUPBE =1;                      //enabling the pull-up control registers for PORTB//
while(1)
{
  status = inbit;
  outbit = status;
}
}

 


 I am also sending u  a PDF file on CODE WARRIOR as an attatchment. go through.

All The Best!

0 Kudos

434 Views
vivek31be
Contributor I

Hi manasa,

 

Thanks a lot. This really helped for evaluation purposes. Can you please give me some complex example that have full chip simulation. Most of the examples on web require board to be connected, I actually do not have board right now. So, before actual purchase of board and codewarrior software we are trying to test codewarrior capabilities.

 

Thanks a lot again.

 

Vivek

0 Kudos

434 Views
admin
Specialist II

well Vivek,

 Since I am a beginner i am just working on the basic programs of toggling and glowing led using, delays, timers, interrupts..and I am given a demo kit on which I have been working these programs...

I will start working on the complex programs from the next week. May be then... I would help you out.

I think I have few demo programs for full chip simulation.. I'l check and mail back.

 

0 Kudos