Do you have start guide for MC13213- MC9S08GT60? I have simple program that must enable port C (PTC0) of the mc13213 but It can't enable it as i try to dump the firmware there is the code:
#include /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#include "MC9S08GT60.h"
#include "MC13192_hw_config.h"
#include "mcu_hw_config.h"
#include "port_config_MC1321x.h"
//#define MC13192_RESET_PULLUP PTDPE_PTDPE3
//#define MC13192_CE PTED_PTED2
#define PTCD_PTCD0 _PTCD.Bits.PTCD0
#define PTCD_PTCD0_MASK 1
#define PTCD_PTCD0_BITNUM 0
#define PC0 PTCD_PTCD0
#define PTCDD_PTCDD0 _PTCDD.Bits.PTCDD0
#define PTCDD_PTCDD0_MASK 1
#define PTCDD_PTCDD0_BITNUM 0
#define PC0DIR PTCD_PTCD0
void MCU_init(void); /* Device initialization function declaration */
void main(void) {
MCU_init(); /* call Device Initialization */
SOPT = 0x73; /* Turn off the watchdog. */
TPM1SC = 0x00;
// MC13192_RESET_PULLUP = 0;
// MC13192_CE = 1;
MC13192_RESET_PULLUP = 0;
MC13192_CE = 1;
MC13192_ATTN = 1;
MC13192_RTXEN = 0;
MC13192_RESET = 0; /* Do not initially reset MC13192 */
MC13192_CE_PORT = 1;
MC13192_ATTN_PORT = 1;
MC13192_RTXEN_PORT = 1;
MC13192_RESET_PORT = 1;
MC13192_CE = 1;
MC13192_ATTN = 1;
MC13192_RTXEN = 0;
MC13192_RESET = 0;
/* include your code here */
PC0DIR = 1;
PC0 = 1;
for(;
{
/* __RESET_WATCHDOG(); by default, COP is disabled with device init. When enabling, also reset the watchdog. */
} /* loop forever */
/* please make sure that you never leave main */
}
Thanks, Allen
Message Edited by allenrubis on 2006-12-1311:40 AM
Message Edited by allenrubis on 2006-12-1311:41 AM