This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C1294NCPDT: How to generate a 800Khz clock?

Part Number: TM4C1294NCPDT

I want to generate a ~800KHz clock output from TM4C1294, without using interrupt, but haven't found any starting example after some readings, any pointer? Thanks!

  • Greetings,

    David Chance said:
    I want to generate a ~800KHz clock output from TM4C1294, without using interrupt... any pointer?   

    Consider any of the MCU's many Timers.    These may be programmed into PWM Output Mode - and should reach to 800KHz when you (first calculate, then provide) the appropriate Timer Load & Match Values.

    You should note that the Timers employ the MCU's System Clock as their input clock.    it should not prove too challenging to aim initially for 100KHz - then double that (by halving the Timer's Load Value [creating a 200KHz output] and then repeating that process "2 further times.")   

    Via that "KISS based" method you'll meet your stated objective - and have (other) Timer Values "at the ready" - likely to be used w/in future (or even w/in this) project...

    Depending upon what you intend to drive w/that 800KHz - you may wish to program that particular Timer pin to its "highest output current capability."    (and order it into "push-pull" mode.)

  • Hello David,

    cb1 beat me to the punch but to not only echo his advice but offer up a starting example, check the pwm.c example in [Install Path]\TivaWare_C_Series-2.1.4.178\examples\peripherals\timer

  • Hello Ralph,

    Staff wanted to highlight the fact that this poster - thru "chance" - received two distinct "levels" of support:

    A) Precise directions to an appropriate code example  

    and

    B) A "General Method" of problem solution - including:

    • one bit ragged/twisted, sap leaking tree-branch (serving as fish pole)
    • 30 feet of cb1's (used) 5 lb. mono-filament
    • rusted, slightly deformed hook
    • a "none too smart" worm - blundering into the mostly (gurl staff's) path
    • hand drawn (crudely) "map to the nearest fish pond"

    Thus via method "A" poster is provided a fully prepared/cooked/seasoned Fish - presented upon a (nice) silver platter.

    And via method "B" - the tools to, "Think thru, analyze & develop a general "Fish Catching Solution."    (for those cases where "silver platters & top cabin cooks" are (somehow) not readily available...)