Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About julian265

  • Rank
  1. Thanks for checking Mike, I am using the TMR0IF, however the snippet posted is used for debouncing an input which is potentially too fast to use full tmr0 cycles for. Hence I'm recording the starting value of tmr0, then its value when the input pulse has finished, and a comparison is done to work out the duration. I have also dealt with the cases of single and multiple tmr0 interrupts between the start and finish of the input.
  2. mmmm capitals.... It works if I use tmr0, not TMR0. The PIC's include file has TMR0 in upper case, so I'm a bit confused there!
  3. Hi, my problem seems pretty simple, but has stumped me.... I'm trying to read the tmr0 register using this chunk of code, called on INT interrupt: // PULSE INTERUPT ================================== void pulse_int (void) { unsigned short temp_short; clear_bit(intcon,INTF); if (pulse == 1) { pulse_timer1 = TMR0; SNIP the line "pulse_timer1 = TMR0;" will place a 1 in the (unsigned char) pulse_timer1 register, no matter what the value of TMR0 is. Can anyone think of a reason for this? I have been using TMR0 in this program successfully, it is incrementing and giving th
  4. Hello, I'm trying to begin using the C language for PIC's, having done my previous projects in assembly. (ra68gi's post for beginners makes it seem pretty straight-forward! Thanks!) This is my first program, written simply to learn the compiler's ropes, before I start to flash a few lights. I've read the BoostC compiler manual, done searches, and am still stumped as to why I get a "FATAL: Unexpected EOF" error from this: #include <system.h> #pragma CLOCK_FREQ 20000000 //20MHz #pragma DATA _CONFIG, _CP_OFF &_DEBUG_OFF & _WRT_OFF & _CPD_OFF & _LVP_OFF &a
  • Create New...