68HC12 Class Examples
Topic Examples
Various examples
  • Assembler directives & simple code (example0.asm)
  • Loop example (example1.asm)
  • Character search in string (example2.asm)
  • Stack Example (stack1.asm)
  • Simulator example (sim_hc12.asm)
  • Simulator example (with no COP) (sim_hc12_no_COP.asm)
  • Address and Data
    Bus Timing
    for 68HC11
  • Machine Cycle (6811) (mach_cyc.asm)
  • Parameter Passing
  • Parameters in internal registers (pram1a.asm)
  • Parameters address (pointer) in the internal registers (pram1b.asm)
  • Parameters in program memory space (pram2a.asm)
  • Parameters pointers in program memory space (pram2b.asm)
  • Parameters on stack (pram3a.asm)
  • Parameters pointers on stack (pram3b.asm)
  • Parameters in global memory (pram4.asm)
  • Parameter Passing Notes (68HC11) (param_passing.PDF) [PDF]
  • Macro Examples
  • Macro examples (macro.asm)
  • Bubble sorting
  • Ascending bubble sort (bsort.asm)
  • Multiply/Divide
  • Examples of multiply and divide arithmetic (multdiv.asm)
  • Polling
  • Polling (polling.asm)
  • IRQ and
    Debouncing
  • IRQ Example A (counts to 255, uses pseudo-vectors for UF's D-Bug4744; not for simulator) (irq_inta.asm)
  • IRQ Example B (counts to 65535; uses pseudo-vectors for UF's D-Bug4744; not for simulator) (irq_intb.asm)
  • IRQ Example C (like B but uses real interrupt vectors; for simulator) (irq_intc.asm)
  • IRQ Example D (like C but uses both pseudo-vectors and vectors; for simlator) (irq_intd.asm)
  • RTI and TOI
  • Use RTI for a single process to toggle bits (rtia.asm)
  • Use RTI single process to rotate bits (rtib.asm)
  • Like RTIa, but with polling (rtia_p.asm)
  • Co-processing example using RTI for two processes (co_proc_rti.asm)
  • TOF example (timeover.asm)
  • TOF example for UF 68HC12 board (with D-Bug12) (timeover_debug.asm)
  • Output compare
    (OC) and PWM
  • Use OC2 to generate a PWM (oc2pwm.asm)
  • Like oc2pwm above, but uses both interrupt vectors interrupt pseudo-vectors. Work on simulator, but NOT on UF board. (oc2pwm_sim_debug.asm)
  • OC7 to generate two PWM's and uses CFORC (oc7pwm.asm)
  • OC5 to generate a periodic signal (oc5siggn.asm)
  • Generation of a skinny (1-Eclk) pulse (1E-clk_Pulse.asm)
  • A/D system
  • A/D example of storing EEG samples (ad_eeg.asm)
  • Input Capture (IC) system
  • Finding the width of a signal (ic3.asm)
  • Detecting a digital code (ic5_det.asm)
  • My equates
  • My equates and other templates (equates.asm)
  • PA
  • Pulse Accumulator Detection Example 1 (padetect.asm)
  • Pulse Accumulator Duration Example (padur.asm)
  • Pulse Accumulator BIG Duration Example (padurbig.asm)
  • SPI
  • SPI Example (Master) (spi_master.asm)
  • SPI Example (Slave) (spi_slave.asm)
  • SPI Master Transmit & Receive a Table (spi_master_tab.asm)
  • SPI Output Port Expansion from HW (spi_out.asm)
  • Multitasking
  • Steps in an RTI multi-tasking routine (rti_step.asm)
  • Single process of an multi-tasking routine (rti_1process.asm)
  • Multi-tasking with RTI (rti_mult_proc.asm)
  • Another Multi-tasking with RTI (rti_mult_proc2.asm)
  • Multi-tasking using RTI and TOF (rti_mult_tof.asm)