Resource icon

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
Most Helpful Member
Ian Rogers submitted a new article:

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


Read more about this article...
 
Last edited:
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:
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.....
 
Ha Ha.... Missed that !! 0x255 ends up as 0x55 so the timer pin haphazzardly worked... Cheers for that!!!


That is definitely a "wood from the trees" moment!!
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…