Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need M68HC11 code to generate a single 5ms pulse on port PA4

Status
Not open for further replies.

Crackler

Newbie level 1
Joined
Apr 27, 2004
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
8
m68hc11 code

I need some help with 2 problems for my microcontrollers class. We use the Motorola M68HC11 microcontroller. I need the code to generate a single 5ms pulse on port line PA4 and I need the code to generate 5ms pulses every 8ms on port line PA5. Something like this:

One of the easiest uses of an output-compare function is to produce a pulse of a specific
duration. First, a value corresponding to the leading edge of the pulse is written
to the output-compare register. The output compare is configured to automatically set
the corresponding output either high or low, depending on the polarity of the pulse being
produced. After this compare occurs, the output compare is reprogrammed to automatically
change the output pin back to its inactive level at the next compare. A value
corresponding to the width of the pulse is added to the original output-compare register
value, and this result is written to the output-compare register. Since the pin-state
changes occur automatically at specific values of the free-running counter, the pulse
width can be controlled accurately to the resolution of the free-running counter independent
of software latencies. By repeating the actions for generating pulses, an output
signal of a specific frequency and duty cycle can be generated.
 

M68HC11 code needed

You can find it on **broken link removed**

regards,
zmath
 

Re: M68HC11 code needed

Hi!

This is example output capture function. More information is in Reference Manual HC11.

best regards
Wat
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top