Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).
help - charles_84in - Sep 4 7:46:53 2006
can anyone give me the sample program to test this MC68HC11 board
(demo.s19 program)

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - Mike McCarty - Sep 5 7:25:56 2006
charles_84in wrote:
> can anyone give me the sample program to test this MC68HC11 board
> (demo.s19 program)
Which board? What kinds of tests? What is your application?
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - charles paul - Sep 8 6:37:26 2006
board no is Adapt11C24DX(standard).demo program for this microcontroller.
plz email me.file name is demo.s19
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - Mike McCarty - Sep 8 8:51:10 2006
charles paul wrote:
> board no is Adapt11C24DX(standard).demo program for this microcontroller.
> plz email me.file name is demo.s19
There is no special program called demo.s19. The s19 extension
simply indicates that this is a binary format file. "demo"
is simply an abbreviation of "demonstration".
Unless you can post actual requirements you aren't going
to get any help. Also, if this is a class assignment,
be aware that your professor is reading this.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - BobG...@aol.com - Sep 8 11:21:17 2006
The programs for this board can be downloaded from the Technological Arts site in
Toronto... the demo.asm file is only a couple of lines of assembler... assembler is
included in zip file...
-----Original Message-----
From: c...@yahoo.co.in
To: m...@yahoogroups.com
Sent: Fri, 8 Sep 2006 6:37 AM
Subject: Re: [m68HC11] help
board no is Adapt11C24DX(standard).demo program for this microcontroller.
plz email me.file name is demo.s19
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it
NOW
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - charles paul - Oct 4 3:34:09 2006
mike man plz help.
i want a program relating to interrupt vector table . hw do i initialize it before main
( ) or after.(i am stuck with period measurement program ...i.e timer overflow
condition..some related program will help.)urgent..
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - Tony Stram - Oct 4 9:36:12 2006
Charles,
=20=20=20
If you are using the Imagecraft compiler, there will be a file called vec=
tors.c. In this file you would extern your interrupt handler like this:
=20=20=20
extern void TimerOverflow(void);
=20=20=20
The vectors.c file then uses a pragma to set the address:
=20=20=20
#pragma abs_address: 0xffd6
=20=20=20
Next comes the vector table:
=20=20=20
void (*interrupt_vectors[])(void) =3D=20
{
DUMMY_ENTRY, /* SCI */
=20=20=20
Dummy entries would fill the table. When you get to where your timer over=
flow handle would be, you replace DUMMY_ENTRY with TimerOverflow:
=20=20=20
TimerOverflow, /* TOC1 */
=20=20=20
You will even find the label _start that is defined in crt11.s:
=20=20=20
_start /* RESET */
};
=20=20=20
Then you finish it off with:
=20=20=20
#pragma end_abs_address
=20=20=20
If you are using another C compiler, then you would have to find out how =
that compiler handles absolute address and assign the vector table to that =
range of addresses. Though the pragmas are not portable, the reset of the c=
ode is. If you are using the Imagecraft compiler you will have to use one m=
ore pragma:
=20=20=20
#pragma interrupt_handler TimerOverflow;
=20=20=20
This tells the compiler to use the rti instruction instead of rts. If you=
are using a different compiler, you will have to find out how to tell the =
compiler to use rti instead of rts for interrupts.
=20=20=20
Hope this helps,
Tony Stram
=20=09=09
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ coun=
tries) for 2=A2/min or less.
[Non-text portions of this message have been removed]
=20
=20

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - charles paul - Oct 5 6:19:15 2006
thanks tony,but still there is one problem...
i will attach my program with this e mail..just tell me where i am wrong...
i have given a printf statement in subroutine just to check whether its runnin or not
...my o/p for this program is 0 E clock cycle(.c file opens with notepad)
as u must have already guessed tis is program for period measurement....
kindly tell me where i am wrong...
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - Tony Stram - Oct 5 8:57:42 2006
Charles,
Not sure if it is yahoo or yahoogroups, but there is no attachment to the=
email. I will take a look at your code and help you as best as I can. Most=
of the coding experience I have is geared for hobby robotics. BTW, which C=
compiler are you using? This will help figuring out what the compiler is e=
xpecting when dealing with interrupts.
Tony=20
=20=20=20=20=20=20=20=20=20
=20=09=09
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ coun=
tries) for 2=A2/min or less.
[Non-text portions of this message have been removed]
=20
=20

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: help - charles paul - Oct 10 3:15:30 2006
plz help people i am copyingmy program here, which shows error "multiple
define:__interrupt_vector "
my vector table is as follows:
extern void int_handler( void);
extern void _start(void); /* entry point in crt??.s */
#define DUMMY_ENTRY (void(*)(void))0xFFFF
#pragma abs_address:0xffd6
/* change the above address if your vector starts elsewhere
*/
void (*interrupt_vectors[])(void)={
/* to cast a constant, say 0xb600, use
(void (*)())0xb600
*/
DUMMY_ENTRY, /* SCI */
DUMMY_ENTRY, /* SPI */
DUMMY_ENTRY, /* PAIE */
DUMMY_ENTRY, /* PAO */
DUMMY_ENTRY, /* TOF */
DUMMY_ENTRY, /* TOC5 */
DUMMY_ENTRY, /* TOC4 */
DUMMY_ENTRY, /* TOC3 */
int_handler, /* TOC2 */
DUMMY_ENTRY, /* TOC1 */
DUMMY_ENTRY, /* TIC3 */
DUMMY_ENTRY, /* TIC2 */
DUMMY_ENTRY, /* TIC1 */
DUMMY_ENTRY, /* RTI */
DUMMY_ENTRY, /* IRQ */
DUMMY_ENTRY, /* XIRQ */
DUMMY_ENTRY, /* SWI */
DUMMY_ENTRY, /* ILLOP */
DUMMY_ENTRY, /* COP */
DUMMY_ENTRY, /* CLM */
_start /* RESET */
};
#pragma end_abs_address
*********************************************************************************
and my program for pwm is:
#include
#pragma interrupt_handler int_handler()
long int pulsewidth = 20000;
float dutycycle = .03;
long int onduty, offduty;
int on =0;
void int_handler(void)
{
on = 1-on ;
if(on == 1){
TOC2 += onduty;
}else{
TOC2 += offduty;
}
TFLG1 |= 0X40;
PORTA |= 0x10;
}
void main(void)
{
long int start;
onduty = (int)((double)pulsewidth*dutycycle);
offduty= pulsewidth - onduty;
PORTA =0;
TCTL1=0x40;
start=TCNT;
TOC2 = start + 0x1000;
TFLG1 |= 0x40;
TMSK1 |= 0X40;
INTR_ON();
while(1);
}
#include "vectors.c"
*********************************************************************************
waitin for replyyy
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: help - BobG...@aol.com - Oct 10 12:58:42 2006
Sounds like vectors.c is included twice. Comment one of them out?
-----Original Message-----
From: c...@yahoo.co.in
To: m...@yahoogroups.com
Sent: Tue, 10 Oct 2006 3:15 AM
Subject: Re: [m68HC11] help
plz help people i am copyingmy program here, which shows error "multiple
define:__interrupt_vector "
my vector table is as follows:
extern void int_handler( void);
extern void _start(void); /* entry point in crt??.s */
#define DUMMY_ENTRY (void(*)(void))0xFFFF
#pragma abs_address:0xffd6
/* change the above address if your vector starts elsewhere
*/
void (*interrupt_vectors[])(void)={
/* to cast a constant, say 0xb600, use
(void (*)())0xb600
*/
DUMMY_ENTRY, /* SCI */
DUMMY_ENTRY, /* SPI */
DUMMY_ENTRY, /* PAIE */
DUMMY_ENTRY, /* PAO */
DUMMY_ENTRY, /* TOF */
DUMMY_ENTRY, /* TOC5 */
DUMMY_ENTRY, /* TOC4 */
DUMMY_ENTRY, /* TOC3 */
int_handler, /* TOC2 */
DUMMY_ENTRY, /* TOC1 */
DUMMY_ENTRY, /* TIC3 */
DUMMY_ENTRY, /* TIC2 */
DUMMY_ENTRY, /* TIC1 */
DUMMY_ENTRY, /* RTI */
DUMMY_ENTRY, /* IRQ */
DUMMY_ENTRY, /* XIRQ */
DUMMY_ENTRY, /* SWI */
DUMMY_ENTRY, /* ILLOP */
DUMMY_ENTRY, /* COP */
DUMMY_ENTRY, /* CLM */
_start /* RESET */
};
#pragma end_abs_address
*********************************************************************************
and my program for pwm is:
#include
#pragma interrupt_handler int_handler()
long int pulsewidth = 20000;
float dutycycle = .03;
long int onduty, offduty;
int on =0;
void int_handler(void)
{
on = 1-on ;
if(on == 1){
TOC2 += onduty;
}else{
TOC2 += offduty;
}
TFLG1 |= 0X40;
PORTA |= 0x10;
}
void main(void)
{
long int start;
onduty = (int)((double)pulsewidth*dutycycle);
offduty= pulsewidth - onduty;
PORTA =0;
TCTL1=0x40;
start=TCNT;
TOC2 = start + 0x1000;
TFLG1 |= 0x40;
TMSK1 |= 0X40;
INTR_ON();
while(1);
}
#include "vectors.c"
*********************************************************************************
waitin for replyyy
---------------------------------
Find out what India is talking about on - Yahoo! Answers India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it
NOW
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )