Jump to content

gbgb

EstablishedMember
  • Content Count

    60
  • Joined

  • Last visited

Everything posted by gbgb

  1. I think this is a bug. unsigned short y; unsigned char x; lets say y=FF45 ; i would like to put the high byte of y into x if I do an implicit casting: x = y >> 8; the result is correct x = FF If I do an explicit casting: x = (unsigned char) y >> 8; I get x = 00
  2. I have a structure: typedef struct { unsigned int A; unsigned int B; unsigned int c; } ConvertCoeff; and I declare an array of this structure: ConvertCoeff coeff[8]; As long as I leave it this way everything is OK. But if I try to intialize the array during decleration as follows: ConvertCoeff coeff[3] = { {1,2,3}, {1,2,3}, {1,2,3}}; I get an error during compilation - missing semicolon. Is it not a legitimate initialization? I know it is possible on other compilers - how do I do it in BoostC?
  3. I t seems that in the first instance the character is sent to the transmit register without making sure that it is ready to accept the character, while in the second instance the program waits until the transmit buffer indicates that it is ready. I guess it might cause intermitent problems on a first time of sending a character.
  4. I would like to access a certain hardware pin - e.g portb.1 and would like to give it a meaningful name in the program - e.g "LED1" Is there a practical differnce between defining it as: #define LED1 portb.1 or assigning it as a variable: bit LED1 @portb.1 (would there be a difference if it is an output pin vs, input pin?)
  5. Attached. This started as a serial port test and evolved into including code from a modbus library (written by filed serve technologies) - modifying it to match the PIC I am using and integrating server/client into a single file (I will also change the whole state machine sequence and eliminate man things that I do not need for my specific application, but this is a differnt issue). You will note that the functions giving the error are those with teh da_* prefix to their name - although they are declared and the code for them is present. BruteForceSerial.zip
  6. I have teh following code: A structure is defined: typedef struct { ......... ....... ..... } SOME_TYP ; and also a function: void foo(SOME_TYP* xxx, unsigned short yyy); { ........... } When I build my project I receive the following error message: Error: Unresolved external function:'foo(?*,unsigned short)' There are several functions using the same pointer to this struct which generate the same error. Other functions which are declared/coded in the same files but do not use this struct do not generate any error. What could be the problem? is it the pointer to the structure (the '?' in the error message makes me think that something is not recognized). How do I solve this?
  7. Sorry, I just noticed the list of supported devices inside the file and the 18F8772 family is not included.
  8. I have a PIC 18F6527 (18F8772 family) with dual hardware USARTs Does the RS232 driver included in BoostC support two hardware USARTS? I not, will it at least work on one of the two without modifications?
  9. After successful compilation I receive the following linker erro: Error: .obj or .lib file Incompatible version! (file uses V107, linker requires V109 to V109) Error: Failed to process:libc.pic18.lib What is the cause for this? I have version 6.8.1 installed and assumed all files and libs versions should have been "aligned"
  10. I need my code to be able to work with several compilers which require different handling. Is there a predefined macro in the preprocessor that defines the boostc compiler? What is it? Are there any other predefined macros? Where are they documented?
×
×
  • Create New...