Sign in

username:

password:



Not a member?

Search hc11



Search tips

Subscribe to hc11



Ads

Discussion Groups

Discussion Groups | M68HC11 | IC4/OC5 question

Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).

IC4/OC5 question - Qu Ziguang - Feb 6 14:40:00 2005


Hi all,

I just wrote two similar pieces of code to detect rising edges on IC3
and IC4/OC5. The one on IC3 works, but the one on IC4/OC5 doesn't.

IC3:

ldy #$1000
ldaa #$01 ; EDG3A on
staa tctl2,y
bclr tflg1,y $fe ; IC3F cleared
brclr tflg1,y $01 * ; Loop until flag set

IC4:

ldy #$1000
bset pactl,y $04 ; set IC4/OC5 = 1
ldaa #$40 ; EDG4A on
staa tctl2,y
bclr tflg1,y $f7 ; IC4F cleared
brclr tflg1,y $08 * ; Loop until flag set

Can anyone tell me what is wrong? Thanks.





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


RE: IC4/OC5 question - Redd, Emmett R - Feb 7 9:52:00 2005

Can you please give us the full number of your HC11 chip?

Thanks,

Emmett Redd Ph.D. mailto:
Associate Professor (417)836-5221
Department of Physics, Astronomy, and Materials Science
Southwest Missouri State University Fax (417)836-6226
901 SOUTH NATIONAL Dept (417)836-5131
SPRINGFIELD, MO 65804 USA

> -----Original Message-----
> From: Qu Ziguang [mailto:]
> Sent: Sunday, February 06, 2005 12:41 PM
> To:
> Subject: [m68HC11] IC4/OC5 question >
> Hi all,
>
> I just wrote two similar pieces of code to detect rising edges on IC3
> and IC4/OC5. The one on IC3 works, but the one on IC4/OC5 doesn't.
>
> IC3:
>
> ldy #$1000
> ldaa #$01 ; EDG3A on
> staa tctl2,y
> bclr tflg1,y $fe ; IC3F cleared
> brclr tflg1,y $01 * ; Loop until flag set
>
> IC4:
>
> ldy #$1000
> bset pactl,y $04 ; set IC4/OC5 = 1
> ldaa #$40 ; EDG4A on
> staa tctl2,y
> bclr tflg1,y $f7 ; IC4F cleared
> brclr tflg1,y $08 * ; Loop until flag set
>
> Can anyone tell me what is wrong? Thanks.




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

Re: IC4/OC5 question - Qu Ziguang - Feb 7 17:04:00 2005


I am using Axiom's CME11E9-EVBU development board. The chip number is
MC68HC11E9. --- In , "Redd, Emmett R" <err557f@s...> wrote:
> Can you please give us the full number of your HC11 chip?
>
> Thanks,
>
> Emmett Redd Ph.D. mailto:EmmettRedd@s...
> Associate Professor (417)836-5221
> Department of Physics, Astronomy, and Materials Science
> Southwest Missouri State University Fax (417)836-6226
> 901 SOUTH NATIONAL Dept (417)836-5131
> SPRINGFIELD, MO 65804 USA
>
> > -----Original Message-----
> > From: Qu Ziguang [mailto:quziguang@g...]
> > Sent: Sunday, February 06, 2005 12:41 PM
> > To:
> > Subject: [m68HC11] IC4/OC5 question
> >
> >
> >
> > Hi all,
> >
> > I just wrote two similar pieces of code to detect rising edges on IC3
> > and IC4/OC5. The one on IC3 works, but the one on IC4/OC5 doesn't.
> >
> > IC3:
> >
> > ldy #$1000
> > ldaa #$01 ; EDG3A on
> > staa tctl2,y
> > bclr tflg1,y $fe ; IC3F cleared
> > brclr tflg1,y $01 * ; Loop until flag set
> >
> > IC4:
> >
> > ldy #$1000
> > bset pactl,y $04 ; set IC4/OC5 = 1
> > ldaa #$40 ; EDG4A on
> > staa tctl2,y
> > bclr tflg1,y $f7 ; IC4F cleared
> > brclr tflg1,y $08 * ; Loop until flag set
> >
> > Can anyone tell me what is wrong? Thanks.
>





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