# I'm sick of counter requests.. So here's a few 2016-12-01

Status
Not open for further replies.

#### Ian Rogers

##### User Extraordinaire
Forum Supporter
Ian Rogers submitted a new article:

I'm sick of counter requests...... - counter

A long time coming...

"I need a counter!", "0~99 counter needed", "How to make seven segment counter"..

Why can no one find a tutorial...

Ah well! Here goes....

First questions you need to ask yourself.... Micro?, language? LCD or LED?..

If you want to use LED seven segment displays, then more questions... Multiplexed or non multiplexed?... Quantity of multiplexed displays?..

LCD display units are relatively easy to hook up to a micro.. Many tutorials on this on the web... So.... Here...

Last edited:

#### Mike - K8LH

##### Well-Known Member
After a quick glance I spotted a couple instructions that looked a little strange. Perhaps you can check them out...

In all three assembly language programs you have this code which doesn't look quite right;
Code:
   movlw   0x255
movwf   TRISA       ; Port A are all inputs
In all three C programs you have this code which sets the RE0 pin as an output instead of an input;
C:
   TRISE0 = 0;          // reset button
Thank you for the time and effort you've put into sharing your experience and examples... It's very much appreciated...

Last edited:

#### Ian Rogers

##### User Extraordinaire
Forum Supporter
Hi Mike! Correct about TRISE.. I have just checked on the final code and it was corrected... I must have posted the code before the reset was added... But PORTA are just inputs and only timer0 input is being used.

Thanks for the once over.. Its always better when a second pair of eyes is available..

Funny how the the ASM variant set the RE0 correctly!! LOL.....

#### Mike - K8LH

##### Well-Known Member
I assumed you had meant to use a value 0xFF or decimal 255 rather than 0x255...

Status
Not open for further replies.