PIC 18 TMR0 Counts Til Ten

Timer0 As Counter — PIC Unit #04 — TMR — Episode #03

J3
Jungletronics
1 min readNov 30, 2019

--

Hi, this turn Timer0 acts as a counter:

As my hardware has no expansion to PORTA, we did not have the possibility to generate 10 pulses on PORTA.RA4 pin :/

I just make a short on sixth PIC18F4520 pin and the LED light up.

That’s it!

In the next episode let’s answer: What is the max period for Timer1 (@8MHz)?

See you soon!

Bye!

Related Posts

01º Episode — TMR — unit#04 — TMR0 Intro — Hello World Timer zero!

02º Episode — TMR — unit#04 — TMR0 Extended @5sTIMER0 counts at every 5 long seconds.

03º Episode — TMR — unit#04 — TMR0 As a CounterTIMER0 counts ‘till ten!

Credits & References

SWITCH DEBOUNCING TUTORIAL PT/1 by coder-tronics

Fig 1. TMR0 as a Counter

--

--

J3
Jungletronics

Hi, Guys o/ I am J3! I am just a hobby-dev, playing around with Python, Django, Ruby, Rails, Lego, Arduino, Raspy, PIC, AI… Welcome! Join us!