Jump to content

Adrian

EstablishedMember
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Adrian

  • Rank
    Newbrie

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Gender
    Male
  • Location
    Bristol UK.
  • Interests
    Maxim 1-Wire.
    Software.
  1. Thanks AlexR did not notice the semicolon had crept in there spent almost two days not noticing that. Thank you. Adrian.
  2. Greetings Everyone, I am trying to get this small piece of code to compile but keep getting the errors shown below: source.c source.c(25): error: missing right paren source.c(25): error: general error source.c(25): error: failure #include <system.h> /* Target PIC16F877 configuration word. */ #pragma DATA _CONFIG, _PWRTE_ON & _BODEN_OFF & _WDT_OFF & _LVP_OFF & _CP_OFF & _DEBUG_OFF & _HS_OSC & _CP_OFF /* Set clock frequency to 16MHz. */ #pragma CLOCK_FREQ 16000000 //----------------------------------------------------------
  3. Thanks for your advice it solved the problem. I changed the values in the array and for loop and it worked as expected. Regards. Adrian.
  4. Thanks for the reply. You were right, when I changed the values in the array and for loop everything worked as expected. Thanks for your time. Adrian.
  5. Greetings everyone, I have a problem with the for loop shown below going into an infinite loop. If I comment out the function the loop runs alright giving 9 iterations otherwise it just loops around for ever. for (s = 0; s < 10; s = s + 1) { spad = OW_read_BYTE(); } Here is the function definition unsigned char OW_read_BYTE(void) { unsigned char t; unsigned char byteval = 0; /* Retrieve 8 bits. */ for (t = 0; t < 8; t++) { byteval >>= 1; if (OW_read_BIT()) byteval |= 0x80; } return (byteval); }
  6. Hi Reynard You were right of course I had an extra space. Removed this and the program compiled. Cheers Adrian.
  7. Hello forum, I am trying to compile the "standard" RS-232 program in MPLAB 8.00 shown below: #include <system.h> //Target PIC16F877 configuration word. #pragma DATA_CONFIG,_PWRTE_OFF &_BODEN_OFF &_WDT_OFF &_LVP_OFF &_CPD_OFF &_DEBUG-OFF &_HS_OSC &_CP_OFF //Set clock frequency to 10MHz. #pragma CLOCK_FREQ 10000000 #define bit_time 104 // Required for compilation. // Hardware USART parameters. #define TX_PORT 0x07 #define TX_TRIS 0x87 #define TX_BIT 6 #define RX_PORT 0x07 #define RX_TRIS 0x87 #define RX_BIT 7 #define e_SP
×
×
  • Create New...