Support on MC13213 Single chip (HC08)

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

Support on MC13213 Single chip (HC08)

4,751 Views
allenrubis
Contributor I
Hi,

Im Allen Rubis I would like to know how to program and simulate the firmware created in the Code warrior (SE). Also, is their any available tutorials or getting started manual. because im having diffculty on the software itself. I think its very complicated. im using the eval board SARD.

Mt current project must measure the transmit power, receive sensitivity and range test including receive current and sleep current.

I would like to measure the parameters the said parameter. Do you have firmware program for this test and also or on how to program and simulate the said testing.

Thanks,
Allen Rubis
Labels (1)
0 Kudos
Reply
8 Replies

1,180 Views
allenrubis
Contributor I
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(;:smileywink: {
/* __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

0 Kudos
Reply

1,180 Views
Iggy
Contributor I
And what eva-board are you using? PC0 and PC1 are in SCI function and are connecting to FT232 (USB-UART convertor) - it´s situation on EVB board. And if you want to use UART communication, so look at the functions in SCI.c (it´s part of every example project). On SARD board these pin are unused (unconnect).
Another way: are You sure that assignments in #define block are right?
0 Kudos
Reply

1,180 Views
allenrubis
Contributor I
My board is MC12313SRB PortC now is okey but PortD have problem I cant compile it.

here is my code

#include /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#include "MC9S08GT60.h"

#define PC0 PTCD_PTCD0
#define PC1 PTCD_PTCD1
#define PC2 PTCD_PTCD2
#define PC3 PTCD_PTCD3
#define PC4 PTCD_PTCD4
#define PC5 PTCD_PTCD5
#define PC6 PTCD_PTCD6
#define PC7 PTCD_PTCD7
#define PE0 PTED_PTED0
#define PE1 PTED_PTED1
#define ON 1
#define OFF 0
#define UP 1
#define DOWN 0

#define PD5 PTDD_PTDD5
#define PD6 PTDD_PTDD6
#define PD7 PTDD_PTDD7
#define PB0 PTBD_PTBD0
#define PB1 PTBD_PTBD1
#define PB2 PTBD_PTBD2
#define PB3 PTBD_PTBD3







void MCU_init(void); /* Device initialization function declaration */

void main(void) {

MCU_init(); /* call Device Initialization */




PTCDD=0xff;
PC0=OFF;
PC1=OFF;
PC2=ON;
PC3=ON;
PC4=ON;
PC5=ON;
PC6=ON;
PC7=ON;

PTEDD=0x03;
PE0=ON;
PE1=ON;

PTDDD=0xff;
PD5=OFF;
PD6=OFF;
PD7=OFF;

PTBDD=0x0F;
PB0=ON;
PB1=ON;
PB2=ON;
PB3=ON;


SOPT = 0x73; /* Turn off the watchdog. */

TPM1SC = 0x00;

for(;:smileywink: {
/* __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 */
}


Error:smileytongue:TTD_PTTD5 not declared
PTTD_PTTD6 not declared
PTTD_PTTD7 not declared

I can't use? the portd 5,6,7.

Also,
How could I test if the timer,pwm, UART and ADC working ? Do you have code that could verify if its working.

Thanks,
Allen Rubis
0 Kudos
Reply

1,180 Views
Iggy
Contributor I
I see that Mac gave advice to You. Exact explanation is in datasheet of GT60 (of course :smileywink:) on pages 23-26. Only 64-pin package includes pins 5-7 of PORTD.
See "MC9S08GT60.h" (part deals with PORTD :smileyhappy:) for explanation of CodeWarrior ERROR.
Regards,
Iggy
0 Kudos
Reply

1,180 Views
allenrubis
Contributor I
What processor family is MC13213 included because in the scpecification of mc13213 PORTD are included.
thanks,
Allen
0 Kudos
Reply

1,180 Views
Iggy
Contributor I
Sorry, Allen, I have been out of theme the whole time (because I can´t read :smileysad:). I was talking about combination of MCS08GT60 + MC1319x. Excuse me, but I don´t have expirience with single chip combination of MCU & ZigBee Transceiver as MC1321x is.
But if I´m looking for some info - look at http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MC13213&nodeId=01J4Fs25657103
Microcontroller integrated in MC13213 is MCS08GT family, so there can´t be large differences, I mean..
Good luck!!!
0 Kudos
Reply

1,180 Views
Iggy
Contributor I
Hi Allen, see this link ZigBee(MC13192 + MC9S08GT60): http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=3414 and, as this thread says, download all application notes that are avaible (especially about S(imple)MAC Primitive Functions - for example MLMEEnergyDetect) and BeeKit (http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=BEEKIT_WIRELESS_CONNECTIVITY_TOOLKIT) with application samples nad templates. But measuring of current can be problem... I hope that it can help You a little bit, regards Iggy

Message Edited by Iggy on 2006-11-2309:39 AM

0 Kudos
Reply

1,180 Views
allenrubis
Contributor I
thank you very much.
0 Kudos
Reply