Timer in HC08

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi All,
I am using HC08908EY16 micro and CodeWarrior for my development. As
part of my study I did one simple program which will use the timer
interrupt. But it is not working .. I build this program on the
908EY186 sample available in the code warrior tutorial. I am not
getting the timer over flow interrupt. Can any body point out waht is
wrong with my code. I am using the MON08 debug interface.
Here is my code

void InitTimerModuleA(void )
        //Initializes timer :TOIE bit enabled,
    // timer stopped, reset,Internal Bus clock divided by 64        
    TASC   = 0x76;
    TAMODH = 0x4A; // Modulo19%200
    TAMODL = 0xFF;
    TASC0  = 0x40;
    TASC1  = 0x00;
interrupt void TimerInt(void)
And my PRM file is as follows


    Z_RAM  = READ_WRITE          0x0040 TO 0x00EF;
    /* 0xF0 to 0xFF reserved for Monitor stacking */
    MY_PSEUDOROM = READ_ONLY    0x0100 TO 0x023F;
    DEFAULT_ROM                  INTO  MY_PSEUDOROM;  
    DEFAULT_RAM                  INTO  Z_RAM;
    zpage                         INTO  Z_RAM;



Re: Timer in HC08
On 10 Jul 2003 06:56:04 -0700, the renowned shibu snipped-for-privacy@yahoo.com

Quoted text here. Click to load it

I suppose you're clearing the I bit in the CCR (global INT mask)

Best regards,
Spehro Pefhany
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Timer in HC08
Spehro is right, do you use the euivalent ASM mnemonic "CLI" somewhere in
your inits ?



Quoted text here. Click to load it
Quoted text here. Click to load it

Re: Timer in HC08

Yvan BOURNE a E9%crit:
Quoted text here. Click to load it
Or use the "EnableInterrupts" macro, don't forget #include <hidef.h>


Re: Timer in HC08
Quoted text here. Click to load it

Hi All,
I am enabling the interrupt in my Main() as follows
        TASC = TASC & (~0x20); // start timer
Still I am not getting the interrupt. But I placed the same code into
another sample code availabe in "\Stationery\HC08\EY\EY16\C".Now I am
getting the interrupt. I don't know what the hell is going on...When I
place the same code on the sample code available in
"\Stationery\HC08\Legacy\MON08 Target Interface\hc908ey16", I am not
getting the interrupt...
Also in the CodeWarrior Debugger, "True-Time Simulator& Real Time
Debugger, I am getting the "MON8" menu for
"\Stationery\HC08\Legacy\MON08 Target Interface\hc908ey16" project and
"PEDebug" for the ""\Stationery\HC08\EY\EY16\C" prject. I don't know
what all this things.
My questain is, what all this MON8 and PEDebug means...
Which development method I have to follow for HC908EY16 ...

Please help me on this... What this Motorola is doing... Please see
how Hitachi guys are doing this


Re: Timer in HC08
MON08 is a P&E tool (http://www.pemicro.com )



Quoted text here. Click to load it

Re: Timer in HC08
Hi All,
The interrupt functionality worked.by default the debugger worked in
Simulation mode and in this mode there is no interrupt by default. So
now I flashed the code and getting the interrupt correctly.
Sorry for this simple questaion and wasting your time
Thanks for all the support extended...

Now I am playing with SPI. But after transmitting the SPI data, I am
geeting the receiver interrupt, but the Over Run error bit is set.
What could be the problem. Does any one have any sample code on SPI
Initialization, transmission, reception...


by al owens
by al owens
shibu snipped-for-privacy@yahoo.com (shibu) wrote in message
Quoted text here. Click to load it

Site Timeline