Silly mistake of the week!

Nigel Goodwin

Super Moderator
Most Helpful Member
Wrote a nice simple program, for a project at work - a simple interrupt driven pulse counter/divider with the processor in sleep most of the time, looking for five plus years battery life (as it will be potted in resin).

Used a little 8 pin PIC, 16F18313 - does everything I need, and I set it up using the MCC (to avoid the bother of getting the clock at the right speed).

For those who haven't used the MCC, it gives you a number of macros for enabling and disabling interrupts, commented out in the code, and you enable them as required.

Unfortunately, when I built it up and ran it, nothing happened? - so I was initially a bit baffled, then noticed my mistake:


Removed the // on the wrong line
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…