David Stubbs wrote: >I would really appreciate it if someone would have a look at this code >for me. I have spent quite a lot of time rewriting it in the hope of >getting it to work and got nowhere. I'm sure it's likely to be a >stupidly small error, as always. [...] >list p = 16f877 >;#define TESTING >;--------------------------------------------------------------------- >---- #include >[...] >; Variables > >Cblock 0x0C > NumMilisecs ;Delay100 I admit I didn't look any further than this, so there may well be additional errors further down, but here, at least, is one mistake that would prevent your code from working. Your "Cblock 0x0C" would work fine on a 16F84, but not on a 16F877!! The general purpose registers on the 877 start at address 0x20 (see p. 13 of the 16F87X datasheet). Michael V Thank you for reading my little posting. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu